Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 160815 - equery doesn't respect ROOT for all subcommands
Summary: equery doesn't respect ROOT for all subcommands
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Tools (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-08 01:47 UTC by Richard Benjamin Voigt
Modified: 2013-02-25 18:03 UTC (History)
3 users (show)

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 Richard Benjamin Voigt 2007-01-08 01:47:04 UTC
Ok, my setup here is a little convoluted, but it's essentially exactly what ROOT= is designed for, so I think this needs to be fixed.

I have a Core 2 Duo with main AMD64 gentoo.  I have an i686-uclibc chroot.  Everything discussed here occurs when inside that chroot.

I use the ROOT= option to make images for bootable linux CDs, without having the whole portage support subsystem inside the tree (I exclude /var/db when I build the ISOs).

equery list works on the ROOT= install area, but equery files, equery belongs, etc don't work properly.

Reproducible: Always

Steps to Reproduce:
1.ROOT=/tinygentoo equery list
2.ROOT=/tinygentoo equery files baselayout-lite
3.ROOT=/tinygentoo equery belongs fsck

Actual Results:  
ROOT=/tinygentoo equery list

[ Searching for all packages in all categories among: ]
 * installed packages
[I--] [  ] app-misc/screen-4.0.3 (0)
[I--] [ ~] media-libs/libpng-1.2.14 (1.2)
[I--] [  ] net-analyzer/ifstat-1.1 (0)
[I--] [ ~] net-analyzer/net-snmp-5.4 (0)
[I--] [ ~] net-dns/dnsmasq-2.34 (0)
[I--] [  ] net-firewall/ebtables-2.0.6-r1 (0)
[I--] [ ~] net-firewall/iptables-1.3.7 (0)
[I--] [ ~] net-libs/libpcap-0.9.5 (0)
[I--] [ ~] net-misc/bridge-utils-1.2 (0)
[I--] [ ~] net-misc/dropbear-0.48.1 (0)
[I--] [  ] net-misc/ifenslave-1.1.0-r2 (0)
[I--] [ ~] net-misc/vconfig-1.9 (0)
[I--] [ -] sys-apps/baselayout-lite-1.0_pre1 (0)
[I--] [ ~] sys-apps/iproute2-2.6.18.20061002 (0)
[I--] [  ] sys-libs/ncurses-5.5-r3 (5)
[I--] [ -] sys-libs/uclibc-0.9.28-r1 (0)
[I--] [  ] sys-libs/zlib-1.2.3-r1 (0)


ROOT=/tinygentoo equery files baselayout-lite
s/libpng-1.2.14 (1.2)
[I--] [  ] net-analyzer/ifstat-1.1 (0)
[I--] [ ~] net-analyzer/net-snmp-5.4 (0)
[I--] [ ~] net-dns/dnsmasq-2.34 (0)
[I--] [  ] net-firewall/ebtables-2.0.6-r1 (0)
[I--] [ ~] net-firewall/iptables-1.3.7 (0)
[I--] [ ~] net-libs/libpcap-0.9.5 (0)
[I--] [ ~] net-misc/bridge-utils-1.2 (0)
[I--] [ ~] net-misc/dropbear-0.48.1 (0)
[I--] [  ] net-misc/ifenslave-1.1.0-r2 (0)
[I--] [ ~] net-misc/vconfig-1.9 (0)
[I--] [ -] sys-apps/baselayout-lite-1.0_pre1 (0)
[I--] [ ~] sys-apps/iproute2-2.6.18.20061002 (0)
[I--] [  ] sys-libs/ncurses-5.5-r3 (5)
[I--] [ -] sys-libs/uclibc-0.9.28-r1 (0)
[I--] [  ] sys-libs/zlib-1.2.3-r1 (0)
s/libpng-1.2.14 (1.2)
[I--] [  ] net-analyzer/ifstat-1.1 (0)
[I--] [ ~] net-analyzer/net-snmp-5.4 (0)
[I--] [ ~] net-dns/dnsmasq-2.34 (0)
[I--] [  ] net-firewall/ebtables-2.0.6-r1 (0)
[I--] [ ~] net-firewall/iptables-1.3.7 (0)
[I--] [ ~] net-libs/libpcap-0.9.5 (0)
[I--] [ ~] net-misc/bridge-utils-1.2 (0)
[I--] [ ~] net-misc/dropbear-0.48.1 (0)
[I--] [  ] net-misc/ifenslave-1.1.0-r2 (0)
[I--] [ ~] net-misc/vconfig-1.9 (0)
[I--] [ -] sys-apps/baselayout-lite-1.0_pre1 (0)
[I--] [ ~] sys-apps/iproute2-2.6.18.20061002 (0)
[I--] [  ] sys-libs/ncurses-5.5-r3 (5)
[I--] [ -] sys-libs/uclibc-0.9.28-r1 (0)
[I--] [  ] sys-libs/zlib-1.2.3-r1 (0)


ROOT=/tinygentoo equery files baselayout-lite
[ Searching for packages matching baselayout-lite... ]

ROOT=/tinygentoo equery belongs fsck
[ Searching for file(s) fsck in *... ]
sys-fs/e2fsprogs-1.39-r1 (/sbin/fsck)


Expected Results:  
equery should search the packages installed in /tinygentoo, and not report the packages in the uclibc build host.
Comment 1 Richard Benjamin Voigt 2007-01-08 01:48:57 UTC
Scratch the entire second block of "Actual results", I had the wrong thing in my mouse buffer and didn't notice.

The first block (list), and third and fourth blocks (files and belongs) are accurate.
Comment 2 Marc Blumentritt 2007-10-10 12:19:05 UTC
Hi,

I have got a similar problem with a nearly identical setup. I get the following results:

(build) hive portage # ROOT=/mediamachine/devroot/ equery list
[ Searching for all packages in all categories among: ]
 * installed packages
[I--] [M~] sys-apps/baselayout-2.0.0_rc4-r1 (0)
[I--] [  ] sys-apps/coreutils-6.9-r1 (0)
[I--] [M~] sys-apps/makedev-3.23.1 (0)
[I--] [  ] sys-apps/module-init-tools-3.2.2-r3 (0)
[I--] [M~] sys-apps/sysvinit-2.86-r9 (0)
[I--] [  ] sys-libs/ncurses-5.6-r1 (5)
[I--] [ -] sys-libs/uclibc-0.9.28.3 (0)
[I--] [  ] sys-libs/zlib-1.2.3-r1 (0)
[I--] [  ] virtual/init-0 (0)

looks fine

(build) hive portage # ROOT=/mediamachine/devroot/ equery files zlib     
[ Searching for packages matching zlib... ]
* Contents of sys-libs/zlib-1.2.3-r1:
/mediamachine/devroot/lib
/mediamachine/devroot/lib/libz.so -> libz.so.1.2.3
/mediamachine/devroot/lib/libz.so.1 -> libz.so.1.2.3
/mediamachine/devroot/lib/libz.so.1.2.3
/mediamachine/devroot/usr
/mediamachine/devroot/usr/include
/mediamachine/devroot/usr/include/zconf.h
/mediamachine/devroot/usr/include/zlib.h
/mediamachine/devroot/usr/lib
/mediamachine/devroot/usr/lib/libz.a
/mediamachine/devroot/usr/lib/libz.so

looks fine...

(build) hive portage # ROOT=/mediamachine/devroot/ equery files baselayout
[ Searching for packages matching baselayout... ]

??

(build) hive portage # ROOT=/mediamachine/devroot/ equery files sysvinit  
[ Searching for packages matching sysvinit... ]

??

It looks like, as if the content of every stable package can be listed by equery, while the testing (and hard masked) packages cannot be listed.

Regards
Marc
Comment 3 Douglas Anderson 2010-03-07 04:18:31 UTC
This needs additional testing with the gentoolkit 0.3.0 branch. Anyone who can confirm if this is still an issue, please do.