Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Side by Side Diff: pym/_emerge/depgraph.py

Issue 6577024: Add --nousepkg-atoms, --useoldpkg-atoms and --reinstall-atoms flag to Portage (Closed) Base URL: http://git.chromium.org/git/portage_tool.git@cros-2.1.9
Patch Set: Add --useoldpkg-atoms as well Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « man/emerge.1 ('k') | pym/_emerge/main.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1999-2011 Gentoo Foundation 1 # Copyright 1999-2011 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2 2 # Distributed under the terms of the GNU General Public License v2
3 3
4 from __future__ import print_function 4 from __future__ import print_function
5 5
6 import gc 6 import gc
7 import logging 7 import logging
8 import re 8 import re
9 import sys 9 import sys
10 import textwrap 10 import textwrap
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 basestring = str 61 basestring = str
62 long = int 62 long = int
63 63
64 class _scheduler_graph_config(object): 64 class _scheduler_graph_config(object):
65 def __init__(self, trees, pkg_cache, graph, mergelist): 65 def __init__(self, trees, pkg_cache, graph, mergelist):
66 self.trees = trees 66 self.trees = trees
67 self.pkg_cache = pkg_cache 67 self.pkg_cache = pkg_cache
68 self.graph = graph 68 self.graph = graph
69 self.mergelist = mergelist 69 self.mergelist = mergelist
70 70
71 def _wildcard_set(atoms):
72 pkgs = InternalPackageSet(allow_wildcard=True)
73 for x in atoms:
74 try:
75 x = Atom(x, allow_wildcard=True)
76 except portage.exception.InvalidAtom:
77 x = Atom("*/" + x, allow_wildcard=True)
78 pkgs.add(x)
79 return pkgs
80
71 class _frozen_depgraph_config(object): 81 class _frozen_depgraph_config(object):
72 82
73 def __init__(self, settings, trees, myopts, spinner): 83 def __init__(self, settings, trees, myopts, spinner):
74 self.settings = settings 84 self.settings = settings
75 self.target_root = settings["ROOT"] 85 self.target_root = settings["ROOT"]
76 self.myopts = myopts 86 self.myopts = myopts
77 self.edebug = 0 87 self.edebug = 0
78 if settings.get("PORTAGE_DEBUG", "") == "1": 88 if settings.get("PORTAGE_DEBUG", "") == "1":
79 self.edebug = 1 89 self.edebug = 1
80 self.spinner = spinner 90 self.spinner = spinner
(...skipping 19 matching lines...) Expand all
100 self.trees[myroot][tree] = trees[myroot][tree] 110 self.trees[myroot][tree] = trees[myroot][tree]
101 self.trees[myroot]["vartree"] = \ 111 self.trees[myroot]["vartree"] = \
102 FakeVartree(trees[myroot]["root_config"], 112 FakeVartree(trees[myroot]["root_config"],
103 pkg_cache=self._pkg_cache, 113 pkg_cache=self._pkg_cache,
104 pkg_root_config=self.roots[myroot]) 114 pkg_root_config=self.roots[myroot])
105 self.pkgsettings[myroot] = portage.config( 115 self.pkgsettings[myroot] = portage.config(
106 clone=self.trees[myroot]["vartree"].settings) 116 clone=self.trees[myroot]["vartree"].settings)
107 117
108 self._required_set_names = set(["world"]) 118 self._required_set_names = set(["world"])
109 119
110 » » self.excluded_pkgs = InternalPackageSet(allow_wildcard=True) 120 » » atoms = ' '.join(myopts.get("--exclude", [])).split()
111 » » for x in ' '.join(myopts.get("--exclude", [])).split(): 121 » » self.excluded_pkgs = _wildcard_set(atoms)
112 » » » try: 122 » » atoms = ' '.join(myopts.get("--reinstall-atoms", [])).split()
113 » » » » x = Atom(x, allow_wildcard=True) 123 » » self.reinstall_atoms = _wildcard_set(atoms)
114 » » » except portage.exception.InvalidAtom: 124 » » atoms = ' '.join(myopts.get("--nousepkg-atoms", [])).split()
115 » » » » x = Atom("*/" + x, allow_wildcard=True) 125 » » self.nousepkg_atoms = _wildcard_set(atoms)
116 » » » self.excluded_pkgs.add(x) 126 » » atoms = ' '.join(myopts.get("--useoldpkg-atoms", [])).split()
127 » » self.useoldpkg_atoms = _wildcard_set(atoms)
117 128
118 class _depgraph_sets(object): 129 class _depgraph_sets(object):
119 def __init__(self): 130 def __init__(self):
120 # contains all sets added to the graph 131 # contains all sets added to the graph
121 self.sets = {} 132 self.sets = {}
122 # contains non-set atoms given as arguments 133 # contains non-set atoms given as arguments
123 self.sets['__non_set_args__'] = InternalPackageSet() 134 self.sets['__non_set_args__'] = InternalPackageSet()
124 # contains all atoms from all sets added to the graph, including 135 # contains all atoms from all sets added to the graph, including
125 # atoms given as arguments 136 # atoms given as arguments
126 self.atoms = InternalPackageSet() 137 self.atoms = InternalPackageSet()
(...skipping 1137 matching lines...) Expand 10 before | Expand all | Expand 10 after
1264 raise 1275 raise
1265 1276
1266 if debug: 1277 if debug:
1267 writemsg_level("Candidates: %s\n" % \ 1278 writemsg_level("Candidates: %s\n" % \
1268 ([str(x) for x in selected_atoms[pkg]],), 1279 ([str(x) for x in selected_atoms[pkg]],),
1269 noiselevel=-1, level=logging.DEBUG) 1280 noiselevel=-1, level=logging.DEBUG)
1270 1281
1271 root_config = self._frozen_config.roots[dep_root] 1282 root_config = self._frozen_config.roots[dep_root]
1272 vardb = root_config.trees["vartree"].dbapi 1283 vardb = root_config.trees["vartree"].dbapi
1273 1284
1285 reinstall_atoms = self._frozen_config.reinstall_atoms
1274 for atom, child in self._minimize_children( 1286 for atom, child in self._minimize_children(
1275 pkg, dep_priority, root_config, selected_atoms[pkg]): 1287 pkg, dep_priority, root_config, selected_atoms[pkg]):
1276 1288
1277 if ignore_blockers and atom.blocker: 1289 if ignore_blockers and atom.blocker:
1278 # For --with-bdeps, ignore build-time only block ers 1290 # For --with-bdeps, ignore build-time only block ers
1279 # that originate from built packages. 1291 # that originate from built packages.
1280 continue 1292 continue
1281 1293
1282 mypriority = dep_priority.copy() 1294 mypriority = dep_priority.copy()
1283 if not atom.blocker: 1295 if not atom.blocker:
1284 » » » » inst_pkgs = vardb.match_pkgs(atom) 1296 » » » » inst_pkgs = [inst_pkg for inst_pkg in vardb.matc h_pkgs(atom)
1297 » » » » » if not reinstall_atoms.findAtomForPackag e(inst_pkg,
1298 » » » » » » » modified_use=self._pkg_u se_enabled(inst_pkg))]
1285 if inst_pkgs: 1299 if inst_pkgs:
1286 for inst_pkg in inst_pkgs: 1300 for inst_pkg in inst_pkgs:
1287 if self._pkg_visibility_check(in st_pkg): 1301 if self._pkg_visibility_check(in st_pkg):
1288 # highest visible 1302 # highest visible
1289 mypriority.satisfied = i nst_pkg 1303 mypriority.satisfied = i nst_pkg
1290 break 1304 break
1291 if not mypriority.satisfied: 1305 if not mypriority.satisfied:
1292 # none visible, so use highest 1306 # none visible, so use highest
1293 mypriority.satisfied = inst_pkgs [0] 1307 mypriority.satisfied = inst_pkgs [0]
1294 1308
(...skipping 25 matching lines...) Expand all
1320 Dependency(atom=Atom('=' + virt_pkg.cpv), 1334 Dependency(atom=Atom('=' + virt_pkg.cpv),
1321 depth=(depth + 1), parent=pkg, priority=dep_prio rity.copy(), 1335 depth=(depth + 1), parent=pkg, priority=dep_prio rity.copy(),
1322 root=dep_root)): 1336 root=dep_root)):
1323 return 0 1337 return 0
1324 1338
1325 for atom, child in self._minimize_children( 1339 for atom, child in self._minimize_children(
1326 pkg, self._priority(runtime=True), root_config, atoms): 1340 pkg, self._priority(runtime=True), root_config, atoms):
1327 # This is a GLEP 37 virtual, so its deps are all runtime. 1341 # This is a GLEP 37 virtual, so its deps are all runtime.
1328 mypriority = self._priority(runtime=True) 1342 mypriority = self._priority(runtime=True)
1329 if not atom.blocker: 1343 if not atom.blocker:
1330 » » » » » inst_pkgs = vardb.match_pkgs(atom) 1344 » » » » » inst_pkgs = [inst_pkg for inst_pkg in va rdb.match_pkgs(atom)
1345 » » » » » » if not reinstall_atoms.findAtomF orPackage(inst_pkg,
1346 » » » » » » » » modified_use=sel f._pkg_use_enabled(inst_pkg))]
1331 if inst_pkgs: 1347 if inst_pkgs:
1332 for inst_pkg in inst_pkgs: 1348 for inst_pkg in inst_pkgs:
1333 if self._pkg_visibility_ check(inst_pkg): 1349 if self._pkg_visibility_ check(inst_pkg):
1334 # highest visibl e 1350 # highest visibl e
1335 mypriority.satis fied = inst_pkg 1351 mypriority.satis fied = inst_pkg
1336 break 1352 break
1337 if not mypriority.satisfied: 1353 if not mypriority.satisfied:
1338 # none visible, so use h ighest 1354 # none visible, so use h ighest
1339 mypriority.satisfied = i nst_pkgs[0] 1355 mypriority.satisfied = i nst_pkgs[0]
1340 1356
(...skipping 1498 matching lines...) Expand 10 before | Expand all | Expand 10 after
2839 rebuilt_binaries = 'rebuilt_binaries' in self._dynamic_config.my params 2855 rebuilt_binaries = 'rebuilt_binaries' in self._dynamic_config.my params
2840 usepkgonly = "--usepkgonly" in self._frozen_config.myopts 2856 usepkgonly = "--usepkgonly" in self._frozen_config.myopts
2841 empty = "empty" in self._dynamic_config.myparams 2857 empty = "empty" in self._dynamic_config.myparams
2842 selective = "selective" in self._dynamic_config.myparams 2858 selective = "selective" in self._dynamic_config.myparams
2843 reinstall = False 2859 reinstall = False
2844 noreplace = "--noreplace" in self._frozen_config.myopts 2860 noreplace = "--noreplace" in self._frozen_config.myopts
2845 avoid_update = "--update" not in self._frozen_config.myopts 2861 avoid_update = "--update" not in self._frozen_config.myopts
2846 dont_miss_updates = "--update" in self._frozen_config.myopts 2862 dont_miss_updates = "--update" in self._frozen_config.myopts
2847 use_ebuild_visibility = self._frozen_config.myopts.get( 2863 use_ebuild_visibility = self._frozen_config.myopts.get(
2848 '--use-ebuild-visibility', 'n') != 'n' 2864 '--use-ebuild-visibility', 'n') != 'n'
2865 reinstall_atoms = self._frozen_config.reinstall_atoms
2866 nousepkg_atoms = self._frozen_config.nousepkg_atoms
2867 useoldpkg_atoms = self._frozen_config.useoldpkg_atoms
2868 matched_oldpkg = []
2849 # Behavior of the "selective" parameter depends on 2869 # Behavior of the "selective" parameter depends on
2850 # whether or not a package matches an argument atom. 2870 # whether or not a package matches an argument atom.
2851 # If an installed package provides an old-style 2871 # If an installed package provides an old-style
2852 # virtual that is no longer provided by an available 2872 # virtual that is no longer provided by an available
2853 # package, the installed package may match an argument 2873 # package, the installed package may match an argument
2854 # atom even though none of the available packages do. 2874 # atom even though none of the available packages do.
2855 # Therefore, "selective" logic does not consider 2875 # Therefore, "selective" logic does not consider
2856 # whether or not an installed package matches an 2876 # whether or not an installed package matches an
2857 # argument atom. It only considers whether or not 2877 # argument atom. It only considers whether or not
2858 # available packages match argument atoms, which is 2878 # available packages match argument atoms, which is
(...skipping 19 matching lines...) Expand all
2878 onlydeps=onlydeps): 2898 onlydeps=onlydeps):
2879 if pkg in self._dynamic_config._runtime_ pkg_mask: 2899 if pkg in self._dynamic_config._runtime_ pkg_mask:
2880 # The package has been masked by the backtracking logic 2900 # The package has been masked by the backtracking logic
2881 continue 2901 continue
2882 2902
2883 if not pkg.installed and \ 2903 if not pkg.installed and \
2884 self._frozen_config.excluded_pkg s.findAtomForPackage(pkg, \ 2904 self._frozen_config.excluded_pkg s.findAtomForPackage(pkg, \
2885 modified_use=self._pkg_u se_enabled(pkg)): 2905 modified_use=self._pkg_u se_enabled(pkg)):
2886 continue 2906 continue
2887 2907
2888 » » » » » if packages_with_invalid_use_config and \ 2908 » » » » » if built and not installed and nousepkg_ atoms.findAtomForPackage(pkg, \
2909 » » » » » » modified_use=self._pkg_use_enabl ed(pkg)):
2910 » » » » » » break
2911
2912 » » » » » useoldpkg = useoldpkg_atoms.findAtomForP ackage(pkg, \
2913 » » » » » » modified_use=self._pkg_use_enabl ed(pkg))
2914
2915 » » » » » if packages_with_invalid_use_config and (not built or not useoldpkg) and \
2889 (not pkg.installed or dont_miss_ updates): 2916 (not pkg.installed or dont_miss_ updates):
2890 # Check if a higher version was rejected due to user 2917 # Check if a higher version was rejected due to user
2891 # USE configuration. The package s_with_invalid_use_config 2918 # USE configuration. The package s_with_invalid_use_config
2892 # list only contains unbuilt ebu ilds since USE can't 2919 # list only contains unbuilt ebu ilds since USE can't
2893 # be changed for built packages. 2920 # be changed for built packages.
2894 higher_version_rejected = False 2921 higher_version_rejected = False
2895 for rejected in packages_with_in valid_use_config: 2922 for rejected in packages_with_in valid_use_config:
2896 if rejected.cp != pkg.cp : 2923 if rejected.cp != pkg.cp :
2897 continue 2924 continue
2898 if rejected > pkg: 2925 if rejected > pkg:
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
2936 # version is masked by KEYWORDS, but never 2963 # version is masked by KEYWORDS, but never
2937 # reinstall the same exact versi on only due 2964 # reinstall the same exact versi on only due
2938 # to a KEYWORDS mask. See bug #2 52167. 2965 # to a KEYWORDS mask. See bug #2 52167.
2939 2966
2940 if pkg.type_name != "ebuild" and matched_packages: 2967 if pkg.type_name != "ebuild" and matched_packages:
2941 # If the ebuild no longer exists or it's 2968 # If the ebuild no longer exists or it's
2942 # keywords have been dropped, reject built 2969 # keywords have been dropped, reject built
2943 # instances (ins talled or binary). 2970 # instances (ins talled or binary).
2944 # If --usepkgonl y is enabled, assume that 2971 # If --usepkgonl y is enabled, assume that
2945 # the ebuild sta tus should be ignored. 2972 # the ebuild sta tus should be ignored.
2946 » » » » » » » » if not use_ebuil d_visibility and usepkgonly: 2973 » » » » » » » » if not use_ebuil d_visibility and (usepkgonly or useoldpkg):
2947 if pkg.i nstalled and pkg.masks: 2974 if pkg.i nstalled and pkg.masks:
2948 continue 2975 continue
2949 else: 2976 else:
2950 try: 2977 try:
2951 pkg_eb = self._pkg( 2978 pkg_eb = self._pkg(
2952 pkg.cpv, "ebuild", root_config) 2979 pkg.cpv, "ebuild", root_config)
2953 except p ortage.exception.PackageNotFound: 2980 except p ortage.exception.PackageNotFound:
2954 continue 2981 continue
2955 else: 2982 else:
2956 if not self._pkg_visibility_check(pkg_eb, \ 2983 if not self._pkg_visibility_check(pkg_eb, \
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
3081 # There is a hig her version available in a 3108 # There is a hig her version available in a
3082 # different slot , so this existing node is 3109 # different slot , so this existing node is
3083 # irrelevant. 3110 # irrelevant.
3084 pass 3111 pass
3085 else: 3112 else:
3086 matched_packages .append(e_pkg) 3113 matched_packages .append(e_pkg)
3087 existing_node = e_pkg 3114 existing_node = e_pkg
3088 break 3115 break
3089 # Compare built package to current confi g and 3116 # Compare built package to current confi g and
3090 # reject the built package if necessary. 3117 # reject the built package if necessary.
3091 » » » » » if built and (not installed or matched_p kgs_ignore_use) and \ 3118 » » » » » if built and not useoldpkg and (not inst alled or matched_pkgs_ignore_use) and \
3092 ("--newuse" in self._frozen_conf ig.myopts or \ 3119 ("--newuse" in self._frozen_conf ig.myopts or \
3093 "--reinstall" in self._frozen_co nfig.myopts or \ 3120 "--reinstall" in self._frozen_co nfig.myopts or \
3094 "--binpkg-respect-use" in self._ frozen_config.myopts): 3121 "--binpkg-respect-use" in self._ frozen_config.myopts):
3095 iuses = pkg.iuse.all 3122 iuses = pkg.iuse.all
3096 old_use = self._pkg_use_enabled( pkg) 3123 old_use = self._pkg_use_enabled( pkg)
3097 if myeb: 3124 if myeb:
3098 pkgsettings.setcpv(myeb) 3125 pkgsettings.setcpv(myeb)
3099 else: 3126 else:
3100 pkgsettings.setcpv(pkg) 3127 pkgsettings.setcpv(pkg)
3101 now_use = pkgsettings["PORTAGE_U SE"].split() 3128 now_use = pkgsettings["PORTAGE_U SE"].split()
3102 forced_flags = set() 3129 forced_flags = set()
3103 forced_flags.update(pkgsettings. useforce) 3130 forced_flags.update(pkgsettings. useforce)
3104 forced_flags.update(pkgsettings. usemask) 3131 forced_flags.update(pkgsettings. usemask)
3105 cur_iuse = iuses 3132 cur_iuse = iuses
3106 » » » » » » if myeb and not usepkgonly: 3133 » » » » » » if myeb and not usepkgonly and n ot useoldpkg:
3107 cur_iuse = myeb.iuse.all 3134 cur_iuse = myeb.iuse.all
3108 if self._reinstall_for_flags(for ced_flags, 3135 if self._reinstall_for_flags(for ced_flags,
3109 old_use, iuses, 3136 old_use, iuses,
3110 now_use, cur_iuse): 3137 now_use, cur_iuse):
3111 break 3138 break
3112 # Compare current config to installed pa ckage 3139 # Compare current config to installed pa ckage
3113 # and do not reinstall if possible. 3140 # and do not reinstall if possible.
3114 » » » » » if not installed and \ 3141 » » » » » if not installed and not useoldpkg and \
3115 ("--newuse" in self._frozen_conf ig.myopts or \ 3142 ("--newuse" in self._frozen_conf ig.myopts or \
3116 "--reinstall" in self._frozen_co nfig.myopts) and \ 3143 "--reinstall" in self._frozen_co nfig.myopts) and \
3117 cpv in vardb.match(atom): 3144 cpv in vardb.match(atom):
3118 forced_flags = set() 3145 forced_flags = set()
3119 forced_flags.update(pkg.use.forc e) 3146 forced_flags.update(pkg.use.forc e)
3120 forced_flags.update(pkg.use.mask ) 3147 forced_flags.update(pkg.use.mask )
3121 inst_pkg = vardb.match_pkgs('=' + pkg.cpv)[0] 3148 inst_pkg = vardb.match_pkgs('=' + pkg.cpv)[0]
3122 old_use = inst_pkg.use.enabled 3149 old_use = inst_pkg.use.enabled
3123 old_iuse = inst_pkg.iuse.all 3150 old_iuse = inst_pkg.iuse.all
3124 cur_use = self._pkg_use_enabled( pkg) 3151 cur_use = self._pkg_use_enabled( pkg)
3125 cur_iuse = pkg.iuse.all 3152 cur_iuse = pkg.iuse.all
3126 reinstall_for_flags = \ 3153 reinstall_for_flags = \
3127 self._reinstall_for_flag s( 3154 self._reinstall_for_flag s(
3128 forced_flags, old_use, o ld_iuse, 3155 forced_flags, old_use, o ld_iuse,
3129 cur_use, cur_iuse) 3156 cur_use, cur_iuse)
3130 if reinstall_for_flags: 3157 if reinstall_for_flags:
3131 reinstall = True 3158 reinstall = True
3159 if reinstall_atoms.findAtomForPackage(pk g, \
3160 modified_use=self._pkg_u se_enabled(pkg)):
3161 reinstall = True
3132 if not built: 3162 if not built:
3133 myeb = pkg 3163 myeb = pkg
3164 elif useoldpkg:
3165 matched_oldpkg.append(pkg)
3134 matched_packages.append(pkg) 3166 matched_packages.append(pkg)
3135 if reinstall_for_flags: 3167 if reinstall_for_flags:
3136 self._dynamic_config._reinstall_ nodes[pkg] = \ 3168 self._dynamic_config._reinstall_ nodes[pkg] = \
3137 reinstall_for_flags 3169 reinstall_for_flags
3138 break 3170 break
3139 3171
3140 if not matched_packages: 3172 if not matched_packages:
3141 return None, None 3173 return None, None
3142 3174
3143 if "--debug" in self._frozen_config.myopts: 3175 if "--debug" in self._frozen_config.myopts:
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
3207 matched_packages = [x for x in \ 3239 matched_packages = [x for x in \
3208 matched_packages if x is not pkg ] 3240 matched_packages if x is not pkg ]
3209 3241
3210 if avoid_update: 3242 if avoid_update:
3211 for pkg in matched_packages: 3243 for pkg in matched_packages:
3212 if pkg.installed and self._pkg_visibilit y_check(pkg, \ 3244 if pkg.installed and self._pkg_visibilit y_check(pkg, \
3213 allow_unstable_keywords=allow_un stable_keywords, 3245 allow_unstable_keywords=allow_un stable_keywords,
3214 allow_license_changes=allow_lice nse_changes): 3246 allow_license_changes=allow_lice nse_changes):
3215 return pkg, existing_node 3247 return pkg, existing_node
3216 3248
3217 » » » bestmatch = portage.best( 3249 » » » visible_matches = []
3218 » » » » [pkg.cpv for pkg in matched_packages \ 3250 » » » if matched_oldpkg:
3251 » » » » visible_matches = [pkg.cpv for pkg in matched_ol dpkg \
3219 if self._pkg_visibility_check(pkg, allow _unstable_keywords=allow_unstable_keywords, 3252 if self._pkg_visibility_check(pkg, allow _unstable_keywords=allow_unstable_keywords,
3220 » » » » » » allow_license_changes=allow_lice nse_changes)]) 3253 » » » » » » allow_license_changes=allow_lice nse_changes)]
3221 » » » if not bestmatch: 3254 » » » if not visible_matches:
3255 » » » » visible_matches = [pkg.cpv for pkg in matched_pa ckages \
3256 » » » » » if self._pkg_visibility_check(pkg, allow _unstable_keywords=allow_unstable_keywords,
3257 » » » » » » allow_license_changes=allow_lice nse_changes)]
3258 » » » if visible_matches:
3259 » » » » bestmatch = portage.best(visible_matches)
3260 » » » else:
3222 # all are masked, so ignore visibility 3261 # all are masked, so ignore visibility
3223 » » » » bestmatch = portage.best( 3262 » » » » bestmatch = portage.best([pkg.cpv for pkg in mat ched_packages])
3224 » » » » » [pkg.cpv for pkg in matched_packages])
3225 matched_packages = [pkg for pkg in matched_packages \ 3263 matched_packages = [pkg for pkg in matched_packages \
3226 if portage.dep.cpvequal(pkg.cpv, bestmatch)] 3264 if portage.dep.cpvequal(pkg.cpv, bestmatch)]
3227 3265
3228 # ordered by type preference ("ebuild" type is the last resort) 3266 # ordered by type preference ("ebuild" type is the last resort)
3229 return matched_packages[-1], existing_node 3267 return matched_packages[-1], existing_node
3230 3268
3231 def _select_pkg_from_graph(self, root, atom, onlydeps=False): 3269 def _select_pkg_from_graph(self, root, atom, onlydeps=False):
3232 """ 3270 """
3233 Select packages that have already been added to the graph or 3271 Select packages that have already been added to the graph or
3234 those that are installed and have not been scheduled for 3272 those that are installed and have not been scheduled for
(...skipping 2572 matching lines...) Expand 10 before | Expand all | Expand 10 after
5807 for msg_type, msgs in pkg.invalid.items(): 5845 for msg_type, msgs in pkg.invalid.items():
5808 for msg in msgs: 5846 for msg in msgs:
5809 mreasons.append( 5847 mreasons.append(
5810 _MaskReason("invalid", "invalid: %s" % ( msg,))) 5848 _MaskReason("invalid", "invalid: %s" % ( msg,)))
5811 5849
5812 if not pkg.metadata["SLOT"]: 5850 if not pkg.metadata["SLOT"]:
5813 mreasons.append( 5851 mreasons.append(
5814 _MaskReason("invalid", "SLOT: undefined")) 5852 _MaskReason("invalid", "SLOT: undefined"))
5815 5853
5816 return mreasons 5854 return mreasons
OLDNEW
« no previous file with comments | « man/emerge.1 ('k') | pym/_emerge/main.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698