Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 16713 Details for
Bug 27473
Add last report memory to repoman
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
repoman last report cache patch
repomanmem.diff (text/plain), 3.56 KB, created by
Douglas Russell (RETIRED)
on 2003-08-28 05:35:55 UTC
(
hide
)
Description:
repoman last report cache patch
Filename:
MIME Type:
Creator:
Douglas Russell (RETIRED)
Created:
2003-08-28 05:35:55 UTC
Size:
3.56 KB
patch
obsolete
>--- repoman 2003-08-26 12:27:48.000000000 +0100 >+++ repoman.rem 2003-08-28 12:51:55.000000000 +0100 >@@ -8,11 +8,11 @@ > # that last one is tricky because multiple profiles need to be checked. > > import os,sys >-exename=os.path.basename(sys.argv[0]) >+exename=os.path.basename(sys.argv[0]) > os.environ["PORTAGE_CALLER"]="repoman" > version="1.2" > >-import string,signal,readline,portage,re,cvstree >+import string,signal,readline,portage,re,cvstree,pickle > from output import * > from commands import getstatusoutput > from time import * >@@ -36,14 +36,16 @@ > signal.signal(signal.SIGINT,exithandler) > > REPOROOTS=["gentoo-x86"] >-modes=["scan","fix","full","help","commit"] >+modes=["scan","fix","full","help","commit","last","lfull"] > shortmodes={"ci":"commit"} > modeshelp={ > "scan" :"Scan current directory tree for QA issues (default)", > "fix" :"Fix those issues that can be fixed (stray digests, missing digests)", > "full" :"Scan current directory tree for QA issues (full listing)", > "help" :"Show this screen", >-"commit":"Scan current directory tree for QA issues; if OK, commit via cvs" >+"commit":"Scan current directory tree for QA issues; if OK, commit via cvs", >+"last" :"Remember report from last run", >+"lfull" :"Remember report from last run (full listing)" > } > options=["--pretend","--help","--commitmsg","--commitmsgfile"] > shortoptions={"-m":"--commitmsg","-M":"--commitmsgfile","-p":"--pretend"} >@@ -172,6 +174,63 @@ > print > sys.exit(1) > >+def last(): >+ try: >+ #Retrieve and unpickle stats and fails from saved files >+ savedf=open('/tmp/repo.stats','r') >+ stats = pickle.load(savedf) >+ savedf.close() >+ savedf=open('/tmp/repo.fails','r') >+ fails = pickle.load(savedf) >+ savedf.close() >+ except: >+ err("Error retrieving last repoman run data; exiting.") >+ >+ #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 >+ >+ print >+ print green("RepoMan remembers...") >+ print >+ for x in qacats: >+ if stats[x]: >+ dowarn=1 >+ if x not in qawarnings: >+ dofail=1 >+ else: >+ if mymode!="lfull": >+ continue >+ print " "+string.ljust(x,20), >+ if stats[x]==0: >+ print green(`stats[x]`) >+ continue >+ elif x in qawarnings: >+ print yellow(`stats[x]`) >+ else: >+ print red(`stats[x]`) >+ if mymode!="lfull": >+ if stats[x]<12: >+ for y in fails[x]: >+ print " "+y >+ else: >+ dofull=1 >+ else: >+ for y in fails[x]: >+ print " "+y >+ 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?\nI 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(1) > > mymode=None > myoptions=[] >@@ -204,7 +263,8 @@ > mymode="scan" > if mymode=="help" or ("--help" in myoptions): > help() >- >+if mymode=="last" or (mymode=="lfull"): >+ last() > if not os.path.isdir("CVS"): > err("We do not appear to be inside a local repository. Exiting.") > try: >@@ -554,6 +614,13 @@ > stats["ebuild.allmasked"]+=1 > fails["ebuild.allmasked"].append(x) > >+#Pickle and save results for instant reuse in last and lfull >+savef=open('/tmp/repo.stats','w') >+pickle.dump(stats,savef) >+savef.close() >+savef=open('/tmp/repo.fails','w') >+pickle.dump(fails,savef) >+savef.close() > > print > #dofail will be set to 1 if we have failed in at least one non-warning category
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 27473
:
16713
|
16751
|
16752