Switch the order of our two big pkgdb calls to resolve a race condition.
This commit is contained in:
parent
d29eec75ab
commit
1392043bbd
1 changed files with 29 additions and 28 deletions
|
@ -1,13 +1,15 @@
|
||||||
#!/bin/bash -e
|
#!/bin/bash -e
|
||||||
|
|
||||||
|
export GL_BINDIR=/usr/bin
|
||||||
|
TEMPDIR=`mktemp -d -p /var/tmp genacls.XXXXX`
|
||||||
|
cd $TEMPDIR
|
||||||
|
|
||||||
|
# If this fails, then the -e option will cause the whole script to quit.
|
||||||
|
/usr/local/bin/genacls.pkgdb > gitolite.conf
|
||||||
|
|
||||||
|
# Then create the repos and branches on disk (if we need any new ones)
|
||||||
python /usr/local/bin/pkgdb_sync_git_branches.py
|
python /usr/local/bin/pkgdb_sync_git_branches.py
|
||||||
|
|
||||||
TEMPDIR=`mktemp -d -p /var/tmp genacls.XXXXX`
|
|
||||||
export GL_BINDIR=/usr/bin
|
|
||||||
|
|
||||||
cd $TEMPDIR
|
|
||||||
# Only replace the acls if genacls completes successfully
|
|
||||||
if /usr/local/bin/genacls.pkgdb > gitolite.conf ; then
|
|
||||||
mv gitolite.conf /etc/gitolite/conf/
|
mv gitolite.conf /etc/gitolite/conf/
|
||||||
chown gen-acls:gen-acls -R /etc/gitolite/conf/
|
chown gen-acls:gen-acls -R /etc/gitolite/conf/
|
||||||
HOME=/srv/git /usr/bin/gitolite compile
|
HOME=/srv/git /usr/bin/gitolite compile
|
||||||
|
@ -32,7 +34,6 @@ if /usr/local/bin/genacls.pkgdb > gitolite.conf ; then
|
||||||
echo '$one_repo{"rpms/'$repo'"} = $one_repo{"'$repo'"};' >> $glconf;
|
echo '$one_repo{"rpms/'$repo'"} = $one_repo{"'$repo'"};' >> $glconf;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
fi
|
|
||||||
|
|
||||||
cd /
|
cd /
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue