Added a -F or --fetchonly command line option and closing out bug #77480. Also added...
authorChris Gianelloni <wolf31o2@gentoo.org>
Tue, 11 Jan 2005 14:10:19 +0000 (14:10 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Tue, 11 Jan 2005 14:10:19 +0000 (14:10 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@515 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
catalyst
targets/embedded/embedded-chroot.sh
targets/grp/grp-chroot.sh
targets/livecd-stage1/livecd-stage1-chroot.sh
targets/livecd-stage1/livecd-stage1.sh
targets/netboot/netboot-packages.sh
targets/stage1/stage1-chroot.sh
targets/stage2/stage2-chroot.sh
targets/stage3/stage3-chroot.sh

index bd145359b058d41ecca86897acc5c826173d650b..ef9e30b401651005bbffbf931aa9ce4ab903a1cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,15 @@
 # ChangeLog for gentoo/src/catalyst 
 # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.142 2005/01/11 13:12:36 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.143 2005/01/11 14:10:18 wolf31o2 Exp $
+
+  11 Jan 2005; Chris Gianelloni <wolf31o2@gentoo.org> catalyst,
+  targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh,
+  targets/livecd-stage1/livecd-stage1-chroot.sh,
+  targets/livecd-stage1/livecd-stage1.sh,
+  targets/netboot/netboot-packages.sh, targets/stage1/stage1-chroot.sh,
+  targets/stage2/stage2-chroot.sh, targets/stage3/stage3-chroot.sh:
+  Added a -F or --fetchonly command line option and closing out bug #77480.
+  Also added a portage version check to livecd-stage1 to close out bug #68307.
 
   11 Jan 2005; Chris Gianelloni <wolf31o2@gentoo.org>
   livecd/runscript-support/livecdfs-update.sh,
index 73fdb0b71039beb4ef7d4a64662cb8ddfe962e43..f6082bf49b210d59e9ae49b424f03dc9b478f858 100755 (executable)
--- a/catalyst
+++ b/catalyst
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.57 2005/01/05 00:17:37 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.58 2005/01/11 14:10:18 wolf31o2 Exp $
 
 # Maintained in full by John Davis <zhen@gentoo.org>
 
@@ -18,6 +18,7 @@ def usage():
        print " -C --cli                catalyst commandline (MUST BE LAST OPTION)"
        print " -d --debug              enable debugging"
        print " -f --file               read specfile"
+       print " -F --fetchonly          fetch files only"
        print " -h --help               print this help message"
        print " -s --snapshot           generate a Portage snapshot"
        print " -v --version            display version information"
@@ -188,8 +189,8 @@ if __name__ == "__main__":
 
        # parse out the command line arguments
        try:
-               opts,args = getopt.getopt(sys.argv[1:], "hvdc:C:f:Vs:", ["help", "version", "debug",\
-                       "config=", "cli=", "file=", "verbose","snapshot="])
+               opts,args = getopt.getopt(sys.argv[1:], "hvdc:C:f:FVs:", ["help", "version", "debug",\
+                       "config=", "cli=", "file=", "fetch", "verbose","snapshot="])
        
        except getopt.GetoptError:
                usage()
@@ -198,6 +199,7 @@ if __name__ == "__main__":
        # defaults for commandline opts
        debug=False
        verbose=False
+       fetch=False
        myconfig=""
        myspecfile=""
        mycmdline=[]
@@ -242,6 +244,14 @@ if __name__ == "__main__":
                        
                if o in ("-f", "--file"):
                        myspecfile=a
+
+               if o in ("-F", "--fetchonly"):
+                       if len(sys.argv) < 3:
+                               print "!!! catalyst: please specify one of either -f or -C\n"
+                               usage()
+                               sys.exit(2)
+                       else:
+                               conf_values["FETCH"]="1"
                        
                if o in ("-V", "--verbose"):
                        if len(sys.argv) < 3:
index 65be6f9ff79063a2dd95385caa9a1ba46abc1e7d..85579d8ad41180f8eb183c0b524f5a456de0d222 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.10 2004/10/15 02:46:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.11 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -27,6 +27,11 @@ then
        export clst_myemergeopts="--usepkg --buildpkg --newuse"
 fi
 
+if [ -n "${clst_FETCH}" ]
+then
+       export clst_myemergeopts="${clst_myemergeopts} -f"
+fi
+
 # setup the environment
 export FEATURES="${clst_myfeatures}"
 export CONFIG_PROTECT="-*"
index 3350b70ad38c53208316a9b1bd05edecbeb80846..4e7f8226acc695896bd1609949d632acfa493f60 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.10 2004/10/15 02:46:58 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.11 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -37,13 +37,18 @@ then
        unset DISTDIR
        export PKGDIR="/tmp/grp/${clst_grp_target}"
 
+       if [ -n "${clst_FETCH}" ]
+       then
+               export clst_myemergeopts="${clst_myemergeopts} -f"
+       fi
+
        if [ -n "${clst_VERBOSE}" ]
        then
-               emerge --usepkg --buildpkg --noreplace --newuse -vp ${clst_grp_packages} || exit 1
+               emerge --usepkg --buildpkg --noreplace --newuse -vp ${clst_myemergeopts} ${clst_grp_packages} || exit 1
                sleep 15
        fi
        
-       emerge --usepkg --buildpkg --noreplace --newuse ${clst_grp_packages} || exit 1
+       emerge --usepkg --buildpkg --noreplace --newuse ${clst_myemergeopts} ${clst_grp_packages} || exit 1
 else
        unset DISTDIR
        #don't grab MS core fonts, etc.
index 18fd89d82d28646b9a3a0d9e4f3e5ad5ce9333d1..5ebcc841d5b14b2a58d8596e540f84a7218a3eaa 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.10 2004/12/15 00:50:35 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.11 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -24,9 +24,14 @@ fi
 
 if [ -n "${clst_PKGCACHE}" ]
 then
-       clst_emergeopts="--usepkg --buildpkg --newuse"
+       export clst_emergeopts="--usepkg --buildpkg --newuse"
 else
-       clst_emergeopts=""
+       export clst_emergeopts=""
+fi
+
+if [ -n "${clst_FETCH}" ]
+then
+       export clst_emergeopts="${clst_emergeopts} -f"
 fi
 
 ## setup the environment
@@ -44,6 +49,15 @@ then
        sleep 15
 fi
 
-for packages in ${clst_packages}; do
-       emerge ${clst_emergeopts} ${packages}
-done
+portage_version=`/usr/lib/portage/bin/portageq best_version / sys-apps/portage \
+       | cut -d/ -f2 | cut -d- -f2,3`
+
+if [ `echo ${portage_version} | cut -d- -f1 | cut -d. -f3` -ge 51 ] &&
+       [ `echo ${portage_version} | cut -d- -f2 | cut -dr -f2` -ge 4 ]
+then
+       emerge ${clst_emergeopts} ${clst_packages}
+else
+       for packages in ${clst_packages}; do
+               emerge ${clst_emergeopts} ${packages}
+       done
+fi
index 0bdc588dd21ac16a46f4cb70217c1cbf5b838b41..363e885abce7efcb3a0b4fe3102bd10c124551a7 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.14 2004/12/16 15:26:22 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/Attic/livecd-stage1.sh,v 1.15 2005/01/11 14:10:19 wolf31o2 Exp $
 
 case $1 in
        enter)
@@ -16,7 +16,7 @@ case $1 in
        ;;
 
        preclean)
