summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-12-05 03:32:31 +0000
committerZac Medico <zmedico@gentoo.org>2007-12-05 03:32:31 +0000
commit117798c67db5e4ef28dab10d266abdb48d237b6c (patch)
tree57516bf1f845bcfb44f96e1732564e83170c8ca5
parentbfe248fc1b3dbb05d6ec3dee01ff24485eee03dd (diff)
downloadportage-117798c67db5e4ef28dab10d266abdb48d237b6c.tar.gz
portage-117798c67db5e4ef28dab10d266abdb48d237b6c.tar.bz2
portage-117798c67db5e4ef28dab10d266abdb48d237b6c.zip
bootstrap.sh expects that the "system" set always exists, so create
it automatically if necessary. svn path=/main/trunk/; revision=8845
-rw-r--r--pym/_emerge/__init__.py17
1 files changed, 14 insertions, 3 deletions
diff --git a/pym/_emerge/__init__.py b/pym/_emerge/__init__.py
index 481906a6c..d95392fde 100644
--- a/pym/_emerge/__init__.py
+++ b/pym/_emerge/__init__.py
@@ -6914,10 +6914,21 @@ def emerge_main():
setconfig = root_config.setconfig
sets = root_config.sets
# emerge relies on the existance of sets with names "world" and "system"
- for s in ("world", "system"):
+ required_sets = ("world", "system")
+ if "system" not in sets:
+ # bootstrap.sh expects that this set always exists
+ from portage.sets.profiles import PackagesSystemSet
+ sets["system"] = PackagesSystemSet(root_config.settings.profiles)
+ if "world" not in sets:
+ from portage.sets.files import WorldSet
+ sets["world"] = WorldSet(root_config.root)
+ for s in required_sets:
if s not in sets:
- print "emerge: incomplete set configuration, no \"%s\" set defined" % s
- print " sets defined: %s" % ", ".join(sets)
+ msg = ["emerge: incomplete set configuration, " + \
+ "no \"%s\" set defined" % s]
+ msg.append(" sets defined: %s" % ", ".join(sets))
+ for line in msg:
+ sys.stderr.write(line + "\n")
return 1
unmerge_actions = ("unmerge", "prune", "clean", "depclean")
# In order to know exactly which atoms/sets should be added to the