Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 64682 - Bug on "emerge -f " with "buildsyspkg" and a blocker
Summary: Bug on "emerge -f " with "buildsyspkg" and a blocker
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core - Interface (emerge) (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: Portage team
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-09-19 14:22 UTC by TGL
Modified: 2004-10-22 08:48 UTC (History)
0 users

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


Attachments
emerge--buildsyspkg_fix.patch (emerge--buildsyspkg_fix.patch,404 bytes, patch)
2004-09-19 14:23 UTC, TGL
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description TGL 2004-09-19 14:22:34 UTC
Here is what happen if one try to fetch a package that blocks another package when using the buildsyspkg FEATURE flag:

root % emerge -p broken

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[blocks B     ] =port-test/pkgA-2* (from pkg port-test/broken-1.0)
[ebuild  N    ] port-test/broken-1.0


root % emerge -f broken
Calculating dependencies ...done!

>>> emerge (1 of 2) port-test/broken-1.0 to /
Traceback (most recent call last):
  File "/usr/bin/emerge", line 2880, in ?
    mydepgraph.merge(mydepgraph.altlist())
  File "/usr/bin/emerge", line 1709, in merge
    issyspkg = ("buildsyspkg" in myfeat) \
  File "/usr/lib/portage/pym/portage.py", line 3263, in cpv_getkey
    return myslash[0]+"/"+mysplit[0]
TypeError: unsubscriptable object

I've only experienced this bug with .51-rc1, but I'm sure it also affects .50 (i know this part of the code since i wrote that ugly "buildsyspkg" hack).

I will attach a fix.
Comment 1 TGL 2004-09-19 14:23:03 UTC
Created attachment 39954 [details, diff]
emerge--buildsyspkg_fix.patch
Comment 2 Jason Stubbs (RETIRED) gentoo-dev 2004-09-20 17:35:52 UTC
Instead of:

  issyspkg = ("buildsyspkg" in myfeat) \
+   and x[0] == "ebuild" \
    and mysysdict.has_key(portage.cpv_getkey(x[2])) \

I used:

  issyspkg = ("buildsyspkg" in myfeat) \
+   and x[0] != "blocks" \
    and mysysdict.has_key(portage.cpv_getkey(x[2])) \

Presently, issyspkg is only used for checking if a binary should be built, but it may be used for other things in the future. This way should leave it a little more open for other uses...
Comment 3 Nicholas Jones (RETIRED) gentoo-dev 2004-10-22 08:48:08 UTC
Bug has been fixed and released in stable portages on or before 2.0.51-r2