From 616d80ae910d93e9471a7eaf2a6798f423d2674a Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 9 Apr 2009 12:09:15 +0100 Subject: Add the -u/--updates option to add an updates repository. --- configure.ac | 2 +- febootstrap.pod | 24 ++++++++++++++++++++++++ febootstrap.sh | 41 +++++++++++++++++++++++++++++++++++++---- 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/configure.ac b/configure.ac index f7aa1fd..9e375d0 100644 --- a/configure.ac +++ b/configure.ac @@ -17,7 +17,7 @@ dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. dnl dnl Written by Richard W.M. Jones -AC_INIT(febootstrap,1.4) +AC_INIT(febootstrap,1.5) AM_INIT_AUTOMAKE AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no]) diff --git a/febootstrap.pod b/febootstrap.pod index 26035b1..109f6a2 100644 --- a/febootstrap.pod +++ b/febootstrap.pod @@ -70,6 +70,30 @@ yum commands inside the filesystem by hand. URL to the proxy server that yum should use. +=item B<-u source> + +=item B<--updates=source> + +Pull in updates from an additional updates repository. The possible +sources are: + +=over 4 + +=item -u C (a URL) + +Get updates from the specific URL. + +=item -u C (an updates repository name) + +Get updates from the public mirrors of the named repository +(eg. C). See REPOSITORIES below. + +=item -u C (default) + +Don't add an updates repository. This is the default. + +=back + =back =head1 REPOSITORIES diff --git a/febootstrap.sh b/febootstrap.sh index c7eeca4..5bdb5db 100755 --- a/febootstrap.sh +++ b/febootstrap.sh @@ -19,8 +19,8 @@ # Written by Richard W.M. Jones TEMP=`getopt \ - -o g:i:p: \ - --long groupinstall:,group-install:,help,install:,noclean,no-clean,proxy: \ + -o g:i:p:u: \ + --long groupinstall:,group-install:,help,install:,noclean,no-clean,proxy:,updates: \ -n febootstrap -- "$@"` if [ $? != 0 ]; then echo "febootstrap: problem parsing the command line arguments" @@ -45,11 +45,14 @@ while true; do -i|--install) packages[i++]="$2" shift 2;; + --groupinstall|--group-install) + packages[i++]="@$2" + shift 2;; -p|--proxy) proxy="proxy=$2" shift 2;; - --groupinstall|--group-install) - packages[i++]="@$2" + -u|--updates) + updates="$2"; shift 2;; --noclean|--no-clean) clean=no @@ -110,6 +113,36 @@ else echo "mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=$repo&arch=$arch" >> "$tmpdir"/febootstrap.repo fi +# Add the updates repository if asked. +case "$updates" in + none|no) + ;; + *://*) + cat >> $tmpdir/febootstrap.repo <> $tmpdir/febootstrap.repo <