Added patch to build.py for portage 2.1 support.
authorChris Gianelloni <wolf31o2@gentoo.org>
Mon, 17 Apr 2006 21:41:44 +0000 (21:41 +0000)
committerChris Gianelloni <wolf31o2@gentoo.org>
Mon, 17 Apr 2006 21:41:44 +0000 (21:41 +0000)
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@1112 d1e1f19c-881f-0410-ab34-b69fee027534

ChangeLog
targets/stage1/build.py

index 57efc565b782d00a9f49a7c75835a3181c31bb01..8825740677f861dd2a097af338ff8318bd1e8a3d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 # Copyright 2002-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.597 2006/04/17 21:31:56 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.598 2006/04/17 21:41:43 wolf31o2 Exp $
+
+  17 Apr 2006; Chris Gianelloni <wolf31o2@gentoo.org>
+  targets/stage1/build.py:
+  Added patch to build.py for portage 2.1 support.
 
   17 Apr 2006; Chris Gianelloni <wolf31o2@gentoo.org>
   targets/support/kmerge.sh:
index 1ec8e15a2ca4ffb7ea79c83a0621c39bfe229fe1..66cdd31f4be7276992154174c615acacfbf4a804 100755 (executable)
@@ -1,18 +1,22 @@
 #!/usr/bin/python
 # Copyright 1999-2005 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/build.py,v 1.3 2005/07/05 21:53:41 wolf31o2 Exp $
+# $Header: /var/cvsroot/gentoo/src/catalyst/targets/stage1/build.py,v 1.4 2006/04/17 21:41:44 wolf31o2 Exp $
 
-import portage,sys
+import os,portage,sys
 
 # this loads files from the profiles ...
 # wrap it here to take care of the different
 # ways portage handles stacked profiles
+# last case is for portage-2.1_pre*
 def scan_profile(file):
        if "grab_stacked" in dir(portage):
                return portage.grab_stacked(file, portage.settings.profiles, portage.grabfile, incremental_lines=1);
        else:
-               return portage.stack_lists( portage.grab_multiple(file, portage.settings.profiles, portage.grabfile), incremental=1);
+               if "grab_multiple" in dir(portage):
+                       return portage.stack_lists( portage.grab_multiple(file, portage.settings.profiles, portage.grabfile), incremental=1);
+               else:   
+                       return portage.stack_lists( [portage.grabfile_package(os.path.join(x, file)) for x in portage.settings.profiles], incremental=1);
 
 # loaded the stacked packages / packages.build files
 pkgs = scan_profile("packages")