+ppc rpmdb workaround.
[nethome.git] / src / rawhide-bootstrap
index ba2a871..7536b31 100755 (executable)
@@ -29,7 +29,9 @@ function pkg
                if [ `echo "$r"|wc -l` -ge 2 ];then break;fi
                if [ -n "$r" ];then
                        echo "$RPMS_URL_BASE/Fedora/RPMS/$r"
-                       return
+                       if [ "$arch" != ppc64 ];then
+                               return
+                       fi
                fi
        done
        echo >&2 "ERROR: $1"
@@ -91,7 +93,7 @@ rm -rf $DOWNLOAD
 trap 'rm -rf $DOWNLOAD $KEY' EXIT
 mkdir $DOWNLOAD
 cd $DOWNLOAD
-wget `set +x;while read -r line;do pkg $line;done <<EOH
+wget `set +x;while read -r line;do if [ -n "$line" ];then pkg $line;fi;done <<EOH
 coreutils
 rpm
 bash
@@ -174,6 +176,12 @@ gdbm
 mcstrans
 libcap
 kpartx
+$(if [ $uname_i = ppc ];then echo ppc64-utils;fi)
+$(if [ $uname_i = ppc ];then echo yaboot     ;fi)
+perl
+binutils
+hfsutils
+tcl
 EOH
 `
 mkdir -p $ROOT/var/lock/rpm
@@ -187,6 +195,9 @@ rm -f *
 cd
 rm -rf $DOWNLOAD
 
+# Reported as Bug 206524, occurs on ppc, possibly not a bug:
+rm -f $ROOT/var/lib/rpm/__db.*
+
 chroot $ROOT /bin/rpm --rebuilddb
 
 # Do not install yum(8) just by 'rpm --root', later --rebuilddb would:
@@ -207,7 +218,6 @@ libxml2-python
 gmp
 libxml2
 elfutils
-binutils
 python-elementtree
 python-sqlite
 python-urlgrabber