Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 26314
Collapse All | Expand All

(-)/home/jail/usr/lib/portage/bin/emerge (-8 / +23 lines)
Lines 894-909 Link Here
894
					print "ebuild:",myeb
894
					print "ebuild:",myeb
895
					print "binpkg:",myeb_pkg
895
					print "binpkg:",myeb_pkg
896
896
897
				if myeb and myeb_pkg:
897
				if myeb_pkg:
898
					myeb_s     = portage.catpkgsplit(myeb)
898
					myeb_pkg_s     = portage.catpkgsplit(myeb_pkg)
899
					myeb_s     = [myeb_s[0]+"/"+myeb_s[1], myeb_s[2], myeb_s[3]]
899
					myeb_pkg_s     = [myeb_pkg_s[0]+"/"+myeb_pkg_s[1], myeb_pkg_s[2], myeb_pkg_s[3]]
900
					myeb_pkg_s = portage.catpkgsplit(myeb_pkg)
900
901
					myeb_pkg_s = [myeb_pkg_s[0]+"/"+myeb_pkg_s[1], myeb_pkg_s[2], myeb_pkg_s[3]]
901
					available_eb   = portage.portdb.xmatch("bestmatch-visible",x)
902
					
902
					available_eb_s = portage.catpkgsplit(available_eb)
903
					if portage.pkgcmp(myeb_s, myeb_pkg_s) > 0: # eb is newer than pkg
903
					available_eb_s = [available_eb_s[0]+"/"+available_eb_s[1], available_eb_s[2], available_eb_s[3]]
904
905
					if portage.pkgcmp(available_eb_s, myeb_pkg_s) > 0: # eb is newer than pkg
904
						myeb_pkg = None
906
						myeb_pkg = None
905
					else:
907
					else:
906
						myeb = None
908
						available_pkgs = portage.db[portage.root]["bintree"].dbapi.cp_list(myeb_pkg_s[0])
909
						if available_eb in available_pkgs:
910
							myeb_pkg = available_eb
911
							myeb = None
912
						elif ("--usepkgonly" in myopts):
913
							for pkg in available_pkgs:
914
								pkg_s = portage.catpkgsplit(pkg)
915
								pkg_s = [pkg_s[0]+"/"+pkg_s[1], pkg_s[2], pkg_s[3]]
916
								if portage.pkgcmp(available_eb_s, pkg_s) >= 0:
917
									myeb_pkg = pkg
918
									myeb     = None
919
									break
920
						else:
921
							myeb_pkg = None # "--usepkgonly" not in myopts means myeb exists
907
922
908
				if "--upgradeonly" in myopts:
923
				if "--upgradeonly" in myopts:
909
					# Check that there isn't a newer version of this package already installed
924
					# Check that there isn't a newer version of this package already installed

Return to bug 26314