-.TH "PORTAGE" "5" "Aug 2010" "Portage VERSION" "Portage"
+.TH "PORTAGE" "5" "Nov 2010" "Portage VERSION" "Portage"
.SH NAME
portage \- the heart of Gentoo
.SH "DESCRIPTION"
package.use
package.use.force
package.use.mask
+package.use.unsatisfiable
parent
profile.bashrc
use.force
use.mask
+use.unsatisfiable
virtuals
.fi
.TP
x11\-libs/qt \-mysql
.fi
.TP
+.BR package.use.unsatisfiable
+Per\-package marking of USE flags as potentially unsatisfiable.
+
+.I Note:
+In a cascading profile setup, you can remove USE flags in children
+profiles which were added by parent profiles by prefixing the flag with
+a '\-'.
+
+.I Format:
+.nf
+\- comments begin with # (no inline comments)
+\- one DEPEND atom per line with space-delimited USE flags
+.fi
+
+.I Example:
+.nf
+# KDE is unstable on this architecture
+dev-vcs/subversion kde
+.fi
+.TP
.BR parent
This contains a path to the parent profile. It may be either relative or
absolute. The paths will be relative to the location of the profile. Most
profiles which were added by parent profiles by prefixing the flag with
a '\-'.
+.I Format:
+.nf
+\- comments begin with # (no inline comments)
+\- one USE flag per line
+.fi
+.TP
+.BR use.unsatisfiable
+Some USE flags enable optional dependencies, which are allowed to be
+unsatisfiable in some configurations. This is useful for stable packages,
+which have optional dependencies on unstable packages.
+
+.I Note:
+In a cascading profile setup, you can remove USE flags in children
+profiles which were added by parent profiles by prefixing the flag with
+a '\-'.
+
.I Format:
.nf
\- comments begin with # (no inline comments)
Marius Mauch <genone@gentoo.org>
Mike Frysinger <vapier@gentoo.org>
Drake Wyrm <wyrm@haell.com>
+Arfrever Frehtes Taifersar Arahesis <arfrever@gentoo.org>
.fi
.SH "SEE ALSO"
.BR emerge (1),
# flags from a parent package that is being merged to a $ROOT that is
# different from the one that mysettings represents.
mymasks.update(mysettings.usemask)
+ mymasks.update(mysettings.useunsatisfiable)
mymasks.update(mysettings.archlist())
mymasks.discard(mysettings["ARCH"])
useforce.update(mysettings.useforce)
#--------------------------------
# use.mask _usemask_list
# use.force _useforce_list
- # package.use.mask _pusemask_list
+ # use.unsatisfiable _useunsatisfiable_list
+ # package.use.mask _pusemask_list
# package.use _pkgprofileuse
- # package.use.force _puseforce_list
+ # package.use.force _puseforce_list
+ # package.use.unsatisfiable _puseunsatisfiable_list
#--------------------------------
# user config
#--------------------------------
self._usemask_list = self._parse_profile_files_to_list("use.mask", profiles)
self._useforce_list = self._parse_profile_files_to_list("use.force", profiles)
+ self._useunsatisfiable_list = self._parse_profile_files_to_list("use.unsatisfiable", profiles)
self._pusemask_list = self._parse_profile_files_to_dict("package.use.mask", profiles)
self._pkgprofileuse = self._parse_profile_files_to_dict("package.use", profiles, juststrings=True)
self._puseforce_list = self._parse_profile_files_to_dict("package.use.force", profiles)
+ self._puseunsatisfiable_list = self._parse_profile_files_to_dict("package.use.unsatisfiable", profiles)
self._pusedict = self._parse_user_files_to_extatomdict("package.use", abs_user_config, user_config)
useforce.extend(pkg_useforce)
return frozenset(stack_lists(useforce, incremental=True))
+ def getUseUnsatisfiable(self, pkg=None):
+ if pkg is None:
+ return frozenset(stack_lists(
+ self._useunsatisfiable_list, incremental=True))
+
+ cp = getattr(pkg, "cp", None)
+ if cp is None:
+ cp = cpv_getkey(remove_slot(pkg))
+ useunsatisfiable = []
+ for i, punsatisfiable_dict in enumerate(self._puseunsatisfiable_list):
+ if self._useunsatisfiable_list[i]:
+ useunsatisfiable.append(self._useunsatisfiable_list[i])
+ cpdict = punsatisfiable_dict.get(cp)
+ if cpdict:
+ pkg_useunsatisfiable = ordered_by_atom_specificity(cpdict, pkg)
+ if pkg_useunsatisfiable:
+ useunsatisfiable.extend(pkg_useunsatisfiable)
+ return frozenset(stack_lists(useunsatisfiable, incremental=True))
+
def getPUSE(self, pkg):
cp = getattr(pkg, "cp", None)
if cp is None:
self._non_user_variables = clone._non_user_variables
self.usemask = clone.usemask
self.useforce = clone.useforce
+ self.useunsatisfiable = clone.useunsatisfiable
self.puse = clone.puse
self.user_profile_dir = clone.user_profile_dir
self.local_config = clone.local_config
#Initialize all USE related variables we track ourselves.
self.usemask = self._use_manager.getUseMask()
self.useforce = self._use_manager.getUseForce()
+ self.useunsatisfiable = self._use_manager.getUseUnsatisfiable()
self.configdict["conf"]["USE"] = \
self._use_manager.extract_global_USE_changes( \
self.configdict["conf"].get("USE", ""))
" ".join(self.make_defaults_use)
self.usemask = self._use_manager.getUseMask()
self.useforce = self._use_manager.getUseForce()
+ self.useunsatisfiable = self._use_manager.getUseUnsatisfiable()
self.regenerate()
class _lazy_vars(object):
self.usemask = usemask
has_changed = True
+ useunsatisfiable = self._use_manager.getUseUnsatisfiable(cpv_slot)
+ if useunsatisfiable != self.useunsatisfiable:
+ self.useunsatisfiable = useunsatisfiable
+ has_changed = True
+
oldpuse = self.puse
self.puse = self._use_manager.getPUSE(cpv_slot)
if oldpuse != self.puse:
def _getUseForce(self, pkg):
return self._use_manager.getUseForce(pkg)
+ def _getUseUnsatisfiable(self, pkg):
+ return self._use_manager.getUseUnsatisfiable(pkg)
+
def _getMaskAtom(self, cpv, metadata):
"""
Take a package and return a matching package.mask atom, or None if no
@param metadata: A dictionary of raw package metadata
@type metadata: dict
@rtype: String
- @return: An matching atom string or None if one is not found.
+ @return: A matching atom string or None if one is not found.
"""
return self._mask_manager.getMaskAtom(cpv, metadata["SLOT"])
@param metadata: A dictionary of raw package metadata
@type metadata: dict
@rtype: String
- @return: An matching profile atom string or None if one is not found.
+ @return: A matching profile atom string or None if one is not found.
"""
cp = cpv_getkey(cpv)