Add the -u/--updates option to add an updates repository. 1.5
authorRichard Jones <rjones@redhat.com>
Thu, 9 Apr 2009 11:09:15 +0000 (12:09 +0100)
committerRichard Jones <rjones@redhat.com>
Thu, 9 Apr 2009 11:09:15 +0000 (12:09 +0100)
configure.ac
febootstrap.pod
febootstrap.sh

index f7aa1fd..9e375d0 100644 (file)
@@ -17,7 +17,7 @@ dnl Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 dnl
 dnl Written by Richard W.M. Jones <rjones@redhat.com>
 
 dnl
 dnl Written by Richard W.M. Jones <rjones@redhat.com>
 
-AC_INIT(febootstrap,1.4)
+AC_INIT(febootstrap,1.5)
 AM_INIT_AUTOMAKE
 
 AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no])
 AM_INIT_AUTOMAKE
 
 AC_CHECK_PROG(PERLDOC,[perldoc],[perldoc],[no])
index 26035b1..109f6a2 100644 (file)
@@ -70,6 +70,30 @@ yum commands inside the filesystem by hand.
 
 URL to the proxy server that yum should use.
 
 
 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<http://...> (a URL)
+
+Get updates from the specific URL.
+
+=item -u C<updates-released-fN> (an updates repository name)
+
+Get updates from the public mirrors of the named repository
+(eg. C<updates-released-f10>).  See REPOSITORIES below.
+
+=item -u C<none> (default)
+
+Don't add an updates repository.  This is the default.
+
+=back
+
 =back
 
 =head1 REPOSITORIES
 =back
 
 =head1 REPOSITORIES
index c7eeca4..5bdb5db 100755 (executable)
@@ -19,8 +19,8 @@
 # Written by Richard W.M. Jones <rjones@redhat.com>
 
 TEMP=`getopt \
 # Written by Richard W.M. Jones <rjones@redhat.com>
 
 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"
         -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;;
        -i|--install)
            packages[i++]="$2"
            shift 2;;
+       --groupinstall|--group-install)
+           packages[i++]="@$2"
+           shift 2;;
        -p|--proxy)
            proxy="proxy=$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
            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
 
     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 <<EOF
+
+[febootstrap-updates]
+name=febootstrap updates $arch
+failovermethod=priority
+enabled=1
+gpgcheck=0
+$proxy
+baseurl=$updates
+EOF
+       ;;
+    *)
+       cat >> $tmpdir/febootstrap.repo <<EOF
+
+[febootstrap-updates]
+name=febootstrap $updates $arch
+failovermethod=priority
+enabled=1
+gpgcheck=0
+$proxy
+mirrorlist=http://mirrors.fedoraproject.org/mirrorlist?repo=$updates&arch=$arch
+EOF
+       ;;
+esac
+
 # Create the target filesystem.
 rm -rf "$target"
 mkdir "$target"
 # Create the target filesystem.
 rm -rf "$target"
 mkdir "$target"