summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-11-23 05:47:57 +0000
committerZac Medico <zmedico@gentoo.org>2008-11-23 05:47:57 +0000
commitfa3d711519eb2ab6e4205ea351d54ef908171297 (patch)
tree105b8a7ef36b29196f8610217244dad901453a3f
parentAdd docs for all of the supported commands. (diff)
downloadportage-multirepo-fa3d711519eb2ab6e4205ea351d54ef908171297.tar.gz
portage-multirepo-fa3d711519eb2ab6e4205ea351d54ef908171297.tar.bz2
portage-multirepo-fa3d711519eb2ab6e4205ea351d54ef908171297.zip
Bug #247548 - Remove 'last' and 'lfull' commands since nobody uses them.
Thanks to Alec Warner <antarus@g.o>. svn path=/main/trunk/; revision=12049
-rwxr-xr-xbin/repoman76
-rw-r--r--man/repoman.16
-rw-r--r--pym/repoman/utilities.py2
3 files changed, 3 insertions, 81 deletions
diff --git a/bin/repoman b/bin/repoman
index 820fa9c4..07183b75 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -26,11 +26,6 @@ from itertools import chain, izip
from stat import S_ISDIR, ST_CTIME
try:
- import cPickle as pickle
-except ImportError:
- import pickle
-
-try:
import cStringIO as StringIO
except ImportError:
import StringIO
@@ -151,8 +146,6 @@ def ParseArgs(args, qahelp):
'fix' : 'Fix simple QA issues (stray digests, missing digests)',
'full' : 'Scan directory tree and print all issues (not a summary)',
'help' : 'Show this screen',
- 'last' : 'Remember report from last run',
- 'lfull' : 'Remember report from last run (full listing)',
'manifest' : 'Generate a Manifest (fetches files if necessary)',
'scan' : 'Scan directory tree for QA issues'
}
@@ -228,7 +221,7 @@ def ParseArgs(args, qahelp):
break
if not opts.mode:
- opts.mode = 'full' #default to full
+ opts.mode = 'full'
if opts.mode == 'ci':
opts.mode = 'commit' # backwards compat shortcut
@@ -424,61 +417,8 @@ suspect_rdepend = frozenset([
# file.executable
no_exec = frozenset(["Manifest","ChangeLog","metadata.xml"])
-def last(full=False):
- """Print the results of the last repoman run
- Args:
- full - Print the complete results, if false, print a summary
- Returns:
- Doesn't return (invokes sys.exit()
- """
- #Retrieve and unpickle stats and fails from saved files
- savedf=open(os.path.join(portage.const.CACHE_PATH, 'repo.stats'),'r')
- stats = pickle.load(savedf)
- savedf.close()
- savedf=open(os.path.join(portage.const.CACHE_PATH, 'repo.fails'),'r')
- fails = pickle.load(savedf)
- savedf.close()
-
- #dofail will be set to 1 if we have failed in at least one non-warning category
- dofail=0
- #dowarn will be set to 1 if we tripped any warnings
- dowarn=0
- #dofull will be set if we should print a "repoman full" informational message
- dofull=0
-
- dofull = options.mode not in ("full", "lfull")
-
- for x in qacats:
- if not stats[x]:
- continue
- dowarn = 1
- if x not in qawarnings:
- dofail = 1
-
- print
- print green("RepoMan remembers...")
- print
- style_file = ConsoleStyleFile(sys.stdout)
- console_writer = StyleWriter(file=style_file, maxcol=9999)
- console_writer.style_listener = style_file.new_styles
- f = formatter.AbstractFormatter(console_writer)
- utilities.format_qa_output(f, stats, fails, dofull, dofail, options, qawarnings)
- print
- if dofull:
- print bold("Note: type \"repoman lfull\" for a complete listing of repomans last run.")
- print
- if dowarn and not dofail:
- print green("RepoMan sez:"),"\"You only gave me a partial QA payment last time?\n I took it, but I wasn't happy.\""
- elif not dofail:
- print green("RepoMan sez:"),"\"If everyone were like you, I'd be out of business!\""
- print
- sys.exit(0)
-
options, arguments = ParseArgs(sys.argv, qahelp)
-if options.mode in ('last', 'lfull'):
- last('lfull' in options.mode)
-
# Set this to False when an extraordinary issue (generally
# something other than a QA issue) makes it impossible to
# commit (like if Manifest generation fails).
@@ -1608,24 +1548,12 @@ for x in scanlist:
if options.mode == "manifest":
sys.exit(dofail)
-#Pickle and save results for instant reuse in last and lfull
-if os.access(portage.const.CACHE_PATH, os.W_OK):
- for myobj, fname in (stats, "repo.stats"), (fails, "repo.fails"):
- fpath = os.path.join(portage.const.CACHE_PATH, fname)
- savef = open(fpath, 'w')
- pickle.dump(myobj, savef)
- savef.close()
- portage.apply_secpass_permissions(fpath, gid=portage.portage_gid,
- mode=0664)
-
-# TODO(antarus) This function and last () look familiar ;)
-
#dofail will be set to 1 if we have failed in at least one non-warning category
dofail=0
#dowarn will be set to 1 if we tripped any warnings
dowarn=0
#dofull will be set if we should print a "repoman full" informational message
-dofull = options.mode not in ("full", "lfull")
+dofull = options.mode != 'full'
for x in qacats:
if not stats[x]:
diff --git a/man/repoman.1 b/man/repoman.1
index 14165aae..c6d83d5c 100644
--- a/man/repoman.1
+++ b/man/repoman.1
@@ -59,9 +59,6 @@ Show this screen
.B full
Scan directory tree for QA issues (full listing)
.TP
-.B last
-Remember report from last run
-.TP
.B help
Show this screen
.TP
@@ -71,9 +68,6 @@ Scan directory tree for QA issues (short listing)
.B fix
Fix simple QA issues (stray digests, missing digests)
.TP
-.B lfull
-Remember report from last run (full listing)
-.TP
.B manifest
Generate a Manifest (fetches files if necessary)
.TP
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index cee52186..6003deea 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -211,7 +211,7 @@ def format_qa_output(formatter, stats, fails, dofull, dofail, options, qawarning
Returns:
None (modifies formatter)
"""
- full = options.mode in ("full", "lfull")
+ full = options.mode == 'full'
# we only want key value pairs where value > 0
for category, number in \
itertools.ifilter(lambda myitem: myitem[1] > 0, stats.iteritems()):