summaryrefslogtreecommitdiffstats
path: root/pym/portage
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2012-06-22 16:49:46 -0700
committerZac Medico <zmedico@gentoo.org>2012-06-22 16:49:46 -0700
commitc5142aadedee5b1917607f10d5018b763ef2419b (patch)
treea3487b3dd4931e13c6cad556cf09064f24a073d5 /pym/portage
parentd1a59831eb2a5205d050884c760cca1d73be8fdf (diff)
downloadportage-c5142aadedee5b1917607f10d5018b763ef2419b.tar.gz
portage-c5142aadedee5b1917607f10d5018b763ef2419b.tar.bz2
portage-c5142aadedee5b1917607f10d5018b763ef2419b.zip
Enable /etc/portage/sets for stable, bug #384061.
Diffstat (limited to 'pym/portage')
-rw-r--r--pym/portage/_sets/__init__.py12
-rw-r--r--pym/portage/_sets/files.py13
-rw-r--r--pym/portage/const.py5
-rw-r--r--pym/portage/tests/resolver/test_autounmask.py6
4 files changed, 18 insertions, 18 deletions
diff --git a/pym/portage/_sets/__init__.py b/pym/portage/_sets/__init__.py
index 88a4b3b1b..c3b590e92 100644
--- a/pym/portage/_sets/__init__.py
+++ b/pym/portage/_sets/__init__.py
@@ -1,4 +1,4 @@
-# Copyright 2007-2011 Gentoo Foundation
+# Copyright 2007-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import print_function
@@ -111,16 +111,26 @@ class SetConfig(object):
"""
parser = self._parser
+ parser.remove_section("world")
parser.add_section("world")
parser.set("world", "class", "portage.sets.base.DummyPackageSet")
parser.set("world", "packages", "@selected @system")
+ parser.remove_section("selected")
parser.add_section("selected")
parser.set("selected", "class", "portage.sets.files.WorldSelectedSet")
+ parser.remove_section("system")
parser.add_section("system")
parser.set("system", "class", "portage.sets.profiles.PackagesSystemSet")
+ parser.remove_section("usersets")
+ parser.add_section("usersets")
+ parser.set("usersets", "class", "portage.sets.files.StaticFileSet")
+ parser.set("usersets", "multiset", "true")
+ parser.set("usersets", "directory", "%(PORTAGE_CONFIGROOT)setc/portage/sets")
+ parser.set("usersets", "world-candidate", "true")
+
def update(self, setname, options):
parser = self._parser
self.errors = []
diff --git a/pym/portage/_sets/files.py b/pym/portage/_sets/files.py
index f19ecf6ce..b891ea4f4 100644
--- a/pym/portage/_sets/files.py
+++ b/pym/portage/_sets/files.py
@@ -1,4 +1,4 @@
-# Copyright 2007-2011 Gentoo Foundation
+# Copyright 2007-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import errno
@@ -11,7 +11,6 @@ from portage import _unicode_decode
from portage import _unicode_encode
from portage.util import grabfile, write_atomic, ensure_dirs, normalize_path
from portage.const import USER_CONFIG_PATH, WORLD_FILE, WORLD_SETS_FILE
-from portage.const import _ENABLE_SET_CONFIG
from portage.localization import _
from portage.locks import lockfile, unlockfile
from portage import portage_gid
@@ -231,9 +230,8 @@ class WorldSelectedSet(EditablePackageSet):
write_atomic(self._filename,
"".join(sorted("%s\n" % x for x in self._atoms)))
- if _ENABLE_SET_CONFIG:
- write_atomic(self._filename2,
- "".join(sorted("%s\n" % x for x in self._nonatoms)))
+ write_atomic(self._filename2,
+ "".join(sorted("%s\n" % x for x in self._nonatoms)))
def load(self):
atoms = []
@@ -263,9 +261,8 @@ class WorldSelectedSet(EditablePackageSet):
else:
atoms.extend(self._atoms)
- if _ENABLE_SET_CONFIG:
- changed2, nonatoms = self._load2()
- atoms_changed |= changed2
+ changed2, nonatoms = self._load2()
+ atoms_changed |= changed2
if atoms_changed:
self._setAtoms(atoms+nonatoms)
diff --git a/pym/portage/const.py b/pym/portage/const.py
index 3744e111f..3607df0e0 100644
--- a/pym/portage/const.py
+++ b/pym/portage/const.py
@@ -1,5 +1,5 @@
# portage: Constants
-# Copyright 1998-2011 Gentoo Foundation
+# Copyright 1998-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import os
@@ -175,6 +175,3 @@ if not _ENABLE_PRESERVE_LIBS:
SUPPORTED_FEATURES = set(SUPPORTED_FEATURES)
SUPPORTED_FEATURES.remove("preserve-libs")
SUPPORTED_FEATURES = frozenset(SUPPORTED_FEATURES)
-
-if not _ENABLE_SET_CONFIG:
- WORLD_SETS_FILE = '/dev/null'
diff --git a/pym/portage/tests/resolver/test_autounmask.py b/pym/portage/tests/resolver/test_autounmask.py
index 84182ba6a..6acac9984 100644
--- a/pym/portage/tests/resolver/test_autounmask.py
+++ b/pym/portage/tests/resolver/test_autounmask.py
@@ -1,7 +1,6 @@
-# Copyright 2010-2011 Gentoo Foundation
+# Copyright 2010-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-from portage.const import _ENABLE_SET_CONFIG
from portage.tests import TestCase
from portage.tests.resolver.ResolverPlayground import ResolverPlayground, ResolverPlaygroundTestCase
@@ -340,9 +339,6 @@ class AutounmaskTestCase(TestCase):
def testAutounmaskAndSets(self):
- if not _ENABLE_SET_CONFIG:
- return
-
ebuilds = {
#ebuilds to test use changes
"dev-libs/A-1": { },