Skip to content

Commit a62cad3

Browse files
committed
Don't md5 for mock.
1 parent edcebc9 commit a62cad3

File tree

1 file changed

+9
-18
lines changed

1 file changed

+9
-18
lines changed

mock-the-feds.sh

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
#!/bin/bash
22

3-
SCM="~/projects/samba/samba-perf"
4-
PKG="~/projects/fedora/samba"
5-
REPO="~/repo/f23/x86_64"
3+
SCM=~/projects/samba/samba-perf
4+
PKG=~/projects/fedora/samba
5+
REPO=~/repos/f23/x86_64
66
REPO_NAME="jarrpa"
77

88
MOCK_OPTS="--no-clean --without=configure --nocheck --no-cleanup-after"
@@ -21,27 +21,18 @@ RELEASE=$(grep "define main_release" samba.spec | awk '{print $3}')
2121
SRPM="samba-${VERSION}-${RELEASE}.fc23.src.rpm"
2222

2323
if [ -f "${REPO}/${SRPM}" ]; then
24-
OLD_MD5=`md5sum ${REPO}/${SRPM} | awk '{print $1}'`
24+
CMD="SAMBA_PKGS=`dnf -C list installed | grep \"samba\\\|ctdb\\\|libwb\\\|libsmb\" | awk '{print $1}'`; sudo dnf reinstall \$SAMBA_PKGS"
2525
else
26-
OLD_MD5=""
26+
CMD="sudo dnf --disablerepo=* --enablerepo=${REPO_NAME} update"
2727
fi
2828

2929
pushd $SCM
3030
git archive --format=tar.gz --prefix=samba-${VERSION}/ HEAD -o $PKG/samba-${VERSION}.tar.gz
3131
popd
3232

3333
fedpkg --dist f23 srpm
34+
sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
3435

35-
NEW_MD5=`md5sum ${SRPM} | awk '{print $1}'`
36-
37-
if [ "${NEW_MD5}" != "${OLD_MD5}" ]; then
38-
echo "sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}"
39-
sudo mock ${MOCK_OPTS} -r f23-x86_64 rebuild ${SRPM}
40-
popd
41-
if [ "x${OLD_MD5}" != "x" ]; then
42-
CMD="SAMBA_PKGS=`dnf list installed | grep \"samba\\\|ctdb\\\|libwb\\\|libsmb\" | awk '{print $1}'`; sudo dnf reinstall ${SAMBA_PKGS}"
43-
else
44-
CMD="sudo dnf --disablerepo=* --enablerepo=${REPO_NAME} update"
45-
fi
46-
./scripts/hark-a-vagrant.sh ${CMD}
47-
fi
36+
popd
37+
38+
./scripts/hark-a-vagrant.sh ${CMD}

0 commit comments

Comments
 (0)