From 20ca4a37cef40418f8e87b703e87cb0da88880b2 Mon Sep 17 00:00:00 2001 From: Chris Gianelloni Date: Thu, 8 Dec 2005 22:24:25 +0000 Subject: [PATCH] Fixes 'too many arguments' error in check_portage_version. git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@952 d1e1f19c-881f-0410-ab34-b69fee027534 --- ChangeLog | 6 +++++- targets/support/chroot-functions.sh | 7 ++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 746b490b..f94cf836 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.439 2005/12/08 22:23:31 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.440 2005/12/08 22:24:25 wolf31o2 Exp $ + + 08 Dec 2005; Chris Gianelloni + targets/support/chroot-functions.sh: + Fixes 'too many arguments' error in check_portage_version. 08 Dec 2005; Eric Edgar modules/generic_stage_target.py: diff --git a/targets/support/chroot-functions.sh b/targets/support/chroot-functions.sh index 77d5a4bc..a6931a57 100755 --- a/targets/support/chroot-functions.sh +++ b/targets/support/chroot-functions.sh @@ -14,9 +14,10 @@ trap "echo SIGKILL signal recieved killing $0 with pid $$;kill -9 $$" SIGKILL trap "echo SIGINT signal recieved killing $0 with pid $$;kill -9 $$" SIGINT check_portage_version(){ - portage_version=`/usr/lib/portage/bin/portageq best_version / sys-apps/portage \ - | cut -d/ -f2 | cut -d- -f2,3` - if [ -n ${portage_version} -a `echo ${portage_version} | cut -d- -f1 | cut -d. -f3` -lt '51' ] + portage_version=`/usr/lib/portage/bin/portageq best_version / \ + sys-apps/portage | cut -d/ -f2 | cut -d- -f2,3` + if [ -n "${portage_version}" -a `echo ${portage_version} | cut -d- -f1 \ + | cut -d. -f3` -lt '51' ] then echo "ERROR: Your portage version is too low in your seed stage. Portage version" echo "2.0.51 or greater is required." -- 2.26.2