On all systems, if I try 'emerge -puv <some package>' it fails, thus: ================================ polylepis glib # emerge -puv glib These are the packages that would be merged, in order: Calculating dependencies -Traceback (most recent call last): File "/usr/bin/emerge", line 40, in <module> retval = _emerge.emerge_main() File "//usr/lib/portage/pym/_emerge/__init__.py", line 15187, in emerge_main myopts, myaction, myfiles, spinner) File "//usr/lib/portage/pym/_emerge/__init__.py", line 13969, in action_build retval, favorites = mydepgraph.select_files(myfiles) File "//usr/lib/portage/pym/_emerge/__init__.py", line 5465, in select_files blocker_lookahead=True): File "//usr/lib/portage/pym/_emerge/__init__.py", line 5686, in _greedy_slots blockers[pkg] = InternalPackageSet(initial_atoms=blocker_atoms) File "//usr/lib/portage/pym/portage/sets/base.py", line 210, in __init__ self.update(initial_atoms) File "//usr/lib/portage/pym/portage/sets/base.py", line 164, in update for a in atoms: File "//usr/lib/portage/pym/_emerge/__init__.py", line 5685, in <genexpr> blocker_atoms = (x for x in atoms if x.blocker) AttributeError: 'str' object has no attribute 'blocker' ======================================= emerge -pv <some package> is fine, and emerge -uvD @world is fine
Same problem with portage-2.1.6.5
*** Bug 254856 has been marked as a duplicate of this bug. ***
Created attachment 178410 [details, diff] convert str to Atom where appropriate If this patch is saved as /tmp/str_to_atom.patch, then it can be applied as follows: patch /usr/lib/portage/pym/portage/__init__.py /tmp/str_to_atom.patch
(In reply to comment #3) > Created an attachment (id=178410) [edit] > convert str to Atom where appropriate > > If this patch is saved as /tmp/str_to_atom.patch, then it can be applied as > follows: > > patch /usr/lib/portage/pym/portage/__init__.py /tmp/str_to_atom.patch > Not really. With 2.2_rc21 I have: ================================== liasis glib # patch /usr/lib/portage/pym/portage/__init__.py /tmp/str_to_atom.patch patching file /usr/lib/portage/pym/portage/__init__.py liasis glib # emerge -puv glib These are the packages that would be merged, in order: Calculating dependencies /Traceback (most recent call last): File "/usr/bin/emerge", line 40, in <module> retval = _emerge.emerge_main() File "//usr/lib64/portage/pym/_emerge/__init__.py", line 15187, in emerge_main myopts, myaction, myfiles, spinner) File "//usr/lib64/portage/pym/_emerge/__init__.py", line 13969, in action_build retval, favorites = mydepgraph.select_files(myfiles) File "//usr/lib64/portage/pym/_emerge/__init__.py", line 5465, in select_files blocker_lookahead=True): File "//usr/lib64/portage/pym/_emerge/__init__.py", line 5686, in _greedy_slots blockers[pkg] = InternalPackageSet(initial_atoms=blocker_atoms) File "//usr/lib64/portage/pym/portage/sets/base.py", line 210, in __init__ self.update(initial_atoms) File "//usr/lib64/portage/pym/portage/sets/base.py", line 164, in update for a in atoms: File "//usr/lib64/portage/pym/_emerge/__init__.py", line 5685, in <genexpr> blocker_atoms = (x for x in atoms if x.blocker) AttributeError: 'str' object has no attribute 'blocker' ===================================
Created attachment 178422 [details, diff] convert str to Atom where appropriate The previous patch missed one spot. I've tested this patch on a large sample of packages and it seems fine now.
Looks like that got it. Thanks for the help.
Thanks, this is fixed in 2.1.6.6 and 2.2_rc22.
"emerge --depclean" spits out this bug with portage-2.2-rc95: >>> Checking for lib consumers... Traceback (most recent call last): File "/usr/bin/emerge", line 43, in <module> retval = emerge_main() File "/usr/lib64/portage/pym/_emerge/main.py", line 1625, in emerge_main myopts, myaction, myfiles, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 2558, in action_uninstall opts, action, valid_atoms, spinner, scheduler=sched._sched_iface) File "/usr/lib64/portage/pym/_emerge/actions.py", line 587, in action_depclean myopts, action, args_set, spinner) File "/usr/lib64/portage/pym/_emerge/actions.py", line 1135, in calc_depclean priority=priority)[node] File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 2096, in _select_atoms_from_graph return self._select_atoms_highest_available(*pargs, **kwargs) File "/usr/lib64/portage/pym/_emerge/depgraph.py", line 2122, in _select_atoms_highest_available myroot=root, trees=trees) File "/usr/lib64/portage/pym/portage/dep/dep_check.py", line 572, in dep_check use_binaries=use_binaries, trees=trees) File "/usr/lib64/portage/pym/portage/dep/dep_check.py", line 237, in dep_zapdeps use_binaries=use_binaries, trees=trees) File "/usr/lib64/portage/pym/portage/dep/dep_check.py", line 292, in dep_zapdeps use_binaries=use_binaries, trees=trees) File "/usr/lib64/portage/pym/portage/dep/dep_check.py", line 305, in dep_zapdeps if atom.blocker: AttributeError: 'str' object has no attribute 'blocker' patch doesn't work: patching file /usr/lib/portage/pym/portage/__init__.py Hunk #1 FAILED at 6333. Hunk #2 FAILED at 6364. 2 out of 2 hunks FAILED -- saving rejects to file /usr/lib/portage/pym/portage/__init__.py.rej __init__.py.rej: Index: __init__.py --- __init__.py (revision 12494) +++ __init__.py (revision 12497) @@ -6333,7 +6333,7 @@ newsplit.append(x) continue if not pkgs and len(mychoices) == 1: - newsplit.append(x.replace(mykey, mychoices[0])) + newsplit.append(portage.dep.Atom(x.replace(mykey, mychoices[0]))) continue if isblocker: a = [] @@ -6364,13 +6364,14 @@ if len(virtual_atoms) == 1: # It wouldn't make sense to block all the components of a # compound virtual, so only a single atom block is allowed. - a.append("!" + virtual_atoms[0]) + a.append(portage.dep.Atom("!" + virtual_atoms[0])) else: - mycheck[1].append("="+y[0]) # pull in the new-style virtual + # pull in the new-style virtual + mycheck[1].append(portage.dep.Atom("="+y[0])) a.append(mycheck[1]) # Plain old-style virtuals. New-style virtuals are preferred. for y in mychoices: - a.append(x.replace(mykey, y)) + a.append(portage.dep.Atom(x.replace(mykey, y, 1))) if isblocker and not a: # Probably a compound virtual. Pass the atom through unprocessed. newsplit.append(x)
(In reply to comment #8) You can't have exactly the same issue, so please file a new bug.
I put it here, because the error was the same. now its here: http://bugs.gentoo.org/show_bug.cgi?id=340973