5 if [ "$1" = "-v" ];then
11 if [ "$1" = "-q" ];then
16 if [ -z "$HOME" -o "$HOME" = "/" ];then
21 if [ "$i" = "${i#/var/lib/mock/}" ];then
22 echo >&2 "$i not /var/lib/mock/*"
25 if [ "$i" != "${i#*/root}" ];then
26 echo >&2 "$i contains /root"
29 if [ "$i" != "${i%-intel}" ];then
35 for p in /proc/*/root;do
37 if [ "${l#$i/}" != "$l" ];then
45 echo >&2 "$i has existing processes: $b"
49 r="$(basename $i|sed 's/\(-x86_64\|-i.86\)-.*$/\1/')"
50 r="$r$(basename $i|sed -n 's/^.*\(-x86_64\|-i.86\)-\(.*\)$/ --uniqueext=\2/p')"
51 /usr/local/sbin/mocksetup -u `basename $i`
52 rm -f $i/root/var/lib/rpm/__db.*
54 mock $opts -r $r --update
55 mock $opts -r $r --install `cat $HOME/src/INSTALL`
57 # Run: yum groupinstall buildsys-build
58 # Cleaning would undo the changes above.
59 # file /lib/libnssutil3.so conflicts between attempted installs of nss-3.12.3.99.3-10.fc12.i686 and nss-util-3.12.3.99.3-9.fc12.i686
60 # rpmdb: Build signature doesn't match environment
61 # on: fedora-{11,12}-i386
62 #if [ "$i" = "${i#*/fedora-rawhide-}" ];then
63 # mock $opts -r `basename $i` --no-clean --no-cleanup-after --rebuild /usr/local/share/empty-0.1-1.src.rpm
65 # Just rpmbuild would error with:
66 # error: cannot open Packages index using db3 - Invalid argument (22)
67 rpm -r $i/root --rebuilddb
68 # Leftover usually just removing vital system packages:
69 rm -f $i/root/var/lib/yum/transaction-*
71 rpm -r $i/root --qf '%{name}.%{arch}\n' -qa|sort|uniq -d|grep -v '^kernel\.'|sed -e '1s/^/ror duplicity:\n/' -e '1s/^/mockupdate er/'
74 echo done mockupdate "$*"