summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2011-06-05 19:01:02 -0700
committerZac Medico <zmedico@gentoo.org>2011-06-05 19:01:02 -0700
commitd90686c6b2dff96b883f6e1038e228d2b8351660 (patch)
treeef6cfe99bea2054e30703a4b25bc492296c03adb
parentf584253e0d67417108641361354c619970a724c5 (diff)
downloadportage-d90686c6b2dff96b883f6e1038e228d2b8351660.tar.gz
portage-d90686c6b2dff96b883f6e1038e228d2b8351660.tar.bz2
portage-d90686c6b2dff96b883f6e1038e228d2b8351660.zip
InternalPackageSet: default allow_repo=True
Repo atoms are allowed more often than not, so it makes sense for this class to allow them by default. The Atom constructor and isvalidatom() functions default to allow_repo=False, which is sufficient to ensure that repo atoms are prohibited when necessary.
-rw-r--r--pym/portage/_sets/base.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/pym/portage/_sets/base.py b/pym/portage/_sets/base.py
index b3bb06b4c..c8d3ae405 100644
--- a/pym/portage/_sets/base.py
+++ b/pym/portage/_sets/base.py
@@ -1,4 +1,4 @@
-# Copyright 2007-2010 Gentoo Foundation
+# Copyright 2007-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import sys
@@ -228,7 +228,13 @@ class EditablePackageSet(PackageSet):
raise NotImplementedError()
class InternalPackageSet(EditablePackageSet):
- def __init__(self, initial_atoms=None, allow_wildcard=False, allow_repo=False):
+ def __init__(self, initial_atoms=None, allow_wildcard=False, allow_repo=True):
+ """
+ Repo atoms are allowed more often than not, so it makes sense for this
+ class to allow them by default. The Atom constructor and isvalidatom()
+ functions default to allow_repo=False, which is sufficient to ensure
+ that repo atoms are prohibited when necessary.
+ """
super(InternalPackageSet, self).__init__(allow_wildcard=allow_wildcard, allow_repo=allow_repo)
if initial_atoms != None:
self.update(initial_atoms)