--- /dev/null
+TODO for portage-2.2 release:
+=============================
+- package set integration in emerge (genone)
+- user interface for preserve-libs FEATURE (genone, fuzzyray?)
sys.exit(2)
try:
print "\n".join(portage.db[argv[0]]["vartree"].dbapi.match(argv[1]))
- except KeyError:
- sys.exit(1)
match.uses_root = True
except portage.exception.PermissionDenied, e:
sys.stderr.write("Permission denied: '%s'\n" % str(e))
sys.exit(e.errno)
+ except ValueError, e:
+ if not e.args or \
+ not hasattr(e.args[0], "__len__") or \
+ len(e.args[0]) < 2:
+ raise
+ # Multiple matches thrown from cpv_expand
+ pkgs = e.args[0]
+ # An error has occurred so we writemsg to stderr and exit nonzero.
+ portage.writemsg("The following packages available:\n", noiselevel=-1)
+ for pkg in pkgs:
+ portage.writemsg("* %s\n" % pkg, noiselevel=-1)
+ portage.writemsg("\nPlease use a more specific atom.\n", noiselevel=-1)
+ sys.exit(1)
main()
\fBDESCRIPTION\fR = \fI"A happy little package"\fR
Should contain a short description of the package.
.TP
+\fBEAPI\fR = \fI"0"\fR
+Defines the ebuild API version to which this package conforms. If not
+defined then it defaults to "0". If portage does not recognize the
+EAPI value then it will mask the package and refuse to perform any
+operations with it since this means that a newer version of portage
+needs to be installed first. For maximum backward compatiblity, a
+package should conform to the lowest possible EAPI. Note that anyone
+who uses the \fBebuild\fR(1) and \fBrepoman\fR(1) commands with this
+package will be required to have a version of portage that recognizes
+the EAPI to which this package conforms.
+.TP
\fBSRC_URI\fR = \fI"http://happy.com/little/${P}.tar.gz"\fR
Contains a list of URI's for the required source files. It can contain
multiple URI's for a single source file. The list is processed in order
problems or are known to have issues on different systems. It resides in
\fI/usr/portage/profiles\fR.
.TP
+.BR EAPI
+The \fBEAPI\fR variable in an \fBebuild\fR(5) file is used to mask packages
+that are not supported by the current version of portage. Packages masked by
+\fBEAPI\fR can only be installed after portage has been upgraded.
+.TP
.BR KEYWORDS
The \fBKEYWORDS\fR variable in an \fBebuild\fR file is also used for masking
a package still in testing. There are architecture\-specific keywords for
mydata = self.auxdb[mylocation][mycpv]
eapi = mydata.get("EAPI","").strip()
if not eapi:
- eapi = 0
- try:
- eapi = int(eapi)
- except ValueError:
- # Non-integer EAPI isn't supported. In case it's supported in
- # the future, assume that it's valid (rather than trigger a
- # regen).
- eapi = None
- if eapi is not None and eapi < 0 and eapi_is_supported(-eapi):
+ eapi = "0"
+ if eapi.startswith("-") and eapi_is_supported(eapi[1:]):
doregen = True
elif emtime != long(mydata.get("_mtime_", 0)):
doregen = True
@rtype: list
@returns: List of files to process
"""
-
- if os.path.isdir(filename):
+ if not os.path.exists(filename):
+ return
+ elif os.path.isdir(filename):
for root, dirs, files in os.walk(filename):
if 'CVS' in dirs:
dirs.remove('CVS')
if format == "strip":
rValue = rValue.strip(" \n\t")
rValue = re.sub("[\s]{2,}", " ", rValue)
- return str(rValue)
+ return rValue.encode("utf_8")
def getMultiTagsText(rootnode, tagname, format):
"""
"""Ensure ebuilds have valid quoting around things like D,FILESDIR, etc..."""
repoman_check_name = 'ebuild.minorsyn'
- ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)')
+ ignore_line = re.compile(r'(^$)|(^\s*#.*)|(^\s*\w+=.*)|(^\s*(local|export)\s+)')
var_names = r'(D|S|T|ROOT|FILESDIR|WORKDIR)'
var_reference = re.compile(r'\$({'+var_names+'}|' + \
r'\$' + var_names + '\W)')