Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 116783 - portageq best_version is broken with <root> other than /
Summary: portageq best_version is broken with <root> other than /
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
Depends on:
Blocks: 115839
  Show dependency tree
 
Reported: 2005-12-26 07:19 UTC by Andrew Gaffney (RETIRED)
Modified: 2006-01-27 19:25 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 Andrew Gaffney (RETIRED) gentoo-dev 2005-12-26 07:19:47 UTC
portageq best_version does not appear to work properly with a <root> other than /. This behavior exists in 2.0.51.22-r2 and 2.1_pre1.

agaffney@kagome ~ $ portageq best_version /mnt/old fluxbox
agaffney@kagome ~ $ ls -ld /mnt/old/var/db/pkg/x11-wm/fluxbox-0.9.14-r1
drwxr-xr-x  2 root root 4096 2005-09-23 21:47 /mnt/old/var/db/pkg/x11-wm/fluxbox-0.9.14-r1
agaffney@kagome ~ $ portageq best_version / fluxbox
x11-wm/fluxbox-0.9.14-r1
agaffney@kagome ~ $ ls -ld /var/db/pkg/x11-wm/fluxbox-0.9.14-r1
drwxr-xr-x  2 root root 4096 2005-12-10 13:18 /var/db/pkg/x11-wm/fluxbox-0.9.14-r1

Chroot'ing into /mnt/old and running 'portageq best_version / fluxbox' yields the installed version of fluxbox as it should.
Comment 1 Jason Stubbs (RETIRED) gentoo-dev 2005-12-26 07:22:03 UTC
`ROOT="/mnt/old" portageq best_version /mnt/old fluxbox` should work.

Will fix portageq so that it's not needed.
Comment 2 Andrew Gaffney (RETIRED) gentoo-dev 2005-12-26 07:59:09 UTC
Yes, that works, but here's another small issue:

agaffney@kagome ~ $ ROOT=/mnt/old portageq best_version /mnt/old fluxbox
agaffney@kagome ~ $ ROOT=/mnt/old portageq best_version /mnt/old/ fluxbox
x11-wm/fluxbox-0.9.14-r1

The <root> parameter seems to require a trailing slash. Afaik, this is a problem with portage.db and not portageq. I know fixing portageq would be relatively easy (if not root.endswith('/'): root += '/'), but what would it take to "fix" the portage module?
Comment 3 Jason Stubbs (RETIRED) gentoo-dev 2005-12-26 08:12:09 UTC
Nope, that's a problem with portageq as well. Have fixed the issue.
Comment 4 Jason Stubbs (RETIRED) gentoo-dev 2005-12-30 23:28:56 UTC
Released in portage-2.1_pre3
Comment 5 Jason Stubbs (RETIRED) gentoo-dev 2006-01-27 19:25:37 UTC
Released in 2.1_pre4