Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 162051 Details for
Bug 233589
sys-apps/portage: Support PROPERTIES="live" for @live-rebuild package set and relevant repoman checks such as LIVEVCS.stable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
portage-VariableSet.patch
portage-VariableSet.patch (text/plain), 6.57 KB, created by
Arfrever Frehtes Taifersar Arahesis (RETIRED)
on 2008-08-03 00:18:29 UTC
(
hide
)
Description:
portage-VariableSet.patch
Filename:
MIME Type:
Creator:
Arfrever Frehtes Taifersar Arahesis (RETIRED)
Created:
2008-08-03 00:18:29 UTC
Size:
6.57 KB
patch
obsolete
>Index: doc/config/sets.docbook >=================================================================== >--- doc/config/sets.docbook (revision 11319) >+++ doc/config/sets.docbook (working copy) >@@ -455,19 +455,6 @@ > </para> > </sect3> > </sect2> >- <sect2 id='config-set-classes-InheritSet'> >- <title>portage.sets.dbapi.InheritSet</title> >- <para> >- Package set which contains all packages >- that inherit one or more specific eclasses. >- This class supports the following options: >- <itemizedlist> >- <listitem><varname>inherits</varname>: Required. A list of eclass names >- which should be used to create the package set. >- </listitem> >- </itemizedlist> >- </para> >- </sect2> > <sect2 id='config-set-classes-OwnerSet'> > <title>portage.sets.dbapi.OwnerSet</title> > <para> >@@ -481,20 +468,23 @@ > </itemizedlist> > </para> > </sect2> >- <sect2 id='config-set-classes-RestrictSet'> >- <title>portage.sets.dbapi.RestrictSet</title> >+ <sect2 id='config-set-classes-VariableSet'> >+ <title>portage.sets.dbapi.VariableSet</title> > <para> > Package set which contains all packages >- that match specified RESTRICT values. >+ that match specified values of specified variable. > This class supports the following options: > <itemizedlist> >+ <listitem><varname>variable</varname>: The name of >+ the specified variable whose values are checked. >+ </listitem> > <listitem><varname>includes</varname>: A list of >- values that must be contained within the RESTRICT >- metadata. >+ values that must be contained within the specified >+ variable. > </listitem> > <listitem><varname>excludes</varname>: A list of >- values that must not be contained within the RESTRICT >- metadata. >+ values that must not be contained within the specified >+ variable. > </listitem> > </itemizedlist> > </para> >@@ -545,7 +535,7 @@ > <listitem><varname>security</varname>: uses <classname>NewAffectedSet</classname> with default options</listitem> > <listitem><varname>everything</varname>: uses <classname>EverythingSet</classname></listitem> > <listitem><varname>preserved-rebuild</varname>: uses <classname>PreservedLibraryConsumerSet</classname></listitem> >- <listitem><varname>live-rebuild</varname>: uses <classname>InheritSet</classname></listitem> >+ <listitem><varname>live-rebuild</varname>: uses <classname>VariableSet</classname></listitem> > <listitem><varname>module-rebuild</varname>: uses <classname>OwnerSet</classname></listitem> > <listitem><varname>downgrade</varname>: uses <classname>DowngradeSet</classname></listitem> > </itemizedlist> >Index: pym/portage/sets/dbapi.py >=================================================================== >--- pym/portage/sets/dbapi.py (revision 11319) >+++ pym/portage/sets/dbapi.py (working copy) >@@ -8,7 +8,7 @@ > from portage.sets import SetConfigError, get_boolean > > __all__ = ["CategorySet", "DowngradeSet", >- "EverythingSet", "InheritSet", "OwnerSet", "RestrictSet"] >+ "EverythingSet", "OwnerSet", "VariableSet"] > > class EverythingSet(PackageSet): > _operations = ["merge", "unmerge"] >@@ -89,63 +89,17 @@ > > singleBuilder = classmethod(singleBuilder) > >-class InheritSet(PackageSet): >+class VariableSet(EverythingSet): > > _operations = ["merge", "unmerge"] > > description = "Package set which contains all packages " + \ >- "that inherit one or more specific eclasses." >+ "that match specified values of specified variable." > >- def __init__(self, portdb=None, vardb=None, inherits=None): >- super(InheritSet, self).__init__() >+ def __init__(self, vardb, portdb=None, variable=None, includes=None, excludes=None): >+ super(VariableSet, self).__init__(vardb) > self._portdb = portdb >- self._db = vardb >- self._inherits = inherits >- >- def load(self): >- atoms = [] >- inherits = self._inherits >- xmatch = self._portdb.xmatch >- xmatch_level = "bestmatch-visible" >- cp_list = self._db.cp_list >- aux_get = self._db.aux_get >- portdb_aux_get = self._portdb.aux_get >- vardb_keys = ["SLOT"] >- portdb_keys = ["INHERITED"] >- for cp in self._db.cp_all(): >- for cpv in cp_list(cp): >- slot, = aux_get(cpv, vardb_keys) >- slot_atom = "%s:%s" % (cp, slot) >- ebuild = xmatch(xmatch_level, slot_atom) >- if not ebuild: >- continue >- inherited, = portdb_aux_get(ebuild, portdb_keys) >- if inherits.intersection(inherited.split()): >- atoms.append(slot_atom) >- >- self._setAtoms(atoms) >- >- def singleBuilder(cls, options, settings, trees): >- if not "inherits" in options: >- raise SetConfigError("no inherits given") >- >- inherits = options["inherits"] >- return cls(portdb=trees["porttree"].dbapi, >- vardb=trees["vartree"].dbapi, >- inherits=frozenset(inherits.split())) >- >- singleBuilder = classmethod(singleBuilder) >- >-class RestrictSet(EverythingSet): >- >- _operations = ["merge", "unmerge"] >- >- description = "Package set which contains all packages " + \ >- "that match specified RESTRICT values." >- >- def __init__(self, vardb, portdb=None, includes=None, excludes=None): >- super(RestrictSet, self).__init__(vardb) >- self._portdb = portdb >+ self._variable = variable > self._includes = includes > self._excludes = excludes > >@@ -153,16 +107,17 @@ > ebuild = self._portdb.xmatch("bestmatch-visible", atom) > if not ebuild: > return False >- restrict, = self._portdb.aux_get(ebuild, ["RESTRICT"]) >- restrict = restrict.split() >- if self._includes and not self._includes.intersection(restrict): >+ values, = self._portdb.aux_get(ebuild, [self._variable]) >+ values = values.split() >+ if self._includes and not self._includes.intersection(values): > return False >- if self._excludes and self._excludes.intersection(restrict): >+ if self._excludes and self._excludes.intersection(values): > return False > return True > > def singleBuilder(cls, options, settings, trees): > >+ variable = options.get("variable", "") > includes = options.get("includes", "") > excludes = options.get("excludes", "") > >@@ -172,7 +127,8 @@ > return cls(trees["vartree"].dbapi, > portdb=trees["porttree"].dbapi, > excludes=frozenset(excludes.split()), >- includes=frozenset(includes.split())) >+ includes=frozenset(includes.split()), >+ variable=variable) > > singleBuilder = classmethod(singleBuilder) > >Index: cnf/sets.conf >=================================================================== >--- cnf/sets.conf (revision 11319) >+++ cnf/sets.conf (working copy) >@@ -47,9 +47,10 @@ > > # Installed ebuilds that inherit from known live eclasses. > [live-rebuild] >-class = portage.sets.dbapi.InheritSet >+class = portage.sets.dbapi.VariableSet > world-candidate = False >-inherits = cvs darcs git mercurial subversion >+variable = RESTRICT >+includes = constant-sources > > # Installed packages that own files inside /lib/modules. > [module-rebuild]
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 233589
:
161911
| 162051