portage_manifest.Manifest()
NOTE: manifestonly and overwrite are useless with manifest2 and
are therefore ignored."""
- global settings
mf = Manifest(mysettings["O"], FetchlistDict(mysettings["O"], mysettings), mysettings["DISTDIR"])
writemsg(">>> Creating Manifest for %s\n" % mysettings["O"])
try:
return (not digestgen(aalist,mysettings,overwrite=1,manifestonly=1))
# See above comment about fetching only when needed
- if not digestcheck(checkme, mysettings, ("strict" in features), (mydo not in ["digest","fetch","unpack"] and settings["PORTAGE_CALLER"] == "ebuild" and "noauto" in features)):
+ if not digestcheck(checkme, mysettings, ("strict" in features),
+ (mydo not in ["digest","fetch","unpack"] and
+ mysettings["PORTAGE_CALLER"] == "ebuild" and "noauto" in features)):
return 1
if mydo=="fetch":
def getmaskingreason(mycpv):
from portage_util import grablines
- global portdb
+ global portdb, settings
mysplit = catpkgsplit(mycpv)
if not mysplit:
raise ValueError("invalid CPV: %s" % mycpv)
return None
def getmaskingstatus(mycpv):
- global portdb
+ global portdb, settings
mysplit = catpkgsplit(mycpv)
if not mysplit:
raise ValueError("invalid CPV: %s" % mycpv)
class portagetree:
def __init__(self,root="/",virtual=None,clone=None):
- global portdb
+ global portdb, settings
if clone:
self.root=clone.root
self.portroot=clone.portroot
def move_ent(self,mylist):
origcp=mylist[1]
newcp=mylist[2]
+ global settings
# sanity check
for cp in [origcp,newcp]:
if not (isvalidatom(cp) and isjustname(cp)):
return returnme
def cpv_all(self,use_cache=1):
+ global settings
returnme=[]
basepath = self.root+VDB_PATH+"/"
if mysettings:
self.mysettings = mysettings
else:
+ global settings
self.mysettings = config(clone=settings)
self.manifestVerifyLevel = None
def populate(self, getbinpkgs=0,getbinpkgsonly=0):
"populates the binarytree"
+ global settings
if (not os.path.isdir(self.pkgdir) and not getbinpkgs):
return 0
if (not os.path.isdir(self.pkgdir+"/All") and not getbinpkgs):
def gettbz2(self,pkgname):
"fetches the package from a remote site, if necessary."
+ global settings
print "Fetching '"+str(pkgname)+"'"
mysplit = string.split(pkgname,"/")
tbz2name = mysplit[1]+".tbz2"
return mykeys
def cleanup_pkgmerge(mypkg,origdir):
+ global settings
shutil.rmtree(settings["PORTAGE_TMPDIR"]+"/binpkgs/"+mypkg)
if os.path.exists(settings["PORTAGE_TMPDIR"]+"/portage/"+mypkg+"/temp/environment"):
os.unlink(settings["PORTAGE_TMPDIR"]+"/portage/"+mypkg+"/temp/environment")
def update_config_files(update_iter):
"""Perform global updates on /etc/portage/package.* and the world file."""
+ global settings
update_files={}
file_contents={}
myxfiles = ["package.mask","package.unmask","package.keywords","package.use"]