On my test system, a minimal devel compose using pungi takes 85:25s,
62:29s of which is spent in upd-instroot building the minstg2.img and
stage2.img trees. The attached patch set speeds things up a lot. The
changes are split into the following patches:
anaconda-time.patch
- Adds some timestamps to the output.
anaconda-nocpio.patch:
- Remove and old, unneeded duplication of the file lists adding "./" to
the paths. We no longer use cpio to copy files, so this just slows us
down (a lot).
anaconda-yumdir.patch:
- Re-uses the yum installed source tree of the minimal install for the
graphical install - saving the re-installation of the base packages.
- Make some sub-directories yum was complaining about not being able to
access.
anaconda-ldso.patch:
- This doesn't actually work yet, but it tries to do the following:
- Fixes the code to find and install shared library dependencies
- removes those libraries from being explicitly listed in the file lists.
- Other list cleanup
- This might actually slow us back down, but it does fix what appears to
have been completely broken and makes adding new binaries easier.
Does this seem useful? If not, it might be best to just rip it out of
upd-instroot altogether.
anaconda-find.patch:
- If a file spec does not use wildcards (?, [], or *), just deal with
the single item (don't use find).
- If a file spec uses wildcards, find the directory we are searching and
just search that path rather than the whole source image.
anaconda-noscripts.patch:
- Use "tsflags=nodocs noscripts notriggers" to avoid extra rpm
transactions.
Timings: orig new
yum install text: 6:37s 5:07s
build text tree: 12:35s 1:48s
yum install graph: 8:44s 2:02s
build graph tree: 34:43s 3:11s
total: 62:29s 12:08s
The main difference caused by "noscripts notriggers" seems to missing
entries in /etc/passwd and /etc/group.
I'm still doing some detailed comparisons, but the first three patches
should be pretty safe.
BTW - pungi seems to loose stderr output of buildinstall. I needed to
put "exec 2>&1" in /usr/lib/anaconda-runtime/buildinstall to do
debugging. Also, the output of buildinstall doesn't make it into the
log file until the command is complete further slowing down debugging.
--
Orion Poplawski
Technical Manager 303-415-9701 x222
NWRA/CoRA Division FAX: 303-415-9702
3380 Mitchell Lane orion@xxxxxxxxxxxxx
Boulder, CO 80301 http://www.cora.nwra.com
--- anaconda-11.3.0.37/scripts/upd-instroot.find 2007-10-08 17:56:38.000000000 -0600
+++ anaconda-11.3.0.37/scripts/upd-instroot 2007-10-09 13:13:45.000000000 -0600
@@ -187,15 +187,27 @@
echo `date` "Installing files"
pushd $YUMDIR >/dev/null
cat $KEEPFILES | while read spec ; do
- for filespec in `find . -path "./$spec"` ; do
- if [ ! -e $filespec ]; then
+ if [ "$spec" == "${spec/[?[*]/}" ]; then
+ if [ ! -e ./$spec ]; then
continue
- elif [ ! -d $filespec ]; then
- instFile $filespec $PKGDEST
+ elif [ ! -d ./$spec ]; then
+ instFile ./$spec $PKGDEST
else
- for i in `find $filespec -type f` ; do instFile $i $PKGDEST ; done
+ for i in `find ./$spec -type f` ; do instFile $i $PKGDEST ; done
fi
- done
+ else
+ #Pull off path
+ path=`echo "$spec" | sed 's,\([^[*\?]*\)/.*,\1,'`
+ for filespec in `find ./$path -path "./$spec"` ; do
+ if [ ! -e $filespec ]; then
+ continue
+ elif [ ! -d $filespec ]; then
+ instFile $filespec $PKGDEST
+ else
+ for i in `find $filespec -type f` ; do instFile $i $PKGDEST ; done
+ fi
+ done
+ fi
done
popd >/dev/null
}
--- anaconda-11.3.0.37/scripts/upd-instroot.ldso 2007-10-09 15:03:20.000000000 -0600
+++ anaconda-11.3.0.37/scripts/upd-instroot 2007-10-09 15:15:44.000000000 -0600
@@ -74,10 +74,10 @@
# this is a hack, but the only better way requires binutils or elfutils
# be installed. i.e., we need readelf to find the interpretter.
if [ -z "$LDSO" ]; then
- for ldso in /lib*/ld*.so* ; do
+ for ldso in $root/lib*/ld*.so* ; do
[ -x $ldso ] || continue
$ldso --verify $bin >/dev/null 2>&1 || continue
- LDSO=$(echo $ldso |sed -e "s/$root//")
+ LDSO=$(echo $ldso |sed -e "s,$root,,")
break
done
fi
@@ -90,8 +90,8 @@
FILES[$n]="$FILE"
let n++
done << EOF
- $(LD_TRACE_PRELINKING=1 LD_WARN= LD_TRACE_LOADED_OBJECTS=1 \
- chroot $root $LDSO $bin 2>/dev/null)
+ $(chroot $root env LD_TRACE_PRELINKING=1 LD_WARN= \
+ LD_TRACE_LOADED_OBJECTS=1 $LDSO $bin)
EOF
[ ${#FILES[*]} -eq 0 ] && return 1
@@ -132,12 +132,14 @@
done
DSO_DEPS="${FILES[@]}"
+ [ -n "$DEBUG" ] && echo "DSO_DEPS for $bin are $DSO_DEPS"
}
instFile() {
FILE=$1
DESTROOT=$2
+ [ -n "$DEBUG" ] && echo "Installing $FILE"
if [ -e $DESTROOT/$FILE -o -h $DESTROOT/$FILE ]; then
return
elif [ ! -d $DESTROOT/`dirname $FILE` ]; then
@@ -145,7 +147,7 @@
fi
if [ -L $FILE ]; then
cp -al $FILE $DESTROOT/`dirname $FILE`
- instFile `readlink $FILE`
+ instFile ./`dirname $FILE`/`readlink $FILE`
return
else
cp -aL $FILE $DESTROOT/`dirname $FILE`
@@ -154,7 +156,7 @@
get_dso_deps $(pwd) "$FILE"
local DEPS="$DSO_DEPS"
for x in $DEPS ; do
- instFile $x $DESTROOT
+ instFile ./$x $DESTROOT
done
}
@@ -394,63 +408,19 @@
etc/passwd
etc/iscsid.conf
etc/mke2fs.conf
-etc/pcmcia/*
+etc/pcmcia
etc/protocols
etc/services
etc/selinux/targeted/booleans
etc/selinux/targeted/policy/policy.*
-etc/selinux/targeted/contexts/files/*
-etc/selinux/targeted/contexts/*
-etc/selinux/targeted/*
-usr/share/selinux/targeted/*
+etc/selinux/targeted/contexts/files
+etc/selinux/targeted/contexts
+etc/selinux/targeted
+usr/share/selinux/targeted
etc/security/selinux/policy.*
etc/security/selinux/file_contexts
etc/yum/pluginconf.d/fedorakmod.conf
-$LIBDIR/bdevid/*
-$LIBDIR/libaudit*.so*
-$LIBDIR/libc[-.]*
-$LIBDIR/libm[-.]*
-$LIBDIR/libpthread*
-$LIBDIR/librt[-.]*
-$LIBDIR/ld*.so*
-$LIBDIR/libblkid*
-$LIBDIR/libbz2*
-$LIBDIR/libcom_err*
-$LIBDIR/libcrypt*
-$LIBDIR/libdb-*
-$LIBDIR/libdevmapper*
-$LIBDIR/libdl*
-$LIBDIR/libe2p*
-$LIBDIR/libexpat*
-$LIBDIR/libext2fs*
-$LIBDIR/libkeyutils*
-$LIBDIR/liblvm-10.so*
-$LIBDIR/libgcc_s*
-$LIBDIR/libnsl*
-$LIBDIR/libnss_dns*
-$LIBDIR/libnss_files*
-$LIBDIR/libpam*
-$LIBDIR/libpcre*
-$LIBDIR/libresolv*
-$LIBDIR/libselinux*
-$LIBDIR/libsemanage*
-$LIBDIR/libsepol*
-$LIBDIR/libss*
-$LIBDIR/libtermcap*
-$LIBDIR/libhandle*
-$LIBDIR/libattr*
-$LIBDIR/libdm*
-$LIBDIR/libutil*
-$LIBDIR/libuuid*
-$LIBDIR/libglib*
-$LIBDIR/libgmodule*
-$LIBDIR/libgobject*
-$LIBDIR/libgthread*
-$LIBDIR/libncurses*
-$LIBDIR/libvolume_id*
-$LIBDIR/libtinfo*
-$LIBDIR/libz.*
-lib/terminfo/*
+lib/terminfo
sbin/badblocks
sbin/busybox.anaconda
sbin/clock
@@ -505,58 +475,13 @@
usr/bin/hcopy
usr/bin/hattrib
usr/bin/hformat
-usr/lib/anaconda-runtime/*
-usr/lib/anaconda/*
-usr/lib/anaconda/installclasses/*
-usr/lib/anaconda/textw/*
-usr/lib/booty/*
-usr/kerberos/$LIBDIR/libkrb5.so*
-usr/kerberos/$LIBDIR/libkrb5support.so*
-usr/kerberos/$LIBDIR/libk5crypto.so*
-usr/kerberos/$LIBDIR/libcom_err.so*
-usr/kerberos/$LIBDIR/libgssapi_krb5.so*
-usr/$LIBDIR/libbdevid.so*
-usr/$LIBDIR/libdmraid.so*
-usr/$LIBDIR/libkrb5.so*
-usr/$LIBDIR/libkrb5support.so*
-usr/$LIBDIR/libk5crypto.so*
-usr/$LIBDIR/libcom_err.so*
-usr/$LIBDIR/libgssapi_krb5.so*
-usr/$LIBDIR/gconv/ISO8859-1.so
-usr/$LIBDIR/gconv/gconv-modules
-usr/$LIBDIR/libbeecrypt*
-usr/$LIBDIR/libssl*
-usr/$LIBDIR/libcrypto*
-usr/$LIBDIR/libdhcp*
-usr/$LIBDIR/libelf*
-usr/$LIBDIR/libnash*
-usr/$LIBDIR/libncurses*
-usr/$LIBDIR/libnewt*
-usr/$LIBDIR/libnl*
-usr/$LIBDIR/libnss3.so
-usr/$LIBDIR/libparted*
-usr/$LIBDIR/libpopt*
-$LIBDIR/libpopt*
-usr/$LIBDIR/libpython*
-usr/$LIBDIR/libneon*
-usr/$LIBDIR/libnspr*
-usr/$LIBDIR/libplc4*
-usr/$LIBDIR/libplds4*
-usr/$LIBDIR/libsqlite3*
-usr/$LIBDIR/libsoftokn3*
-usr/$LIBDIR/librpm-*4.?.so*
-usr/$LIBDIR/librpmbuild-*4.?.so*
-usr/$LIBDIR/librpmdb*4.?.so*
-usr/$LIBDIR/librpmio*4.?.so*
-usr/$LIBDIR/libslang*
-usr/$LIBDIR/libstdc++.so.6*
-usr/$LIBDIR/libuser.so*
-usr/$LIBDIR/libuser/*
-usr/$LIBDIR/libxml2.so*
-usr/$LIBDIR/libz.*
-usr/$LIBDIR/libreadline*
-usr/$LIBDIR/python?.?/*
-usr/$LIBDIR/python?.?/email/*
+usr/lib/anaconda-runtime
+usr/lib/anaconda
+usr/lib/anaconda/installclasses
+usr/lib/anaconda/textw
+usr/lib/booty
+usr/$LIBDIR/python?.?
+usr/$LIBDIR/python?.?/email
usr/$LIBDIR/python?.?/xml/etree/
usr/$LIBDIR/python?.?/site-packages/*kudzu*
usr/$LIBDIR/python?.?/site-packages/bdevid.so
@@ -571,16 +496,16 @@
usr/$LIBDIR/python?.?/site-packages/block
usr/$LIBDIR/python?.?/site-packages/*.pth
usr/$LIBDIR/python?.?/site-packages/*selinux*
-usr/lib/locale/*
-usr/lib/python?.?/site-packages/elementtree/*
-usr/lib/python?.?/site-packages/iniparse/*
-usr/lib/python?.?/site-packages/rpmUtils/*
-usr/lib/python?.?/site-packages/urlgrabber/*
-usr/lib/python?.?/site-packages/yum/*
-usr/lib/python?.?/site-packages/repomd/*
-usr/lib/python?.?/site-packages/pirut/*
-usr/lib/python?.?/site-packages/pykickstart/*
-usr/lib/python?.?/site-packages/rhpxl/*
+usr/lib/locale
+usr/lib/python?.?/site-packages/elementtree
+usr/lib/python?.?/site-packages/iniparse
+usr/lib/python?.?/site-packages/rpmUtils
+usr/lib/python?.?/site-packages/urlgrabber
+usr/lib/python?.?/site-packages/yum
+usr/lib/python?.?/site-packages/repomd
+usr/lib/python?.?/site-packages/pirut
+usr/lib/python?.?/site-packages/pykickstart
+usr/lib/python?.?/site-packages/rhpxl
usr/lib/rpm/macros
usr/lib/rpm/rpmpopt
usr/lib/rpm/rpmrc
@@ -612,7 +537,7 @@
usr/share/terminfo/v/vt100-nav
usr/share/hwdata/pci.ids
usr/share/hwdata/videoaliases
-usr/share/hwdata/videoaliases/*
+usr/share/hwdata/videoaliases
usr/share/hwdata/videodrivers
usr/share/hwdata/MonitorsDB
usr/share/xorg/extramodes
@@ -656,36 +581,13 @@
bin/cat
bin/chmod
bin/sort
-$LIBDIR/libpam.so*
-$LIBDIR/libdl.so*
-$LIBDIR/libdl-*.so*
-usr/$LIBDIR/libz.so*
-$LIBDIR/libnsl.so*
-$LIBDIR/libnsl-*.so*
-$LIBDIR/libnss*
-$LIBDIR/libutil.so*
-$LIBDIR/libutil-*.so*
-$LIBDIR/libcrypt*
-$LIBDIR/libc.so*
-$LIBDIR/libc-*so*
-lib/ld*.so*
-$LIBDIR/ld*.so*
-$LIBDIR/libresolv.so*
-$LIBDIR/libresolv-*.so*
-$LIBDIR/libvtoc*.so*
-$LIBDIR/libz.so*
-lib/modules/ibm/*
+lib/modules/ibm
etc/pam.d/sshd
etc/pam.d/other
etc/security/limits.conf
etc/security/pam_env.conf
lib/security
$LIBDIR/security/pam_*
-usr/$LIBDIR/libwrap.so*
-usr/$LIBDIR/libXmuu.so*
-usr/$LIBDIR/libX11.so*
-usr/$LIBDIR/libXext.so*
-usr/$LIBDIR/libXxf86misc.so*
usr/bin/xauth
EOF
fi
@@ -729,16 +631,11 @@
etc/im_palette.pal
etc/imrc
etc/man.config
-etc/pango/*
-etc/fonts/*
+etc/pango
+etc/fonts
etc/prelink.conf
etc/rpm/macros.prelink
-$LIBDIR/bdevid/*
-$LIBDIR/libacl*
-$LIBDIR/libattr*
-$LIBDIR/libgcc*
-$LIBDIR/libnss_dns*
-$LIBDIR/libproc*
+$LIBDIR/bdevid
sbin/addRamDisk
sbin/addSystemMap
sbin/debugfs
@@ -763,36 +660,13 @@
usr/share/X11/fonts/misc/cursor*
usr/share/X11/fonts/misc/olcursor*
usr/share/X11/fonts/Type1/l047013t*
-usr/share/X11/fonts/Type1/*
+usr/share/X11/fonts/Type1
usr/share/X11/fonts/TTF/GohaTibebZemen.ttf
-usr/share/X11/locale/*
+usr/share/X11/locale
usr/share/X11/rgb*
-usr/share/X11/xkb/*
+usr/share/X11/xkb
usr/$LIBDIR/xserver/SecurityPolicy
-usr/$LIBDIR/libbdevid.so*
-usr/$LIBDIR/libICE*
-usr/$LIBDIR/libSM*
-usr/$LIBDIR/libXaw.so*
-usr/$LIBDIR/libX11*
-usr/$LIBDIR/libXcursor*
-usr/$LIBDIR/libXext*
-usr/$LIBDIR/libXfixes*
-usr/$LIBDIR/libXft*
-usr/$LIBDIR/libXi*
-usr/$LIBDIR/libxkbfile*
-usr/$LIBDIR/libXmu*
-usr/$LIBDIR/libXpm*
-usr/$LIBDIR/libXrandr*
-usr/$LIBDIR/libXrender*
-usr/$LIBDIR/libXt*
-usr/$LIBDIR/libXxf86misc*
-usr/$LIBDIR/liblbxutil*
-usr/$LIBDIR/libXfont*
-usr/$LIBDIR/libfontenc*
-usr/$LIBDIR/libXau*
-usr/$LIBDIR/libXdmcp*
-usr/$LIBDIR/xorg/modules/*
-usr/$LIBDIR/xorg/modules/input/*
+usr/$LIBDIR/xorg/modules
usr/bin/chattr*
usr/bin/fc-cache
usr/bin/gdialog
@@ -816,7 +690,7 @@
usr/bin/vncpasswd
usr/bin/reduce-font
usr/lib/anaconda/iw
-usr/$LIBDIR/gconv/*
+usr/$LIBDIR/gconv
usr/$LIBDIR/gdk-pixbuf/loaders/*xpm*
usr/$LIBDIR/gdk-pixbuf/loaders/*png*
usr/$LIBDIR/gdk-pixbuf/loaders/*la*
@@ -824,47 +698,20 @@
usr/$LIBDIR/gtk-2.0/*/loaders/*xpm*
usr/$LIBDIR/gtk-2.0/*/loaders/*png*
usr/$LIBDIR/gtk-2.0/*/loaders/*la*
-usr/$LIBDIR/gtk-2.0/immodules/
-usr/$LIBDIR/libImlib*
-usr/$LIBDIR/libXft*
-usr/$LIBDIR/libart*
-usr/$LIBDIR/libatk*
-usr/$LIBDIR/libaudio*
-usr/$LIBDIR/libpixman*
-usr/$LIBDIR/libcairo*
-usr/$LIBDIR/libesd*
-usr/$LIBDIR/libfontconfig*
-usr/$LIBDIR/libfreetype*
-usr/$LIBDIR/libgailutil*
-usr/$LIBDIR/libgdk*
-usr/$LIBDIR/libglade*
-usr/$LIBDIR/libgnomecanvas*
-usr/$LIBDIR/libgnomeui*
-usr/$LIBDIR/libgpm*
-usr/$LIBDIR/libgtk*
-usr/$LIBDIR/libjpeg*
-usr/$LIBDIR/libpango*
-usr/$LIBDIR/libpng.so.3*
-usr/$LIBDIR/libpng12.so*
-usr/$LIBDIR/librfb.so*
-usr/$LIBDIR/libstdc++.so.*
-usr/$LIBDIR/libthai*
-usr/$LIBDIR/libxcb.*
-usr/$LIBDIR/libxcb-xlib*
-usr/$LIBDIR/libwrap*
-usr/$LIBDIR/pango/*
-usr/$LIBDIR/python?.?/site-packages/cairo/*
-usr/$LIBDIR/python?.?/site-packages/gtk*/gtk/*
-usr/$LIBDIR/python?.?/site-packages/gtk*/*
+usr/$LIBDIR/gtk-2.0/immodules
+usr/$LIBDIR/pango
+usr/$LIBDIR/python?.?/site-packages/cairo
+usr/$LIBDIR/python?.?/site-packages/gtk*/gtk
+usr/$LIBDIR/python?.?/site-packages/gtk*
usr/$LIBDIR/rpm/rpmpopt
-usr/lib/syslinux/*
-usr/lib/yaboot/*
+usr/lib/syslinux
+usr/lib/yaboot
usr/sbin/chroot
usr/sbin/ddcprobe
usr/sbin/fbset
usr/sbin/prelink
usr/sbin/smartctl
-usr/share/anaconda/*
+usr/share/anaconda
usr/share/firstboot/firstboot_module_window*
usr/share/fonts/dejavu-lgc/DejaVuLGCSans.ttf
usr/share/fonts/dejavu-lgc/DejaVuLGCSans-Bold.ttf
@@ -898,7 +745,7 @@
usr/share/locale/*/LC_MESSAGES/parted.mo
usr/share/locale/*/LC_MESSAGES/pirut.mo
usr/share/locale/*/LC_MESSAGES/zenity.mo
-usr/share/pirut/*
+usr/share/pirut
usr/share/pixmaps/comps/*.png
usr/share/pixmaps/gnome-default-dlg.png
usr/share/pixmaps/gnome-error.png
@@ -907,9 +754,9 @@
usr/share/pixmaps/gnome-warning.png
usr/share/pixmaps/no.xpm
usr/share/pixmaps/yes.xpm
-usr/share/ppc64-utils/*
-usr/share/system-config-keyboard/*
-usr/share/system-config-date/*
+usr/share/ppc64-utils
+usr/share/system-config-keyboard
+usr/share/system-config-date
usr/share/terminfo/x/xterm
usr/share/vte/termcap/xterm
usr/share/zenity
@@ -939,12 +786,7 @@
usr/$LIBDIR/gtk-2.0/modules/libgail.so
usr/libexec/bonobo-activation-server
usr/libexec/at-spi-registryd
-usr/$LIBDIR/libORBit*
-usr/$LIBDIR/libbonobo*
-usr/$LIBDIR/libspi*
-usr/$LIBDIR/libcspi*
-usr/$LIBDIR/bonobo/servers/*
-usr/$LIBDIR/libXevie*
+usr/$LIBDIR/bonobo/servers
EOF
@@ -968,7 +810,7 @@
bin/sync
bin/tar
bin/zcat
-etc/joe/*
+etc/joe
sbin/arp
sbin/depmod
sbin/dmraid.static
@@ -1030,11 +872,6 @@
usr/bin/xargs
usr/bin/groff
usr/bin/iconv
-usr/$LIBDIR/libidn*
-usr/kerberos/$LIBDIR/libgssapi*
-usr/kerberos/$LIBDIR/libkrb5*
-usr/kerberos/$LIBDIR/libk5crypto*
-usr/kerberos/$LIBDIR/libcom_err*
usr/sbin/mtr
usr/sbin/smartctl
usr/sbin/traceroute
@@ -1049,7 +886,7 @@
sbin/grub-set-default
usr/bin/gpart
usr/bin/mbchk
-usr/share/grub/*
+usr/share/grub
EOF
fi
--- anaconda-11.3.0.37/scripts/upd-instroot.cora 2007-10-08 17:56:38.000000000 -0600
+++ anaconda-11.3.0.37/scripts/upd-instroot 2007-10-09 13:13:45.000000000 -0600
@@ -1070,14 +907,6 @@
cat $KEEPFILERESCUE >> $KEEPFILEGR
cat $KEEPFILE >> $KEEPFILEGR
-#
-# filter paths in keepfile lists for use by cpio
-#
-for file in $KEEPFILE $KEEPFILEGR; do
- cat $file | awk '{print $1 "\n./" $1}' > $file-
- mv -f $file- $file
-done
-
yumconf=$(mktemp /tmp/yum.conf.XXXXXX)
cat > $yumconf <<EOF
[main]
--- anaconda-11.3.0.37/scripts/upd-instroot.noscripts 2007-10-08 17:56:38.000000000 -0600
+++ anaconda-11.3.0.37/scripts/upd-instroot 2007-10-09 13:13:45.000000000 -0600
@@ -1085,7 +914,7 @@
gpgcheck=0
plugins=0
reposdir=
-tsflags=nodocs
+tsflags=nodocs noscripts notriggers
[anacondarepo]
name=anaconda repo
--- anaconda-11.3.0.36/scripts/upd-instroot.time 2007-09-25 12:28:37.000000000 -0600
+++ anaconda-11.3.0.36/scripts/upd-instroot 2007-10-08 09:20:58.000000000 -0600
@@ -184,6 +184,7 @@
done
fi
+ echo `date` "Installing files"
pushd $PKGDEST/yumdir >/dev/null
cat $KEEPFILES | while read spec ; do
for filespec in `find . -path "./$spec"` ; do
@@ -1092,13 +1104,15 @@
enabled=1
EOF
-echo "Expanding text packages..."
+echo `date` "Expanding text packages..."
expandPackageSet $yumconf "$RPMS" $DEST $KEEPFILE
+echo `date` "Done Expanding text packages..."
#(cd $DEST; tar cSpf - .) | (cd $DESTGR; tar xSpf -)
-echo "Expanding graphical packages..."
+echo `date` "Expanding graphical packages..."
expandPackageSet $yumconf "$RPMSGR" $DESTGR $KEEPFILEGR
+echo `date` "Done Expanding graphical packages..."
rm -f $yumconf
--- anaconda-11.3.0.37/scripts/upd-instroot.yumdir 2007-10-09 14:10:25.000000000 -0600
+++ anaconda-11.3.0.37/scripts/upd-instroot 2007-10-09 14:10:55.000000000 -0600
@@ -160,32 +160,32 @@
expandPackageSet() {
YUMCONF=$1
- RPMS=$2
- PKGDEST=$3
- KEEPFILES=$4
+ YUMDIR=$2
+ RPMS=$3
+ PKGDEST=$4
+ KEEPFILES=$5
[ -d $PKGDEST ] || die "ERROR: directory missing: $PKGDEST"
- mkdir $PKGDEST/yumdir
- yum -c $YUMCONF -y --installroot=$PKGDEST/yumdir install $RPMS
+ yum -c $YUMCONF -y --installroot=$YUMDIR install $RPMS
# figure out the theme to keep
- if [ -f $PKGDEST/yumdir/etc/gtk-2.0/gtkrc ]; then
- gtktheme=$(grep "gtk-theme-name" $PKGDEST/yumdir/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g')
+ if [ -f $YUMDIR/etc/gtk-2.0/gtkrc ]; then
+ gtktheme=$(grep "gtk-theme-name" $YUMDIR/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g')
echo "usr/share/themes/$gtktheme" >> $KEEPFILES
# find gtk engine needed
- for engine in `grep engine $PKGDEST/yumdir/usr/share/themes/$gtktheme/gtk-2.0/gtkrc | awk {'print $2;'} | sed -e 's/"//g' | sort -u` ; do
+ for engine in `grep engine $YUMDIR/usr/share/themes/$gtktheme/gtk-2.0/gtkrc | awk {'print $2;'} | sed -e 's/"//g' | sort -u` ; do
echo "usr/$LIBDIR/gtk-2.0/*/engines/*$engine*" >> $KEEPFILES
done
- theme=$(grep "gtk-icon-theme-name" $PKGDEST/yumdir/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g')
+ theme=$(grep "gtk-icon-theme-name" $YUMDIR/etc/gtk-2.0/gtkrc | awk {'print $3;'} | sed -e 's/"//g')
while [ -n "$theme" ]; do
echo "usr/share/icons/$theme" >> $KEEPFILES
- theme=$(grep Inherits $PKGDEST/yumdir/usr/share/icons/$theme/index.theme | cut -d = -f 2)
+ theme=$(grep Inherits $YUMDIR/usr/share/icons/$theme/index.theme | cut -d = -f 2)
done
fi
echo `date` "Installing files"
- pushd $PKGDEST/yumdir >/dev/null
+ pushd $YUMDIR >/dev/null
cat $KEEPFILES | while read spec ; do
for filespec in `find . -path "./$spec"` ; do
if [ ! -e $filespec ]; then
@@ -197,8 +197,6 @@
done
done
popd >/dev/null
-
- rm -fr $PKGDEST/yumdir
}
die () {
@@ -1085,16 +1083,20 @@
EOF
echo `date` "Expanding text packages..."
-expandPackageSet $yumconf "$RPMS" $DEST $KEEPFILE
+YUMDIR=${TMPDIR:-/tmp}/yumdir.$$
+mkdir -p $YUMDIR/var/log
+mkdir -p $YUMDIR/var/lib/yum
+
+expandPackageSet $yumconf $YUMDIR "$RPMS" $DEST $KEEPFILE
echo `date` "Done Expanding text packages..."
#(cd $DEST; tar cSpf - .) | (cd $DESTGR; tar xSpf -)
echo `date` "Expanding graphical packages..."
-expandPackageSet $yumconf "$RPMSGR" $DESTGR $KEEPFILEGR
+expandPackageSet $yumconf $YUMDIR "$RPMSGR" $DESTGR $KEEPFILEGR
echo `date` "Done Expanding graphical packages..."
-rm -f $yumconf
+rm -rf $yumconf $YUMDIR
# echo "retrieving timezones"
# TZDIR=${TMPDIR:-/tmp}/glibc-timezone-$$