Bug 33108 - rpm --querytags barfs if any other options given
Summary: rpm --querytags barfs if any other options given
Keywords:
Status: CLOSED DEFERRED
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 7.0
Hardware: i386
OS: Linux
medium
low
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-03-25 05:33 UTC by j. alan eldridge
Modified: 2007-04-18 16:32 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2001-03-25 05:33:28 UTC
Embargoed:


Attachments (Terms of Use)

Description j. alan eldridge 2001-03-25 05:33:24 UTC
This is an inconsistency more than anything else, brought to my attention
because I use a wrapper around rpm to clean out LD_* vars and to set a
local rc file, if present.

That is, I do:
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---
#!/bin/sh
rpm=/bin/rpm
rcfile=
[[ $(id -u) != 0 ]] && {
    [ -f ~/.rpmrc ] && rcfile="--rcfile ~/.rpmrc"
}
unset LD_PRELOAD
unset LD_LIBRARY_PATH
exec $rpm $rcfile ${1+"$@"}
---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<-snip---8<---

I the case whre I have the local rc file,  "~/bin/rpm --querytags" results
in:
	/bin/rpm --rcfile ~/.rpmrc --querytags
which I will maintain is *completely* benign, harmless, wouldn't hurt a
kitten, etc, etc.

However, /bin/rpm itself doesn't like it, complaining "rpm: unexpected
arguments to --querytags".  [strace shows that the popt expansion of
--querytags never happens; the error is spat out before an attempt to exec
"/usr/lib/rpm/rpmq --querytag" happens.]

although i have not exhaustively tested, this looks from the man page to be
the *only* option that rpm treats as "this one, and not anything else, or
you'll be sorry". i can't see the harm in relaxing the checking a bit; an
rcfile argument should be allowed pretty much anywhere, i would think.

Comment 1 Jeff Johnson 2001-03-26 13:45:22 UTC
Yup. Workaround by giving --querytags w/o other options.


Note You need to log in before you can comment on or make changes to this bug.