-               killall -9 gconfd-2
+               #killall -9 gconfd-2
                #cp ${clst_sharedir}/targets/livecd-stage1/livecd-stage1-preclean-chroot.sh ${clst_chroot_path}/tmp
                #${clst_CHROOT} ${clst_chroot_path} /tmp/livecd-stage1-preclean-chroot.sh || exit 1
                #rm -f ${clst_chroot_path}/tmp/livecd-stage1-preclean-chroot.sh
index 050294b58a873f706a4d98b6b122bb9be6af5fbd..99518c51b99dfe0ab481f7f095bbca370e3a1935 100644 (file)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-packages.sh,v 1.2 2004/10/11 14:19:30 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/netboot/Attic/netboot-packages.sh,v 1.3 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -11,7 +11,12 @@ source /etc/profile
 # setup our environment
 export FEATURES="${clst_myfeatures}"
 export CONFIG_PROTECT="-*"
-export USE_ORDER="env:conf:defaults"   
+export USE_ORDER="env:conf:defaults"
+
+if [ "${clst_FETCH}" ]
+then
+       export clst_myemergeopts="${clst_myemergeopts} -f"
+fi
 
 # START BUILD
 if [ "${clst_VERBOSE}" ]
index c756c8ac0705a654e7e00a95194be2521d3e9c8a..b72477f7f9f159070da856c3725b0ed7306df703 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.25 2004/11/23 00:02:57 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.26 2005/01/11 14:10:19 wolf31o2 Exp $
                
 /usr/sbin/env-update
 source /etc/profile
@@ -27,6 +27,11 @@ then
        export clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg --newuse"
 fi
 
+if [ -n "${clst_FETCH}" ]
+then
+       export clst_myemergeopts="${clst_myemergeopts} -f"
+fi
+
 # setup our environment
 export FEATURES="${clst_myfeatures}"
 export ROOT=${1}
index 48b4115cb4885cc59eb6dde157556b9d1d60e7fe..866348e95faf5f27bf78f5cb3bacacb70d3eecce 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-chroot.sh,v 1.9 2004/11/23 00:02:57 zhen Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage2/stage2-chroot.sh,v 1.10 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -27,6 +27,11 @@ then
        export bootstrap_opts="-r"
 fi
 
+if [ -n "${clst_FETCH}" ]
+then
+       export bootstrap_opts="-f"
+fi
+
 GRP_STAGE23_USE="$(portageq envvar GRP_STAGE23_USE)"
 
 
index 57681b45b21a69a82c15c558538d59d058ca3eec..7865269eabfebee903d0ccd32ef2096f43c9efc5 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/bash
 # Copyright 1999-2004 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.14 2005/01/11 13:12:36 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.15 2005/01/11 14:10:19 wolf31o2 Exp $
 
 /usr/sbin/env-update
 source /etc/profile
@@ -27,6 +27,11 @@ then
        export clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg --newuse"
 fi
 
+if [ -n "${clst_FETCH}" ]
+then
+       export clst_myemergeopts="${clst_myemergeopts} -f"
+fi
+
 GRP_STAGE23_USE="$(portageq envvar GRP_STAGE23_USE)"
 
 # setup the build environment
@@ -41,7 +46,7 @@ USE="build" emerge portage
 
 if [ -n "${clst_VERBOSE}" ]
 then
-       emerge ${clst_myemergeopts} -vp system || exit 1
+       emerge -e ${clst_myemergeopts} -vp system || exit 1
        sleep 15
 fi