Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254860 - sys-apps/portage-2.2_rc21 --- can't do 'emerge -uv <package>'
Summary: sys-apps/portage-2.2_rc21 --- can't do 'emerge -uv <package>'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS, REGRESSION
: 254856 (view as bug list)
Depends on:
Blocks: 254662
  Show dependency tree
 
Reported: 2009-01-13 17:01 UTC by Ferris McCormick (RETIRED)
Modified: 2010-10-14 14:26 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
convert str to Atom where appropriate (str_to_atom.patch,958 bytes, patch)
2009-01-13 21:05 UTC, Zac Medico
Details | Diff
convert str to Atom where appropriate (str_to_atom.patch,1.19 KB, patch)
2009-01-13 22:23 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ferris McCormick (RETIRED) gentoo-dev 2009-01-13 17:01:54 UTC
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
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-13 17:16:14 UTC
Same problem with portage-2.1.6.5
Comment 2 Zac Medico gentoo-dev 2009-01-13 20:56:28 UTC
*** Bug 254856 has been marked as a duplicate of this bug. ***
Comment 3 Zac Medico gentoo-dev 2009-01-13 21:05:45 UTC
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
Comment 4 Ferris McCormick (RETIRED) gentoo-dev 2009-01-13 21:13:36 UTC
(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'
===================================

Comment 5 Zac Medico gentoo-dev 2009-01-13 22:23:46 UTC
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.
Comment 6 Ferris McCormick (RETIRED) gentoo-dev 2009-01-14 00:10:46 UTC
Looks like that got it.  Thanks for the help.
Comment 7 Zac Medico gentoo-dev 2009-01-14 08:41:13 UTC
Thanks, this is fixed in 2.1.6.6 and 2.2_rc22.
Comment 8 Christian 2010-10-14 11:00:23 UTC
"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)



Comment 9 Zac Medico gentoo-dev 2010-10-14 11:31:07 UTC
(In reply to comment #8)
You can't have exactly the same issue, so please file a new bug.
Comment 10 Christian 2010-10-14 12:51:12 UTC
I put it here, because the error was the same. now its here:
http://bugs.gentoo.org/show_bug.cgi?id=340973