summaryrefslogtreecommitdiffstats
path: root/scripts/upd-instroot
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-02-27 22:26:58 -0500
committerJeremy Katz <katzj@redhat.com>2008-02-28 14:55:06 -0500
commit1b04d3026d970814c560d1773cc20581d15eba7f (patch)
treead79b4e539cdd533f61c5f97a84623416b8341ec /scripts/upd-instroot
parent946acebf8f5c48cb205d8904057f8baad632f3a9 (diff)
downloadanaconda-1b04d3026d970814c560d1773cc20581d15eba7f.tar.gz
anaconda-1b04d3026d970814c560d1773cc20581d15eba7f.tar.xz
anaconda-1b04d3026d970814c560d1773cc20581d15eba7f.zip
Take advantage of yum repos being available
Instead of doing tricks with find, use repoquery and yumdownloader to download things like anaconda-runtime and kernels and firmware packages. This also has the nice side effect of letting us run buildinstall against an http repo
Diffstat (limited to 'scripts/upd-instroot')
-rwxr-xr-xscripts/upd-instroot27
1 files changed, 6 insertions, 21 deletions
diff --git a/scripts/upd-instroot b/scripts/upd-instroot
index 71a76b8dd..045eeb2e6 100755
--- a/scripts/upd-instroot
+++ b/scripts/upd-instroot
@@ -50,15 +50,15 @@ while [ $# -gt 0 ]; do
;;
*)
- TOPDIR=$1
+ yumconf=$1
shift
;;
esac
done
-if [ -z "$TOPDIR" ]; then
+if [ -z "$yumconf" ]; then
echo "upd-instroot: updates instimage from a Red Hat RPMS directory"
- echo "usage: $0 [--nogr] [--debug] [--arch arch] <packagedir> [templatedir] [instroot]"
+ echo "usage: $0 [--nogr] [--debug] [--arch arch] [--mindir mindir] [--stg2dir stg2dir] [yumconf]"
exit 1
fi
@@ -76,8 +76,8 @@ if [ -z "$DESTGR" ]; then
DESTGR=`mktemp -d ${TMPDIR:-/tmp}/destgr.XXXXXX`
fi
-if [ ! -d $TOPDIR/repodata ]; then
- echo "Unable to find repodata!"
+if [ ! -f $yumconf ]; then
+ echo "Unable to find yum repo information!"
exit 1
fi
@@ -862,21 +862,6 @@ ln -s /tmp $DESTGR/var/lib/xkb
cat $KEEPFILERESCUE >> $KEEPFILEGR
cat $KEEPFILE >> $KEEPFILEGR
-yumconf=$(mktemp /tmp/yum.conf.XXXXXX)
-cat > $yumconf <<EOF
-[main]
-keepcache=0
-gpgcheck=0
-plugins=0
-reposdir=
-tsflags=nodocs
-
-[anacondarepo]
-name=anaconda repo
-baseurl=file://$TOPDIR
-enabled=1
-EOF
-
echo `date` "Expanding text packages..."
YUMDIR=${TMPDIR:-/tmp}/yumdir.$$
mkdir -p $YUMDIR/var/log
@@ -905,7 +890,7 @@ if [ -n "$NEEDGR" ]; then
EOF
fi
-rm -rf $yumconf $YUMDIR
+rm -rf $YUMDIR
chown -R root:root $DEST $DESTGR
chmod -R a+rX-w $DEST $DESTGR