priority=priority)
return 1
- self.spinner.update()
+ if "--nodeps" not in self.myopts:
+ self.spinner.update()
if mytype == "blocks":
if myparent and \
"--buildpkgonly" not in self.myopts and \
"--exclude=/distfiles", # Exclude distfiles from consideration
"--exclude=/local", # Exclude local from consideration
"--exclude=/packages", # Exclude packages from consideration
- "--filter=H_**/files/digest-*" # Exclude manifest1 digests and delete on the receiving side
+ "--filter=H_**/files/digest-*", # Exclude manifest1 digests and delete on the receiving side
+ "--prune-empty-dirs" # Prune empty ${FILESDIR} when manifest1 digests are excluded
])
else:
elif (servertimestamp == 0) or (servertimestamp > mytimestamp):
# actual sync
mycommand=rsynccommand+" "+dosyncuri+"/ "+myportdir
- exitcode=portage.spawn(mycommand,settings,free=1)
+ mycommand = mycommand.split()
+ exitcode = portage.process.spawn(mycommand,
+ env=settings.environ())
if exitcode in [0,1,2,3,4,11,14,20,21]:
break
elif exitcode in [0,1,2,3,4,11,14,20,21]:
myopts, myaction, myfiles, spinner):
ldpath_mtimes = mtimedb["ldpath"]
favorites=[]
- if "--quiet" not in myopts:
+ if "--quiet" not in myopts and \
+ ("--pretend" in myopts or "--ask" in myopts or \
+ "--tree" in myopts or "--verbose" in myopts):
action = ""
if "--fetchonly" in myopts or "--fetch-all-uri" in myopts:
action = "fetched"
myresumeopts[myopt] = myarg
myopts=myresumeopts
myparams = create_depgraph_params(myopts, myaction)
- if not "--quiet" in myopts:
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "Calculating dependencies ",
mydepgraph = depgraph(settings, trees,
myopts, myparams, spinner)
- if not "--quiet" in myopts:
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "\b\b... done!"
else:
if ("--resume" in myopts):
myparams = create_depgraph_params(myopts, myaction)
if myaction in ["system","world"]:
- if not ("--quiet" in myopts):
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "Calculating",myaction,"dependencies ",
sys.stdout.flush()
mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
if not mydepgraph.xcreate(myaction):
print "!!! Depgraph creation failed."
sys.exit(1)
- if not ("--quiet" in myopts):
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "\b\b... done!"
else:
- if not ("--quiet" in myopts):
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "Calculating dependencies ",
sys.stdout.flush()
mydepgraph = depgraph(settings, trees, myopts, myparams, spinner)
sys.exit(1)
if not retval:
sys.exit(1)
- if not ("--quiet" in myopts):
+ if "--quiet" not in myopts and "--nodeps" not in myopts:
print "\b\b... done!"
if ("--usepkgonly" in myopts) and mydepgraph.missingbins:
sys.exit(1)
if "--pretend" not in myopts and \
+ ("--ask" in myopts or "--tree" in myopts or \
+ "--verbose" in myopts) and \
not ("--quiet" in myopts and "--ask" not in myopts):
if "--resume" in myopts:
validate_merge_list(trees, mtimedb["resume"]["mergelist"])
# backupenv is for calculated incremental variables.
self.backupenv = os.environ.copy()
+ if not local_config:
+ # Clean up pollution from portage.data so that it doesn't
+ # interfere with repoman.
+ self.backupenv.pop("USERLAND", None)
def check_var_directory(varname, var):
if not os.path.isdir(var):
self.configlist.append(os.environ.copy())
self.configdict["env"]=self.configlist[-1]
-
+ if not local_config:
+ # Clean up pollution from portage.data so that it doesn't
+ # interfere with repoman.
+ self.configdict["env"].pop("USERLAND", None)
# make lookuplist for loading package.*
self.lookuplist=self.configlist[:]
writemsg(("!!! Got: %s\n" + \
"!!! Expected: %s\n") % \
(reason[1], reason[2]), noiselevel=-1)
+ if reason[0] == "Insufficient data for checksum verification":
+ return 0
if can_fetch and not restrict_fetch:
writemsg("Refetching...\n\n",
noiselevel=-1)
noiselevel=-1)
writemsg("!!! Got: %s\n!!! Expected: %s\n" % \
(reason[1], reason[2]), noiselevel=-1)
+ if reason[0] == "Insufficient data for checksum verification":
+ return 0
writemsg("Removing corrupt distfile...\n", noiselevel=-1)
os.unlink(mysettings["DISTDIR"]+"/"+myfile)
fetched=0
# Distributed under the terms of the GNU General Public License v2
# $Id: portage_checksum.py 3835 2006-07-11 00:59:10Z zmedico $
+if not hasattr(__builtins__, "set"):
+ from sets import Set as set
from portage.const import PRIVATE_PATH,PRELINK_BINARY,HASHING_BLOCKSIZE
import os
if e.errno == errno.ENOENT:
raise portage.exception.FileNotFound(filename)
return False, (str(e), None, None)
+
+ verifiable_hash_types = set(mydict).intersection(hashfunc_map)
+ verifiable_hash_types.discard("size")
+ if not verifiable_hash_types:
+ expected = set(hashfunc_map)
+ expected.discard("size")
+ expected = list(expected)
+ expected.sort()
+ expected = " ".join(expected)
+ got = set(mydict)
+ got.discard("size")
+ got = list(got)
+ got.sort()
+ got = " ".join(got)
+ return False, ("Insufficient data for checksum verification", got, expected)
+
for x in mydict.keys():
if x == "size":
continue