Summary: | app-portage/portage-utils-0.20: better $ROOT support for qfile | ||
---|---|---|---|
Product: | Portage Development | Reporter: | TGL <tom.gl> |
Component: | Tools | Assignee: | Portage Utils Team <portage-utils> |
Status: | RESOLVED FIXED | ||
Severity: | enhancement | Keywords: | InVCS |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
qfile-0.20-better-ROOT-support.patch
portage-utils-0.1.20-verbose-qfile-manpage.patch |
Description
TGL
2006-07-30 13:36:58 UTC
Created attachment 93084 [details, diff]
qfile-0.20-better-ROOT-support.patch
The display results I get from this patch are questionable. I don't think this is what you probably expected for behavior. env ROOT=/dev/shm emerge -K portage-utils $ ROOT=/dev/shm ./qfile q app-portage/portage-utils (/usr/bin/q) $ ROOT=/dev/shm ./qfile /dev/shm/usr/bin/q $ ROOT=/dev/shm ./qfile -R /dev/shm /usr/bin/q file: Real path of "/dev/" is not under ROOT: /dev file: Skipping query item "/dev/shm". file: Real path of "/usr/bin/" is not under ROOT: /usr/bin file: Skipping query item "/usr/bin/q". $ ./qfile -R /dev/shm /usr/bin/q app-portage/portage-utils (/usr/bin/q) $ ROOT=/dev/shm ./qfile /usr/bin/q app-portage/portage-utils (/usr/bin/q) $ ROOT=/dev/shm ./qfile -R /dev/shm/ /dev/shm/usr/bin/q file: Real path of "/dev/" is not under ROOT: /dev file: Skipping query item "/dev/shm". app-portage/portage-utils (/dev/shm/usr/bin/q) (In reply to comment #2) > I don't think this is what you probably expected for behavior. Actually it is: > $ ROOT=/dev/shm ./qfile /dev/shm/usr/bin/q No result because "q" is recorded in VDB as "/usr/bin/q", not "/dev/shm/usr/bin/q". It is also the current qfile behavior. Valid queries would rather be one this two: $ ROOT=/dev/shm ./qfile /usr/bin/q $ ROOT=/dev/shm ./qfile -R /dev/shm/usr/bin/q > $ ROOT=/dev/shm ./qfile -R /dev/shm /usr/bin/q > file: Real path of "/dev/" is not under ROOT: /dev > file: Skipping query item "/dev/shm". > file: Real path of "/usr/bin/" is not under ROOT: /usr/bin > file: Skipping query item "/usr/bin/q". There should be no space in "/dev/shm /usr/bin/q". The -R option expects no parameter: it is a simple flag to say that your query items already include their $ROOT prefix. Its purpose is to be able to do things like this: $ ROOT=/dev/shm ./qfile -R /dev/shm/usr/bin/* ...as a shortcut for: $ ROOT=/dev/shm ./qfile $(ls /dev/shm/usr/bin/ | sed "s:^/dev/shm::") It also allows things like this: $ cd /dev/shm/usr/bin $ ROOT=/dev/shm ./qfile -R ./q I think this explains the other weirdness you've seen (each time, you have 2 query items, where you were thinking of only one). Since obviously the -R behavior was not obvious, i've thought it should be better documented in the manpage. I will attach a patch which does that (and also details the other options, since i was at it...). The manpage is still generated by help2man, but includes some additional sections (see the mkman.sh change in first chunk of the patch). Do you think it's a good idea? Created attachment 94694 [details, diff]
portage-utils-0.1.20-verbose-qfile-manpage.patch
I merged your patch but shoved all the include files in man/include/*.include Released in portage-utils-0.1.21 |