diff options
-rw-r--r-- | doc/config/sets.docbook | 12 | ||||
-rw-r--r-- | pym/portage/sets/dbapi.py | 13 |
2 files changed, 6 insertions, 19 deletions
diff --git a/doc/config/sets.docbook b/doc/config/sets.docbook index 78546c4cb..d993024bd 100644 --- a/doc/config/sets.docbook +++ b/doc/config/sets.docbook @@ -123,8 +123,8 @@ [installed category packages] class = portage.sets.dbapi.CategorySet multiset = true - repository = vartree name_pattern = $category/* + intersect = installed </programlisting> </para> <!-- TODO: reference list of available set handler classes here --> @@ -437,13 +437,6 @@ <listitem><varname>category</varname>: Required. The name of an existing ebuild category which should be used to create the package set. </listitem> - <listitem><varname>repository</varname>: Optional, defaults to - <parameter>porttree</parameter>. It determines which repository class should - be used to create the package set. Valid values for this option are: - <parameter>porttree</parameter> (normal ebuild repository), - <parameter>vartree</parameter> (installed package repository) - and <parameter>bintree</parameter> (local binary package repository). - </listitem> <listitem><varname>only_visible</varname>: Optional, defaults to <parameter>true</parameter>. When set to <parameter>true</parameter> the set will only include visible packages, when set to <parameter>false</parameter> it will also include masked packages. @@ -523,6 +516,9 @@ values that must not be contained within the specified variable. </listitem> + <listitem><varname>metadata-source</varname>: Optional, defaults to + "vartree". Specifies the repository to use for getting the metadata + to check.</listitem> </itemizedlist> </para> </sect2> diff --git a/pym/portage/sets/dbapi.py b/pym/portage/sets/dbapi.py index 8e4d6983f..4ab1252d6 100644 --- a/pym/portage/sets/dbapi.py +++ b/pym/portage/sets/dbapi.py @@ -201,13 +201,6 @@ class CategorySet(PackageSet): myatoms.append(cp) self._setAtoms(myatoms) - def _builderGetRepository(cls, options, repositories): - repository = options.get("repository", "porttree") - if not repository in repositories: - raise SetConfigError("invalid repository class '%s'" % repository) - return repository - _builderGetRepository = classmethod(_builderGetRepository) - def _builderGetVisible(cls, options): return get_boolean(options, "only_visible", True) _builderGetVisible = classmethod(_builderGetVisible) @@ -220,10 +213,9 @@ class CategorySet(PackageSet): if not category in settings.categories: raise SetConfigError("invalid category name '%s'" % category) - repository = cls._builderGetRepository(options, trees.keys()) visible = cls._builderGetVisible(options) - return CategorySet(category, dbapi=trees[repository].dbapi, only_visible=visible) + return CategorySet(category, dbapi=trees["porttree"].dbapi, only_visible=visible) singleBuilder = classmethod(singleBuilder) def multiBuilder(cls, options, settings, trees): @@ -237,7 +229,6 @@ class CategorySet(PackageSet): else: categories = settings.categories - repository = cls._builderGetRepository(options, trees.keys()) visible = cls._builderGetVisible(options) name_pattern = options.get("name_pattern", "$category/*") @@ -245,7 +236,7 @@ class CategorySet(PackageSet): raise SetConfigError("name_pattern doesn't include $category placeholder") for cat in categories: - myset = CategorySet(cat, trees[repository].dbapi, only_visible=visible) + myset = CategorySet(cat, trees["porttree"].dbapi, only_visible=visible) myname = name_pattern.replace("$category", cat) myname = myname.replace("${category}", cat) rValue[myname] = myset |