From 6a2caeb223270f25cbfbe6e94404568ad33a411f Mon Sep 17 00:00:00 2001 From: "John P. Davis" Date: Mon, 12 Jul 2004 14:25:16 +0000 Subject: [PATCH] coded support for the -d (debug) flag which makes catalyst display an emerge -vp list of packages about to be merged git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@410 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 10 +++++++++- catalyst | 6 +++--- targets/embedded/embedded-chroot.sh | 7 ++++++- targets/grp/grp-chroot.sh | 8 +++++++- targets/livecd-stage1/livecd-stage1-chroot.sh | 7 ++++++- targets/stage1/stage1-chroot.sh | 13 ++++++------- targets/stage3/stage3-chroot.sh | 9 +++++++-- targets/tinderbox/tinderbox-chroot.sh | 8 +++++++- 8 files changed, 51 insertions(+), 17 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3dc69aca..bac4fa28 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for gentoo/src/catalyst # Copyright 2002-2004 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.68 2004/07/11 21:22:07 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.69 2004/07/12 14:25:16 zhen Exp $ + + 12 Jul 2004; catalyst, + targets/embedded/embedded-chroot.sh, targets/grp/grp-chroot.sh, + targets/livecd-stage1/livecd-stage1-chroot.sh, + targets/stage1/stage1-chroot.sh, targets/stage3/stage3-chroot.sh, + targets/tinderbox/tinderbox-chroot.sh: + the -d (debug) flag now makes catalyst calculate an emerge -vp of the packages + it is about to merge so that deps and USE flags are more evident 11 Jul 2004; +catalyst, -catalyst.new.py, modules/catalyst_support.py: diff --git a/catalyst b/catalyst index 5211427d..23deb3ba 100755 --- a/catalyst +++ b/catalyst @@ -1,7 +1,7 @@ #!/usr/bin/python # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.42 2004/07/11 21:25:22 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/catalyst,v 1.43 2004/07/12 14:25:16 zhen Exp $ # Maintained in full by John Davis @@ -196,7 +196,7 @@ if __name__ == "__main__": sys.exit(2) if o in ("-d", "--debug"): - debug=True + conf_values["DEBUG"]=1 if o in ("-c", "--config"): myconfig=a @@ -211,7 +211,7 @@ if __name__ == "__main__": myspecfile=a if o in ("-V", "--verbose"): - verbose=True + conf_values["VERBOSE"]=1 # import configuration file and import our main module using those settings parse_config(myconfig) diff --git a/targets/embedded/embedded-chroot.sh b/targets/embedded/embedded-chroot.sh index 0f4db172..2d79c856 100755 --- a/targets/embedded/embedded-chroot.sh +++ b/targets/embedded/embedded-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.4 2004/06/04 14:03:46 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/embedded/embedded-chroot.sh,v 1.5 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -44,4 +44,9 @@ then fi ## START BUILD +if [ "${clst_DEBUG}" ] +then + ROOT=/tmp/mergeroot emerge ${clst_myemergeopts} -vp ${clst_embedded_packages} || exit 1 +fi + ROOT=/tmp/mergeroot emerge ${clst_myemergeopts} ${clst_embedded_packages} || exit 1 diff --git a/targets/grp/grp-chroot.sh b/targets/grp/grp-chroot.sh index 6dccf316..ff4a5be6 100755 --- a/targets/grp/grp-chroot.sh +++ b/targets/grp/grp-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/grp/grp-chroot.sh,v 1.4 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -42,6 +42,12 @@ if [ "${clst_grp_type}" = "pkgset" ] then unset DISTDIR export PKGDIR="/tmp/grp/${clst_grp_target}" + + if [ -n "${clst_DEBUG}" ] + then + emerge --usepkg --buildpkg --noreplace -vp ${clst_grp_packages} || exit 1 + fi + emerge --usepkg --buildpkg --noreplace ${clst_grp_packages} || exit 1 else unset DISTDIR diff --git a/targets/livecd-stage1/livecd-stage1-chroot.sh b/targets/livecd-stage1/livecd-stage1-chroot.sh index 2f6abc1b..bb6a5d47 100755 --- a/targets/livecd-stage1/livecd-stage1-chroot.sh +++ b/targets/livecd-stage1/livecd-stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # 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.3 2004/06/04 14:03:46 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/livecd-stage1/livecd-stage1-chroot.sh,v 1.4 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -44,4 +44,9 @@ USE="build" emerge portage #turn off auto-use: export USE_ORDER="env:conf:defaults" +if [ "${clst_DEBUG}" ] +then + emerge ${clst_emergeopts} -vp ${clst_packages} +fi + emerge ${clst_emergeopts} ${clst_packages} diff --git a/targets/stage1/stage1-chroot.sh b/targets/stage1/stage1-chroot.sh index 9fbcd99b..33bc0e62 100755 --- a/targets/stage1/stage1-chroot.sh +++ b/targets/stage1/stage1-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2004 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.17 2004/06/18 18:06:21 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/stage1-chroot.sh,v 1.18 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -29,12 +29,6 @@ then export clst_myemergeopts="${clst_myemergeopts} --usepkg --buildpkg" fi -# broken, need to figure out how to avoid a portage infinite loop -#if [ -n "${clst_AUTORESUME}" ] && [ -e /tmp/build.log ] -#then -# export clst_myemergeopts="${clst_myemergeopts} --resume" -#fi - # setup our environment export FEATURES="${clst_myfeatures}" export ROOT=${1} @@ -47,4 +41,9 @@ do export clst_buildpkgs="${clst_buildpkgs} ${x}" done +if [ -n "${clst_DEBUG}" ] +then + USE="-* build" emerge ${clst_myemergeopts} -vp --noreplace ${clst_buildpkgs} || exit 1 +fi + USE="-* build" emerge ${clst_myemergeopts} --noreplace ${clst_buildpkgs} || exit 1 diff --git a/targets/stage3/stage3-chroot.sh b/targets/stage3/stage3-chroot.sh index f3306e68..64b91ef0 100755 --- a/targets/stage3/stage3-chroot.sh +++ b/targets/stage3/stage3-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.5 2004/06/18 18:06:21 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage3/stage3-chroot.sh,v 1.6 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -42,5 +42,10 @@ export CONFIG_PROTECT="-*" # portage needs to be merged manually with USE="build" set to avoid frying our # make.conf. emerge system could merge it otherwise. USE="build" emerge portage - + +if [ -n "${clst_DEBUG}" ] +then + emerge ${clst_myemergeopts} -vp system || exit 1 +fi + emerge ${clst_myemergeopts} system || exit 1 diff --git a/targets/tinderbox/tinderbox-chroot.sh b/targets/tinderbox/tinderbox-chroot.sh index f6655db4..79ee7c77 100755 --- a/targets/tinderbox/tinderbox-chroot.sh +++ b/targets/tinderbox/tinderbox-chroot.sh @@ -1,7 +1,7 @@ #!/bin/bash # Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.3 2004/06/04 14:03:46 zhen Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/targets/tinderbox/tinderbox-chroot.sh,v 1.4 2004/07/12 14:25:16 zhen Exp $ /usr/sbin/env-update source /etc/profile @@ -41,7 +41,13 @@ rsync -avx --exclude "/root/" --exclude "/tmp/" --exclude "/usr/portage/" / /tmp for x in ${clst_tinderbox_packages} do + if [ -n "${clst_DEBUG}" ] + then + emerge --usepkg --buildpkg -vp $x + fi + emerge --usepkg --buildpkg $x + if [ "$?" != "0" ] then echo "! $x" >> /tmp/tinderbox.log -- 2.26.2