Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 40198 - python-updater doesn't work sometimes
Summary: python-updater doesn't work sometimes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All All
: Highest normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-02 10:43 UTC by Chris Bainbridge (RETIRED)
Modified: 2004-02-02 13:08 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Bainbridge (RETIRED) gentoo-dev 2004-02-02 10:43:40 UTC
When depreorder.py is called with some arguments its supposed to reorder the modules to rebuild according to their dependency order. On some packages it fails with no output.

Example working:

# python /usr/portage/dev-lang/python/files/depreorder.py dev-python/wxPython-2.4.1.2
dev-python/wxPython-2.4.1.2

Example failure:

# python /usr/portage/dev-lang/python/files/depreorder.py dev-python/python-fchksum-1.6.1-r1

#

This also happens with dev-python/numeric-22.0 dev-python/m2crypto-0.07_alpha3 dev-python/pygame-1.5.5 dev-python/gnosis-utils-1.0.6 dev-python/gnuplot-py-1.6 app-arch/rpm-4.2_pre069.

The problem: 

These packages have no dependency info, so this bit of code in depreorder.py fails:

    for dep in realdeps[1]:
        vardeps = vardeps + varapi.match(dep)
        dep_cache[pkg] = ( 0, vardeps, slot )

It should be:

    for dep in realdeps[1]:
        vardeps = vardeps + varapi.match(dep)
    dep_cache[pkg] = ( 0, vardeps, slot )

Note different indentation on dep_cache. In the first instance dep_cache[pkg] isn't created unless the package has at least one dependency. In the second its always created. Another option would be to add dependency info to all the ebuilds, but some have notes that this would create circular dependencies with python.

I've tested this fix and afterwards python-updater runs correctly.
Comment 1 Alastair Tse (RETIRED) gentoo-dev 2004-02-02 13:08:15 UTC
thanks for the well spotted mistake, actually, a quite serious typo on my part :(

the change is now in portage.