Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 109304 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/lib/portage/pym/portage.py.orig (-4 / +9 lines)
Lines 1604-1610 Link Here
1604
1604
1605
1605
1606
1606
1607
def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",use_locks=1, try_mirrors=1):
1607
def fetch(myuris, mysettings, listonly=0, fetchonly=0, locks_in_subdir=".locks",use_locks=1, try_mirrors=1, fetchmissing=0):
1608
	"fetch files.  Will use digest file if available."
1608
	"fetch files.  Will use digest file if available."
1609
1609
1610
	# 'nomirror' is bad/negative logic. You Restrict mirroring, not no-mirroring.
1610
	# 'nomirror' is bad/negative logic. You Restrict mirroring, not no-mirroring.
Lines 1821-1827 Link Here
1821
					file_lock = portage_locks.lockfile(mysettings["DISTDIR"]+"/"+myfile,wantnewlockfile=1)
1821
					file_lock = portage_locks.lockfile(mysettings["DISTDIR"]+"/"+myfile,wantnewlockfile=1)
1822
		try:
1822
		try:
1823
			for loc in filedict[myfile]:
1823
			for loc in filedict[myfile]:
1824
				if listonly:
1824
				if listonly and not fetchmissing:
1825
					writemsg(loc+" ")
1825
					writemsg(loc+" ")
1826
					continue
1826
					continue
1827
				# allow different fetchcommands per protocol
1827
				# allow different fetchcommands per protocol
Lines 1868-1873 Link Here
1868
					writemsg("An exception was caught(1)...\nFailing the download: %s.\n" % (str(e)),1)
1868
					writemsg("An exception was caught(1)...\nFailing the download: %s.\n" % (str(e)),1)
1869
					fetched=0
1869
					fetched=0
1870
1870
1871
				if listonly:
1872
					if fetched == 0:
1873
						writemsg(loc+" ")
1874
					continue
1875
1871
				if not can_fetch:
1876
				if not can_fetch:
1872
					if fetched != 2:
1877
					if fetched != 2:
1873
						if fetched == 0:
1878
						if fetched == 0:
Lines 2320-2326 Link Here
2320
				droppriv=actionmap[mydo]["args"][1],logfile=logfile)
2325
				droppriv=actionmap[mydo]["args"][1],logfile=logfile)
2321
	return retval
2326
	return retval
2322
2327
2323
def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,fetchall=0,tree="porttree"):
2328
def doebuild(myebuild,mydo,myroot,mysettings,debug=0,listonly=0,fetchonly=0,cleanup=0,dbkey=None,use_cache=1,fetchall=0,tree="porttree",fetchmissing=0):
2324
	global db
2329
	global db
2325
2330
2326
	ebuild_path = os.path.abspath(myebuild)
2331
	ebuild_path = os.path.abspath(myebuild)
Lines 2661-2667 Link Here
2661
	except:
2666
	except:
2662
		pass
2667
		pass
2663
2668
2664
	if mydo!="manifest" and not fetch(fetchme, mysettings, listonly=listonly, fetchonly=fetchonly):
2669
	if mydo!="manifest" and not fetch(fetchme, mysettings, listonly=listonly, fetchonly=fetchonly, fetchmissing=fetchmissing):
2665
		return 1
2670
		return 1
2666
2671
2667
	if mydo=="fetch" and listonly:
2672
	if mydo=="fetch" and listonly:
(-)/usr/lib/portage/bin/emerge.orig (-2 / +7 lines)
Lines 174-179 Link Here
174
"--digest",
174
"--digest",
175
"--emptytree",
175
"--emptytree",
176
"--fetchonly",    "--fetch-all-uri",
176
"--fetchonly",    "--fetch-all-uri",
177
"--fetch-missing",
177
"--getbinpkg",    "--getbinpkgonly",
178
"--getbinpkg",    "--getbinpkgonly",
178
"--help",         "--noconfmem",
179
"--help",         "--noconfmem",
179
"--newuse",       "--nocolor",
180
"--newuse",       "--nocolor",
Lines 1853-1862 Link Here
1853
				if (x[0]=="blocks") and ("--fetchonly" not in myopts):
1854
				if (x[0]=="blocks") and ("--fetchonly" not in myopts):
1854
					raise Exception, "Merging a blocker"
1855
					raise Exception, "Merging a blocker"
1855
				elif ("--fetchonly" in myopts) or ("--fetch-all-uri" in myopts):
1856
				elif ("--fetchonly" in myopts) or ("--fetch-all-uri" in myopts):
1857
					if ("--fetch-missing" in myopts):
1858
						fetchmissing=1
1859
					else:
1860
						fetchmissing=0
1856
					if ("--fetch-all-uri" in myopts):
1861
					if ("--fetch-all-uri" in myopts):
1857
						retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1,fetchall=1)
1862
						retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1,fetchall=1,fetchmissing=fetchmissing)
1858
					else:
1863
					else:
1859
						retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1)
1864
						retval=portage.doebuild(y,"fetch",myroot,self.pkgsettings,edebug,("--pretend" in myopts),fetchonly=1,fetchmissing=fetchmissing)
1860
					if (retval == None) or retval:
1865
					if (retval == None) or retval:
1861
						print
1866
						print
1862
						print "!!! Fetch for",y,"failed, continuing..."
1867
						print "!!! Fetch for",y,"failed, continuing..."

Return to bug 109304