summaryrefslogtreecommitdiffstats
path: root/bin/repoman
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-07-21 10:36:55 +0000
committerZac Medico <zmedico@gentoo.org>2007-07-21 10:36:55 +0000
commitdb5c717ee9b67fcd5460bbe8820078b2d32bb222 (patch)
tree30d649b022c2023a72d85ca36f6c0c166f75f506 /bin/repoman
parentcd56cdb4dbc86c88ac92928e4582f2b3d9554f6c (diff)
downloadportage-db5c717ee9b67fcd5460bbe8820078b2d32bb222.tar.gz
portage-db5c717ee9b67fcd5460bbe8820078b2d32bb222.tar.bz2
portage-db5c717ee9b67fcd5460bbe8820078b2d32bb222.zip
For bug #185153, in commit mode do the "Fetching trivial updates" routine before the qa scan.
svn path=/main/trunk/; revision=7338
Diffstat (limited to 'bin/repoman')
-rwxr-xr-xbin/repoman82
1 files changed, 44 insertions, 38 deletions
diff --git a/bin/repoman b/bin/repoman
index 0a6a4e721..6a617191d 100755
--- a/bin/repoman
+++ b/bin/repoman
@@ -521,12 +521,6 @@ for x in range(0,repolevel-1):
def caterror(mycat):
err(mycat+" is not an official category. Skipping QA checks in this directory.\nPlease ensure that you add "+catdir+" to "+repodir+"/profiles/categories\nif it is a new category.")
-if mymode == "manifest":
- pass
-elif "--pretend" in myoptions:
- print green("\nRepoMan does a once-over of the neighborhood...")
-elif quiet < 1:
- print green("\nRepoMan scours the neighborhood...")
def parse_use_local_desc(mylines, usedict=None):
"""returns a dict of the form {cpv:set(flags)}"""
@@ -748,6 +742,49 @@ def x11_deprecation_check(depstr):
return True
return False
+if mymode == "commit":
+ retval = ("","")
+ if isCvs:
+ print
+ print "Performing a " + green("cvs -n up") + \
+ " with a little magic grep to check for updates."
+ retval = getstatusoutput("/usr/bin/cvs -n up 2>&1 | " + \
+ "egrep '^[^\?] .*' | " + \
+ "egrep -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
+
+ mylines = retval[1].splitlines()
+ myupdates = []
+ for x in mylines:
+ if not x:
+ continue
+ if x[0] not in "UPMAR": # Updates,Patches,Modified,Added,Removed
+ print red("!!! Please fix the following issues reported " + \
+ "from cvs: ")+green("(U,P,M,A,R are ok)")
+ print red("!!! Note: This is a pretend/no-modify pass...")
+ print retval[1]
+ print
+ sys.exit(1)
+ elif x[0] in "UP":
+ myupdates.append(x[2:])
+
+ if myupdates:
+ print green("Fetching trivial updates...")
+ if "--pretend" in myoptions:
+ print "(/usr/bin/cvs up "+" ".join(myupdates)+")"
+ retval = os.EX_OK
+ else:
+ retval = os.system("/usr/bin/cvs up " + " ".join(myupdates))
+ if retval != os.EX_OK:
+ print "!!! cvs exited with an error. Terminating."
+ sys.exit(retval)
+
+if mymode == "manifest":
+ pass
+elif "--pretend" in myoptions:
+ print green("\nRepoMan does a once-over of the neighborhood...")
+elif quiet < 1:
+ print green("\nRepoMan scours the neighborhood...")
+
dofail = 0
arch_caches={}
arch_xmatch_caches = {}
@@ -1594,44 +1631,13 @@ else:
print
sys.exit(1)
- retval=["",""]
- if isCvs:
- print "Performing a "+green("cvs -n up")+" with a little magic grep to check for updates."
- retval=getstatusoutput("/usr/bin/cvs -n up 2>&1 | egrep '^[^\?] .*' | egrep -v '^. .*/digest-[^/]+|^cvs server: .* -- ignored$'")
-
- mylines=retval[1].split("\n")
- myupdates=[]
- for x in mylines:
- if not x:
- continue
- if x[0] not in "UPMAR": # Updates,Patches,Modified,Added,Removed
- print red("!!! Please fix the following issues reported from cvs: ")+green("(U,P,M,A,R are ok)")
- print red("!!! Note: This is a pretend/no-modify pass...")
- print retval[1]
- print
- sys.exit(1)
- elif x[0] in ["U","P"]:
- myupdates+=[x[2:]]
-
- if myupdates:
- print green("Fetching trivial updates...")
- if "--pretend" in myoptions:
- print "(/usr/bin/cvs up "+" ".join(myupdates)+")"
- retval=0
- else:
- retval=os.system("/usr/bin/cvs up "+" ".join(myupdates))
- if retval!=0:
- print "!!! cvs exited with an error. Terminating."
- sys.exit(retval)
-
if isCvs:
mycvstree=portage.cvstree.getentries("./",recursive=1)
mychanged=portage.cvstree.findchanged(mycvstree,recursive=1,basedir="./")
mynew=portage.cvstree.findnew(mycvstree,recursive=1,basedir="./")
myremoved=portage.cvstree.findremoved(mycvstree,recursive=1,basedir="./")
if not (mychanged or mynew or myremoved):
- print
- print green("RepoMan sez:"), "\"Doing nothing is not always good for QA.\"\n"
+ print green("RepoMan sez:"), "\"Doing nothing is not always good for QA.\""
print
print "(Didn't find any changed files...)"
print