public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] portage r10551 - main/trunk/pym/portage
@ 2008-06-03  6:50 Zac Medico (zmedico)
  0 siblings, 0 replies; only message in thread
From: Zac Medico (zmedico) @ 2008-06-03  6:50 UTC (permalink / raw
  To: gentoo-commits

Author: zmedico
Date: 2008-06-03 06:50:32 +0000 (Tue, 03 Jun 2008)
New Revision: 10551

Modified:
   main/trunk/pym/portage/__init__.py
Log:
When pruning the digests to optimize parallel-fetch, use a separate dict
so that the original digests are still available if a file needs to be
downloaded.


Modified: main/trunk/pym/portage/__init__.py
===================================================================
--- main/trunk/pym/portage/__init__.py	2008-06-03 05:41:32 UTC (rev 10550)
+++ main/trunk/pym/portage/__init__.py	2008-06-03 06:50:32 UTC (rev 10551)
@@ -3412,12 +3412,13 @@
 		"""
 		fetched = 0
 
-		digests = mydigests.get(myfile, {})
-		size = digests.get("size")
+		orig_digests = mydigests.get(myfile, {})
+		size = orig_digests.get("size")
+		pruned_digests = orig_digests
 		if parallel_fetchonly:
-			digests.clear()
+			pruned_digests = pruned_digests.copy()
 			if size is not None:
-				digests["size"] = size
+				pruned_digests["size"] = size
 
 		myfile_path = os.path.join(mysettings["DISTDIR"], myfile)
 		has_space = True
@@ -3468,7 +3469,8 @@
 
 				eout = portage.output.EOutput()
 				eout.quiet = mysettings.get("PORTAGE_QUIET") == "1"
-				match, mystat = _check_distfile(myfile_path, digests, eout)
+				match, mystat = _check_distfile(
+					myfile_path, pruned_digests, eout)
 				if match:
 					if can_fetch and not fetch_to_ro:
 						try:
@@ -3520,7 +3522,8 @@
 					readonly_file = None
 					for x in ro_distdirs:
 						filename = os.path.join(x, myfile)
-						match, mystat = _check_distfile(filename, digests, eout)
+						match, mystat = _check_distfile(
+							filename, pruned_digests, eout)
 						if match:
 							readonly_file = filename
 							break

-- 
gentoo-commits@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-06-03  6:50 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-06-03  6:50 [gentoo-commits] portage r10551 - main/trunk/pym/portage Zac Medico (zmedico)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox