Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295351 - dependency calculation exception raised with Python 2.6 and 3
Summary: dependency calculation exception raised with Python 2.6 and 3
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks: 288499
  Show dependency tree
 
Reported: 2009-12-01 17:55 UTC by Arc Riley
Modified: 2009-12-03 06:18 UTC (History)
0 users

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


Attachments
emerge --debug -avu =dev-lang/python-2.6.4 >~arc/log 2>&1 (emerge.log,315.51 KB, text/plain)
2009-12-02 06:33 UTC, Arc Riley
Details
Fix the TypeError (update_dbentries.patch,1.01 KB, patch)
2009-12-02 07:01 UTC, Zac Medico
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Arc Riley 2009-12-01 17:55:59 UTC
# emerge -auv gnome
These are the packages that would be merged, in order:

Calculating dependencies... done!
Traceback (most recent call last):
  File "/usr/bin/emerge", line 42, in <module>
    retval = emerge_main()
  File "/usr/lib/portage/pym/_emerge/main.py", line 1378, in emerge_main
    myopts, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/actions.py", line 276, in action_build
    settings, trees, myopts, myparams, myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 5419, in backtrack_depgr
aph
    myaction, myfiles, spinner)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 5437, in _backtrack_depg
raph
    success, favorites = mydepgraph.select_files(myfiles)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 1775, in select_files
    return self._resolve(myfavorites)
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 1913, in _resolve
    self.altlist()
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 3143, in altlist
    self._resolve_conflicts()
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 3193, in _resolve_confli
cts
    if not self._complete_graph():
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 2728, in _complete_graph
    if not self._create_graph(allow_unsatisfied=True):
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 717, in _create_graph
    allow_unsatisfied=allow_unsatisfied):
  File "/usr/lib/portage/pym/_emerge/depgraph.py", line 1168, in _add_pkg_deps
    portage.dep.paren_reduce(dep_string),
  File "/usr/lib/portage/pym/portage/dep.py", line 103, in paren_reduce
    left_paren = mystr.find("(")
TypeError: expected an object with the buffer interface


Reproducible: Always

Steps to Reproduce:
1. install portage with USE="python3"
2. emerge a package which apparently includes () in it's dependencies
3. watch it fail
Comment 1 Arc Riley 2009-12-01 19:21:08 UTC
I'm sorry, this was not a Python 3 issue.  I don't know what it is yet, but this bug was prematurely posted.
Comment 2 Zac Medico gentoo-dev 2009-12-02 06:04:44 UTC
If you can do it again with the --debug option then we'll know which package triggered it.
Comment 3 Arc Riley 2009-12-02 06:33:04 UTC
Created attachment 211736 [details]
emerge --debug -avu =dev-lang/python-2.6.4 >~arc/log 2>&1
Comment 4 Arc Riley 2009-12-02 06:34:33 UTC
I uploaded the full --debug output.

Python 3.1.1, Portage 2.1.7.9 (default/linux/x86/10.0, gcc-4.4.2, glibc-2.11-r0, 2.6.28-gentoo-selket i686)
Comment 5 Zac Medico gentoo-dev 2009-12-02 07:01:09 UTC
Created attachment 211737 [details, diff]
Fix the TypeError

Save as /tmp/update_dbentries.patch and apply as follows:

  patch /usr/lib/portage/pym/portage/update.py /tmp/update_dbentries.patch
Comment 6 Zac Medico gentoo-dev 2009-12-03 06:18:23 UTC
This is fixed in 2.1.7.10 and 2.2_rc55.