diff options
author | 2003-12-18 20:19:07 +0000 | |
---|---|---|
committer | 2003-12-18 20:19:07 +0000 | |
commit | 9d9829c175cc26ac368d875bf1ba7a48e5f906f2 (patch) | |
tree | 9c76233dbb910e7f09a3a248b87a7fc6b58719ba | |
parent | Fixes for permissions on $T and added templates and classes for (diff) | |
download | portage-cvs-9d9829c175cc26ac368d875bf1ba7a48e5f906f2.tar.gz portage-cvs-9d9829c175cc26ac368d875bf1ba7a48e5f906f2.tar.bz2 portage-cvs-9d9829c175cc26ac368d875bf1ba7a48e5f906f2.zip |
Added virtual dependency check on each arch.
-rw-r--r-- | ChangeLog | 5 | ||||
-rwxr-xr-x | bin/repoman | 53 |
2 files changed, 44 insertions, 14 deletions
@@ -1,6 +1,9 @@ # ChangeLog for Portage; the Gentoo Linux ports system # Copyright 2000-2003 Gentoo Technologies, Inc.; Distributed under the GPL v2 -# $Id: ChangeLog,v 1.493 2003/12/17 21:01:42 carpaski Exp $ +# $Id: ChangeLog,v 1.494 2003/12/18 20:19:07 nakano Exp $ + + 18 Dec 2003; Masatomo Nakano <nakano@gentoo.org> repoman: Added virtual + dependency check on each arch. 17 Dec 2003; Nicholas Jones <carpaski@gentoo.org> portage.py: Fixed a permission issue involving $T and userpriv. Lockfile touchup. diff --git a/bin/repoman b/bin/repoman index fe66255..56c1ddb 100755 --- a/bin/repoman +++ b/bin/repoman @@ -1,7 +1,7 @@ #!/usr/bin/python -O # Copyright 1999-2003 Gentoo Technologies, Inc. # 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.39 2003/12/10 22:44:07 carpaski Exp $ +# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/bin/repoman,v 1.40 2003/12/18 20:19:07 nakano 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) @@ -489,6 +489,19 @@ elif repolevel==3: caterror(catdir) scanlist.append(catdir+"/"+reposplit[-1]) +profiles={} +descfile=repoman_settings["PORTDIR"]+"/profiles/profiles.desc" +if not os.path.exists(descfile): + raise IOError, "profile.desc does not exist: "+descfile +for x in portage.grabfile(descfile): + if x[0]=="#": + continue + arch=string.split(x) + if len(arch)!=2: + print red("wrong format: \""+x+"\" in "+descfile) + continue + profiles[arch[0]]=arch[1] + stats={} fails={} #objsadded records all object being added to cvs @@ -640,26 +653,40 @@ for x in scanlist: myqakey=missingvars[pos]+".missing" stats[myqakey]=stats[myqakey]+1 fails[myqakey].append(x+"/"+y+".ebuild") - if not catdir+"/"+y in portage.db["/"]["porttree"].dbapi.xmatch("list-visible",x): - #we are testing deps for a masked package; give it some lee-way - suffix="masked" - matchmode="match-all" - else: - suffix="" - matchmode="match-visible" - for mytype,mypos in [["DEPEND",len(missingvars)],["RDEPEND",len(missingvars)+1]]: - mykey=mytype+".bad"+suffix - myvalue=string.join(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,[ mytype ])) + for mytype,mypos in [["DEPEND",len(missingvars)],["RDEPEND",len(missingvars)+1]]: for keyword in string.split(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,["KEYWORDS"])[0]): if (keyword[0]=="-"): continue elif (keyword[0]=="~"): portage.groups=[keyword[1:], keyword] - repoman_settings["ARCH"]=keyword[1:] + arch=keyword[1:] else: portage.groups=[keyword] - repoman_settings["ARCH"]=keyword + arch=keyword + + repoman_settings["ARCH"]=arch + portage.profiledir=repoman_settings["PORTDIR"]+"/profiles/"+profiles[arch] + if (not os.path.exists(portage.profiledir)): + raise IOError, "Profile dir does not exist: "+portage.profiledir + + if (os.path.exists(portage.profiledir+"/use.mask")): + repoman_settings.usemask=portage.grabfile(portage.profiledir+"/use.mask") + repoman_settings.regenerate() + + portage.do_vartree() + portage.db["/"]["porttree"]=portage.portagetree("/",portage.virts) + + if not catdir+"/"+y in portage.db["/"]["porttree"].dbapi.xmatch("list-visible",x): + #we are testing deps for a masked package; give it some lee-way + suffix="masked" + matchmode="match-all" + else: + suffix="" + matchmode="match-visible" + + mykey=mytype+".bad"+suffix + myvalue=string.join(portage.db["/"]["porttree"].dbapi.aux_get(catdir+"/"+y,[ mytype ])) mydep=portage.dep_check(myvalue,portage.db["/"]["porttree"].dbapi,repoman_settings,use="all",mode=matchmode) if mydep[0]==1: |