diff options
author | 2005-04-12 12:23:41 +0000 | |
---|---|---|
committer | 2005-04-12 12:23:41 +0000 | |
commit | de52ff9b68d5b2328ccd57f91e936378eef15770 (patch) | |
tree | 46214d5ef88f1001e1eabbe374f744312b528613 | |
parent | Modified to ignore blockers when using --buildpkgonly. (diff) | |
download | portage-cvs-de52ff9b68d5b2328ccd57f91e936378eef15770.tar.gz portage-cvs-de52ff9b68d5b2328ccd57f91e936378eef15770.tar.bz2 portage-cvs-de52ff9b68d5b2328ccd57f91e936378eef15770.zip |
pym/portage.py: Fixed spelling error. Removed code from portdbapi.gvisible
that was only utilized by repoman's (broken) allmasked check.
bin/portageq pym/portage.py: Utilized PORTAGE_CALLER to only print profile
deprecation notices when emerge first starts up.
bin/repoman: Limited digest.assumed and ebuild.allmasked (by default) to
scans at the package level only. Removed IUSE from required variables.
Fixed duplicate reporting of required variables. Adjusted size limit of
files/* to 20480 bytes. Fixed allmasked check. Removed reinitialization of
each profile at every usage.
bin/dispatch-conf: Replaced shutil.movefile() calls for python-2.2
compatibility.
-rw-r--r-- | ChangeLog | 20 | ||||
-rwxr-xr-x | bin/dispatch-conf | 11 | ||||
-rwxr-xr-x | bin/portageq | 7 | ||||
-rwxr-xr-x | bin/repoman | 41 | ||||
-rw-r--r-- | pym/portage.py | 25 |
5 files changed, 55 insertions, 49 deletions
@@ -1,12 +1,30 @@ # ChangeLog for Portage; the Gentoo Linux ports system # Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Id: ChangeLog,v 1.796.2.87 2005/04/03 07:00:30 jstubbs Exp $ +# $Id: ChangeLog,v 1.796.2.88 2005/04/12 12:23:41 jstubbs Exp $ MAJOR CHANGES in 2.0.51: 1. /var/cache/edb/virtuals is no longer used at all. It's calculated now. 2. /var/cache/edb/world is now /var/lib/portage/world. 3. /etc/portage/profile/virtuals is _USER_ configs only. + 12 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> bin/dispatch-conf: + Replaced shutil.movefile() calls for python-2.2 compatibility. + + 12 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> bin/portageq pym/portage.py: + Utilized PORTAGE_CALLER to only print profile deprecation noticies when + emerge first starts up. + + 12 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> bin/repoman: + Limited digest.assumed and ebuild.allmasked (by default) to scans at + the package level only. Removed IUSE from required variables. Fixed + duplicate reporting of required variables. Adjusted size limit of + files/* to 20480 bytes. Fixed allmasked check. Removed reinitialization + of each profile at every usage. + + 12 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> pym/portage.py: Fixed + spelling error. Removed code from portdbapi.gvisible that was only + utilized by repoman's (broken) allmasked check. + 03 Apr 2005; Jason Stubbs <jstubbs@gentoo.org> bin/emerge: Modified to ignore blockers when using --buildpkgonly. diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 4d99c19..84517da 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -1,7 +1,7 @@ #!/usr/bin/python -O # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/dispatch-conf,v 1.7.2.6 2005/03/23 12:27:27 jstubbs Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/dispatch-conf,v 1.7.2.7 2005/04/12 12:23:41 jstubbs Exp $ # # dispatch-conf -- Integrate modified configs, post-emerge @@ -66,7 +66,8 @@ class dispatch: if self.options.has_key("log-file"): if os.path.exists(self.options["log-file"]): - shutil.move(self.options["log-file"], self.options["log-file"] + '.old') + shutil.copyfile(self.options["log-file"], self.options["log-file"] + '.old') + os.remove(self.options["log-file"]) else: self.options["log-file"] = "/dev/null" @@ -187,7 +188,8 @@ class dispatch: merged = SCRATCH_DIR+"/"+os.path.basename(conf['current']) print os.system (MERGE % (merged, conf ['current'], newconf)) - shutil.move (merged, mrgconf) + shutil.copyfile(merged, mrgconf) + os.remove(merged) mystat = os.lstat(conf['new']) os.chmod(mrgconf, mystat[ST_MODE]) os.chown(mrgconf, mystat[ST_UID], mystat[ST_GID]) @@ -221,7 +223,8 @@ class dispatch: the diff of what changed into the configured log file.""" os.system((DIFF_CONTENTS % (curconf, newconf)) + '>>' + self.options["log-file"]) try: - shutil.move(newconf, curconf) + shutil.copyfile(newconf, curconf) + os.remove(newconf) except (IOError, os.error), why: print >> sys.stderr, 'dispatch-conf: Error renaming %s to %s: %s; fatal' % \ (newconf, curconf, str(why)) diff --git a/bin/portageq b/bin/portageq index b95753a..e84aead 100755 --- a/bin/portageq +++ b/bin/portageq @@ -1,9 +1,10 @@ #!/usr/bin/python -O # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/portageq,v 1.13 2004/10/04 13:56:50 vapier Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/portageq,v 1.13.2.1 2005/04/12 12:23:41 jstubbs Exp $ -import sys +import sys, os +os.environ["PORTAGE_CALLER"] = "portageq" sys.path = ["/usr/lib/portage/pym"]+sys.path import portage,types,string @@ -202,7 +203,7 @@ def envvar(argv): # def usage(): - rev="$Revision: 1.13 $" + rev="$Revision: 1.13.2.1 $" ver=string.split(rev, ' ')[1] print ">>> Portage information query tool -- version "+ver print ">>> Usage: portageq <command> [<option> ...]" diff --git a/bin/repoman b/bin/repoman index 5ae955a..4789799 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1,7 +1,7 @@ #!/usr/bin/python -O # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/repoman,v 1.98.2.14 2005/04/03 07:00:30 jstubbs Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/repoman,v 1.98.2.15 2005/04/12 12:23:41 jstubbs Exp $ # Next to do: dep syntax checking in mask files # Then, check to make sure deps are satisfiable (to avoid "can't find match for" problems) @@ -68,7 +68,7 @@ optionshelp={ qahelp={ "CVS/Entries.IO_error":"Attempting to commit, and an IO error was encountered access the Entries file", "digest.partial":"Digest files do not contain all corresponding URI elements", - "digest.assumed":"Existing digest must be assumed correct", + "digest.assumed":"Existing digest must be assumed correct (Package level only)", "digest.unused":"Digest entry has no matching SRC_URI entry", "digest.fail":"Digest does not match the specified local file", "digest.stray":"Digest files that do not have a corresponding ebuild", @@ -87,7 +87,6 @@ qahelp={ "file.size":"Files in the files directory must be under 20k", "KEYWORDS.missing":"Ebuilds that have a missing KEYWORDS variable", "LICENSE.missing":"Ebuilds that have a missing LICENSE variable", - "IUSE.missing":"Ebuilds that have a missing IUSE variable", "DESCRIPTION.missing":"Ebuilds that have a missing DESCRIPTION variable", "SLOT.missing":"Ebuilds that have a missing SLOT variable", "DEPEND.bad":"User-visible ebuilds with bad DEPEND settings (matched against *visible* ebuilds)", @@ -114,7 +113,7 @@ qahelp={ "LICENSE.invalid":"This ebuild is listing a license that doesnt exist in portages license/ dir.", "KEYWORDS.invalid":"This ebuild contains KEYWORDS that are not listed in profiles/arch.list or for which no valid profile was found", "ebuild.nostable":"There are no ebuilds that are marked as stable for your ARCH", - "ebuild.allmasked":"All ebuilds are masked for this package", + "ebuild.allmasked":"All ebuilds are masked for this package (Package level only)", "ebuild.majorsyn":"This ebuild has a major syntax error that may cause the ebuild to fail partially or fully", "ebuild.minorsyn":"This ebuild has a minor syntax error that contravenes gentoo coding style", "ebuild.badheader":"This ebuild has a malformed header", @@ -147,13 +146,16 @@ qawarnings=[ "metadata.bad" ] -missingvars=["KEYWORDS","LICENSE","DESCRIPTION","SLOT","IUSE"] +missingvars=["KEYWORDS","LICENSE","DESCRIPTION","SLOT"] allvars=portage.auxdbkeys commitmessage=None commitmessagefile=None for x in missingvars: - qacats.append(x+".missing") - qawarnings.append(x+".missing") + x += ".missing" + if x not in qacats: + print "* missingvars values need to be added to qahelp ("+x+")" + qacats.append(x) + qawarnings.append(x) def err(txt): @@ -764,7 +766,7 @@ for x in scanlist: if not portage_checksum.verify_all(myff, mydigests[myf]): stats["digest.fail"] += 1 fails["digest.fail"].append(y+"::"+myf) - else: + elif repolevel == 3: stats["digest.assumed"] += 1 fails["digest.assumed"].append(y+"::"+myf) @@ -784,9 +786,9 @@ for x in scanlist: for z in os.listdir(checkdir+"/files/"+y): filesdirlist.append(y+"/"+z) # current policy is no files over 20k, this is the check. - elif mystat.st_size > 20000: + elif mystat.st_size > 20480: stats["file.size"] += 1 - fails["file.size"].append("("+ str(mystat.st_size/1000) + "K) "+x+"/files/"+y) + fails["file.size"].append("("+ str(mystat.st_size/1024) + "K) "+x+"/files/"+y) if "ChangeLog" not in checkdirlist: stats["changelog.missing"]+=1 @@ -807,6 +809,8 @@ for x in scanlist: stats["metadata.bad"]+=1 fails["metadata.bad"].append(x+"/metadata.xml") + allmasked = True + for y in ebuildlist: if os.stat(checkdir+"/"+y+".ebuild")[0] & 0x0248: stats["file.executable"] += 1 @@ -859,10 +863,6 @@ for x in scanlist: for pos in range(0,len(missingvars)): if portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y, [ missingvars[pos] ] )[0]=="": - if missingvars[pos]=="IUSE": - # We should rewrite here later. See #21544 - if not os.system("egrep '^IUSE=' "+repodir+"/"+x+"/"+y+".ebuild > /dev/null 2>&1"): - continue myqakey=missingvars[pos]+".missing" stats[myqakey]=stats[myqakey]+1 fails[myqakey].append(x+"/"+y+".ebuild") @@ -878,6 +878,7 @@ for x in scanlist: arches.append([keyword, keyword[1:], [keyword[1:], keyword]]) else: arches.append([keyword, keyword, [keyword]]) + allmasked = False baddepsyntax = False badlicsyntax = False @@ -922,7 +923,7 @@ for x in scanlist: os.environ["ACCEPT_KEYWORDS"]="-~"+arch if arch_caches.has_key(prof[0]): - dep_settings, portage.portdb = arch_caches[prof[0]] + dep_settings, portage.portdb, portage.db["/"]["porttree"] = arch_caches[prof[0]] #portage.do_vartree(dep_settings) #dep_settings.regenerate() else: @@ -931,9 +932,9 @@ for x in scanlist: #portage.do_vartree(dep_settings) #dep_settings.regenerate() portage.portdb=portage.portdbapi(portdir, dep_settings) - arch_caches[prof[0]]=[dep_settings, portage.portdb] + portage.db["/"]["porttree"]=portage.portagetree("/",dep_settings.getvirtuals("/")) + arch_caches[prof[0]]=[dep_settings, portage.portdb, portage.db["/"]["porttree"]] - portage.db["/"]["porttree"]=portage.portagetree("/",dep_settings.getvirtuals("/")) ismasked = (catdir+"/"+y not in portage.db["/"]["porttree"].dbapi.xmatch("list-visible",x)) if ismasked: @@ -1115,8 +1116,7 @@ for x in scanlist: #if not portage.portdb.xmatch("bestmatch-visible",x): # stats["ebuild.nostable"]+=1 # fails["ebuild.nostable"].append(x) - portage.groups=["*"] - if not portage.portdb.xmatch("list-visible",x): + if allmasked and repolevel == 3: stats["ebuild.allmasked"]+=1 fails["ebuild.allmasked"].append(x) @@ -1148,8 +1148,7 @@ for x in qacats: if x not in qawarnings: dofail=1 else: - if mymode!="full": - continue + continue print " "+string.ljust(x,30), if stats[x]==0: print green(`stats[x]`) diff --git a/pym/portage.py b/pym/portage.py index e65fceb..b92cbe2 100644 --- a/pym/portage.py +++ b/pym/portage.py @@ -1,10 +1,10 @@ # portage.py -- core Portage functionality # Copyright 1998-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.51 2005/04/02 14:16:55 jstubbs Exp $ -cvs_id_string="$Id: portage.py,v 1.524.2.51 2005/04/02 14:16:55 jstubbs Exp $"[5:-2] +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/pym/portage.py,v 1.524.2.52 2005/04/12 12:23:41 jstubbs Exp $ +cvs_id_string="$Id: portage.py,v 1.524.2.52 2005/04/12 12:23:41 jstubbs Exp $"[5:-2] -VERSION="$Revision: 1.524.2.51 $"[11:-2] + "-cvs" +VERSION="$Revision: 1.524.2.52 $"[11:-2] + "-cvs" # =========================================================================== # START OF IMPORTS -- START OF IMPORTS -- START OF IMPORTS -- START OF IMPORT @@ -4011,7 +4011,7 @@ def match_from_list(mydep,candidate_list): if ver and rev: operator = get_operator(mydep) if not operator: - writemsg("!!! Invanlid atom: %s\n" % mydep) + writemsg("!!! Invalid atom: %s\n" % mydep) return [] else: operator = None @@ -5113,10 +5113,6 @@ class portdbapi(dbapi): if not mycpv: return "",0 mysplit=mycpv.split("/") - if mysplit[0]=="virtual": - print "!!! Cannot resolve a virtual package name to an ebuild." - print "!!! This is a bug, please report it. ("+mycpv+")" - sys.exit(1) psplit=pkgsplit(mysplit[1]) ret=None @@ -5595,17 +5591,6 @@ class portdbapi(dbapi): elif gp in pgroups: match=1 break - else: - if "*" in pgroups: - for gp in mygroups: - if not gp[0] in "~-": - match=1 - break - if "~*" in pgroups: - for gp in mygroups: - if gp[0] != "-": - match=1 - break if match: newlist.append(mycpv) return newlist @@ -6991,7 +6976,7 @@ if not os.path.exists(root+"var/tmp"): os.umask(022) profiledir=None -if os.path.isdir(PROFILE_PATH): +if "PORTAGE_CALLER" in os.environ and os.environ["PORTAGE_CALLER"] == "emerge" and os.path.isdir(PROFILE_PATH): profiledir = PROFILE_PATH if os.access(DEPRECATED_PROFILE_FILE, os.R_OK): deprecatedfile = open(DEPRECATED_PROFILE_FILE, "r") |