#
def has_version(argv):
- """<root> <category/package>
+ """<eroot> <category/package>
Return code 0 if it's available, 1 otherwise.
"""
if (len(argv) < 2):
def best_version(argv):
- """<root> <category/package>
+ """<eroot> <category/package>
Returns category/package-version (without .ebuild).
"""
if (len(argv) < 2):
def mass_best_version(argv):
- """<root> [<category/package>]+
+ """<eroot> [<category/package>]+
Returns category/package-version (without .ebuild).
"""
if (len(argv) < 2):
sys.exit(1)
metadata.__doc__ = """
-<root> <pkgtype> <category/package> [<key>]+
+<eroot> <pkgtype> <category/package> [<key>]+
Returns metadata values for the specified package.
Available keys: %s
""" % ','.join(sorted(x for x in portage.auxdbkeys \
metadata.uses_root = True
def contents(argv):
- """<root> <category/package>
+ """<eroot> <category/package>
List the files that are installed for a given package, with
one file listed on each line. All file names will begin with
- <root>.
+ <eroot>.
"""
if len(argv) != 2:
print("ERROR: expected 2 parameters, got %d!" % len(argv))
contents.uses_root = True
def owners(argv):
- """<root> [<filename>]+
+ """<eroot> [<filename>]+
Given a list of files, print the packages that own the files and which
files belong to each package. Files owned by a package are listed on
the lines below it, indented by a single tab character (\\t). All file
- paths must either start with <root> or be a basename alone.
+ paths must either start with <eroot> or be a basename alone.
Returns 1 if no owners could be found, and 0 otherwise.
"""
if len(argv) < 2:
f = os.path.join(cwd, f)
f = portage.normalize_path(f)
if not is_basename and not f.startswith(eroot):
- sys.stderr.write("ERROR: file paths must begin with <root>!\n")
+ sys.stderr.write("ERROR: file paths must begin with <eroot>!\n")
sys.stderr.flush()
return 2
if is_basename:
owners.uses_root = True
def is_protected(argv):
- """<root> <filename>
+ """<eroot> <filename>
Given a single filename, return code 0 if it's protected, 1 otherwise.
- The filename must begin with <root>.
+ The filename must begin with <eroot>.
"""
if len(argv) != 2:
sys.stderr.write("ERROR: expected 2 parameters, got %d!\n" % len(argv))
f = portage.normalize_path(f)
if not f.startswith(root):
- err.write("ERROR: file paths must begin with <root>!\n")
+ err.write("ERROR: file paths must begin with <eroot>!\n")
err.flush()
return 2
is_protected.uses_root = True
def filter_protected(argv):
- """<root>
+ """<eroot>
Read filenames from stdin and write them to stdout if they are protected.
- All filenames are delimited by \\n and must begin with <root>.
+ All filenames are delimited by \\n and must begin with <eroot>.
"""
if len(argv) != 1:
sys.stderr.write("ERROR: expected 1 parameter, got %d!\n" % len(argv))
f = portage.normalize_path(f)
if not f.startswith(root):
- err.write("ERROR: file paths must begin with <root>!\n")
+ err.write("ERROR: file paths must begin with <eroot>!\n")
err.flush()
errors += 1
continue
filter_protected.uses_root = True
def best_visible(argv):
- """<root> [pkgtype] <atom>
+ """<eroot> [pkgtype] <atom>
Returns category/package-version (without .ebuild).
The pkgtype argument defaults to "ebuild" if unspecified,
otherwise it must be one of ebuild, binary, or installed.
def mass_best_visible(argv):
- """<root> [<category/package>]+
+ """<eroot> [<category/package>]+
Returns category/package-version (without .ebuild).
"""
if (len(argv) < 2):
def all_best_visible(argv):
- """<root>
+ """<eroot>
Returns all best_visible packages (without .ebuild).
"""
if len(argv) < 1:
def match(argv):
- """<root> <atom>
+ """<eroot> <atom>
Returns a \\n separated list of category/package-version.
When given an empty string, all installed packages will
be listed.
match.uses_root = True
def expand_virtual(argv):
- """<root> <atom>
+ """<eroot> <atom>
Returns a \\n separated list of atoms expanded from a
given virtual atom (GLEP 37 virtuals only),
excluding blocker atoms. Satisfied
print(portage.settings[arg])
def get_repos(argv):
- """<root>
- Returns all repos with names (repo_name file) argv[0] = $ROOT
+ """<eroot>
+ Returns all repos with names (repo_name file) argv[0] = $EROOT
"""
if len(argv) < 1:
print("ERROR: insufficient parameters!")
print(" ".join(portage.db[argv[0]]["porttree"].dbapi.getRepositories()))
def get_repo_path(argv):
- """<root> <repo_id>+
- Returns the path to the repo named argv[1], argv[0] = $ROOT
+ """<eroot> <repo_id>+
+ Returns the path to the repo named argv[1], argv[0] = $EROOT
"""
if len(argv) < 2:
print("ERROR: insufficient parameters!")
print(path)
def list_preserved_libs(argv):
- """<root>
+ """<eroot>
Print a list of libraries preserved during a package update in the form
package: path. Returns 1 if no preserved libraries could be found,
0 otherwise.