aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Dolbec <dolsen@gentoo.org>2012-10-21 13:19:40 -0700
committerBrian Dolbec <dolsen@gentoo.org>2012-10-21 13:20:57 -0700
commitfa3edf538d428c5ce0589dfdc96295f640862f95 (patch)
treeb907c97a6b044b8ab9c0feba89f90aed60a6d8dd /pym/gentoolkit/enalyze
parentMinor example changes to equery man page. (diff)
downloadgentoolkit-fa3edf538d428c5ce0589dfdc96295f640862f95.tar.gz
gentoolkit-fa3edf538d428c5ce0589dfdc96295f640862f95.tar.bz2
gentoolkit-fa3edf538d428c5ce0589dfdc96295f640862f95.zip
man page updates thanks to Francesco Turco. Update analyze and rebuild modules to use a new not_implemented() in the ModuleBase class.
Diffstat (limited to 'pym/gentoolkit/enalyze')
-rw-r--r--pym/gentoolkit/enalyze/analyze.py19
-rw-r--r--pym/gentoolkit/enalyze/rebuild.py10
2 files changed, 23 insertions, 6 deletions
diff --git a/pym/gentoolkit/enalyze/analyze.py b/pym/gentoolkit/enalyze/analyze.py
index 7033422..e068351 100644
--- a/pym/gentoolkit/enalyze/analyze.py
+++ b/pym/gentoolkit/enalyze/analyze.py
@@ -165,7 +165,8 @@ class Analyse(ModuleBase):
"""
def __init__(self):
ModuleBase.__init__(self)
- self.module_name = "enalyze"
+ self.command_name = "enalyze"
+ self.module_name = "analyze"
self.options = {
"flags": False,
"keywords": False,
@@ -220,12 +221,16 @@ class Analyse(ModuleBase):
"Causes the action to analyze the installed packages and the"),
(" ",
"USE flags they were installed with"),
+ (" unmask",
+ "Causes the action to analyze the installed packages"),
+ (" ",
+ "for those that need to be unmasked")
]
self.short_opts = "huvpG"
self.long_opts = ("help", "unset", "verbose", "prefix") #, "portage")
self.need_queries = True
self.arg_spec = "Target"
- self.arg_options = ['use', 'pkguse','keywords', 'packages']
+ self.arg_options = ['use', 'pkguse','keywords', 'packages', 'unmask']
self.arg_option = False
self.warning = (
" CAUTION",
@@ -248,6 +253,8 @@ class Analyse(ModuleBase):
self.analyse_keywords()
elif query in ["packages"]:
self.analyse_packages()
+ elif query in ["unmask"]:
+ self.analyse_unmask()
def analyse_flags(self, target):
"""This will scan the installed packages db and analyze the
@@ -435,6 +442,14 @@ class Analyse(ModuleBase):
print()
+ def analyse_unmask(self):
+ """This will scan the installed packages db and analyze the
+ unmasking used for installation and produce a report on them.
+ """
+ self.not_implemented("unmask")
+
+
+
def main(input_args):
"""Common starting method by the analyze master
unless all modules are converted to this class method.
diff --git a/pym/gentoolkit/enalyze/rebuild.py b/pym/gentoolkit/enalyze/rebuild.py
index cd1a08a..778fed4 100644
--- a/pym/gentoolkit/enalyze/rebuild.py
+++ b/pym/gentoolkit/enalyze/rebuild.py
@@ -146,6 +146,7 @@ class Rebuild(ModuleBase):
"""
def __init__(self):
ModuleBase.__init__(self)
+ self.command_name = "enalyze"
self.module_name = "rebuild"
self.options = {
"use": False,
@@ -235,6 +236,7 @@ class Rebuild(ModuleBase):
print((pp.emph(" -- Found ") + pp.number(str(pkg_count)) +
pp.emph(" packages that need entries")))
#print pp.emph(" package.use to maintain their current setting")
+ pkg_keys = []
if pkgs:
pkg_keys = sorted(pkgs)
#print len(pkgs)
@@ -266,8 +268,8 @@ class Rebuild(ModuleBase):
self.save_file(filepath, output.lines)
def rebuild_keywords(self):
- print("Module action not yet available")
- print()
+ #print("Module action not yet available")
+ #print()
"""This will scan the installed packages db and analyze the
keywords used for installation and produce a report on them.
"""
@@ -303,6 +305,7 @@ class Rebuild(ModuleBase):
analyser = self.analyser
)
#print([pkgs[p][0].cpv for p in pkgs])
+ pkg_keys = []
if pkgs:
pkg_keys = sorted(pkgs)
#print(len(pkgs))
@@ -338,8 +341,7 @@ class Rebuild(ModuleBase):
def rebuild_unmask(self):
- print("Module action not yet available")
- print()
+ self.not_implemented("unmask")
def save_file(self, filepath, data):