diff options
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/buildinstall | 2 | ||||
-rwxr-xr-x | scripts/upd-instroot | 42 |
2 files changed, 37 insertions, 7 deletions
diff --git a/scripts/buildinstall b/scripts/buildinstall index a0e25a536..cada65247 100755 --- a/scripts/buildinstall +++ b/scripts/buildinstall @@ -134,7 +134,7 @@ MK_STAMP=$BUILDINSTDIR/makestamp.py BUILDINSTALL=$BUILDINSTDIR/buildinstall echo "Building images..." -$UPD_INSTROOT $DEBUGSTR $NOGRSTR $PKGDIR $TREEDIR/image-template $TREEDIR/instimage +$UPD_INSTROOT $DEBUGSTR $NOGRSTR $PKGDIR $TREEDIR/image-template $TREEDIR/instimage $p if [ -n "$PKGORDER" ]; then echo "Getting package order..." diff --git a/scripts/upd-instroot b/scripts/upd-instroot index d761dc774..6684004d1 100755 --- a/scripts/upd-instroot +++ b/scripts/upd-instroot @@ -147,13 +147,14 @@ instFile() { } expandPackageSet() { - RPMS=$1 - PKGDEST=$2 - KEEPFILES=$3 + YUMCONF=$1 + RPMS=$2 + PKGDEST=$3 + KEEPFILES=$4 [ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST" mkdir $PKGDEST/yumdir - yum -y --installroot=$PKGDEST/yumdir install $RPMS + yum -c $YUMCONF -y --installroot=$PKGDEST/yumdir install $RPMS pushd $PKGDEST/yumdir >/dev/null cat $KEEPFILES | while read spec ; do @@ -190,6 +191,20 @@ else DESTGR=$3 fi +if [ -n "$4" ]; then + TOPDIR=$4 +elif [ -d $PACKAGEDIR/repodata ]; then + TOPDIR=$PACKAGEDIR +elif [ -d $PACKAGEDIR/../repodata ]; then + TOPDIR=$PACKAGEDIR/.. +elif [ -d $PACKAGEDIR/../../repodata ]; then + TOPDIR=$PACKAGEDIR/../.. +else + echo "Unable to find repodata!" + exit 1 +fi + + rm -rf $DEST $DESTGR mkdir -p $DEST mkdir -p $DESTGR @@ -1045,13 +1060,28 @@ for file in $KEEPFILE $KEEPFILEGR; do mv -f $file- $file done +yumconf=$(mktemp /tmp/yum.conf.XXXXXX) +cat > $yumconf <<EOF +[main] +keepcache=0 +gpgcheck=0 +plugins=0 + +[anacondarepo] +name=anaconda repo +baseurl=file://$TOPDIR +enabled=1 +EOF + echo "Expanding text packages..." -expandPackageSet "$RPMS" $DEST $KEEPFILE +expandPackageSet $yumconf "$RPMS" $DEST $KEEPFILE #(cd $DEST; tar cSpf - .) | (cd $DESTGR; tar xSpf -) echo "Expanding graphical packages..." -expandPackageSet "$RPMSGR" $DESTGR $KEEPFILEGR +expandPackageSet $yumconf "$RPMSGR" $DESTGR $KEEPFILEGR + +rm -f $yumconf # echo "retrieving timezones" # TZDIR=${TMPDIR:-/tmp}/glibc-timezone-$$ |