Bug 461353 - Unexpected behavior with "package file manifest" entries starting with a hyphen
Summary: Unexpected behavior with "package file manifest" entries starting with a hyphen
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2008-09-06 11:58 UTC by Ville Skyttä
Modified: 2009-08-05 00:40 UTC (History)
5 users (show)

Fixed In Version: 4.7.1-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-14 08:44:42 UTC
Type: ---

Attachments (Terms of Use)

Description Ville Skyttä 2008-09-06 11:58:51 UTC
$ echo "-" > foo
$ rpm -qlp foo

rpm just sits there, apparently waiting for something to appear in stdin.

$ echo "--foobar" > foo
$ rpm -qlp foo

Also seems to trigger waiting for something from stdin.

If reading from stdin is indeed desired when "-" is read from a package file manifest, I think it would be good to have it documented in the rpm man page.  On the other hand, triggering stdin read on other things that start with a hyphen, not the hyphen alone, like "--foo", sounds like a bug that should be fixed to me.

Comment 1 Jeff Johnson 2008-09-06 20:18:25 UTC
Yes "-" opens stdin when encountered in a manifest.

Hint: Don't forget to add
   echo "/dev/random" > foo
   rpm -qlp foo
to your test matrix.

Comment 2 Jeff Johnson 2008-09-06 22:40:16 UTC
BTW, make sure that cat(1) gets an error message too, the behavior in UNIX
is quite pugly and confusing when, say, a new user types
    $ cat

Not even the hint of "-" on the CLI and nothing whatsoever happens. I'd
suggest adding an environment variable TELL_ME_WHAT_I_AM_DOING,
with level of expertise as value, and then using isatty(3) to tell when to prompt and
prod the new user into learning exactly what stdin is, and how to use
correctly. For extra credit, make sure the display message is available in all locales
and encodings.

Comment 3 Ville Skyttä 2008-09-07 14:02:10 UTC
Jeff, I don't know what kind of a Chewbacca defense mission you're on in this bug and elsewhere in Bugzilla today, about bugs that are not addressed to you, but I'll bite this much: cat's behavior with stdin and "-" is quite clearly defined, already pretty well in its manual page, and even better in the POSIX utilities spec.  It also does not treat every string that starts with a hyphen to mean stdin, nor does anything else I was aware of before the finding that led to this bug report.

Comment 4 Jeff Johnson 2008-09-07 14:17:30 UTC
I'm pointing out other closely related flaws in need of fixing.

Note that not one example either of us has given includes a package.
Is it the "R* Package Manager" of not?

Comment 5 Bug Zapper 2009-06-10 02:38:20 UTC
This message is a reminder that Fedora 9 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 9.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '9'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 9's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 9 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 

Comment 6 devzero2000 2009-07-11 20:10:10 UTC
A point on comment #3. Sure the bug are addressed elsewhere, to the RedHat (not R*) package manager, almost so it is  what i have undestood from you word. Not problem at all. But there are someone that have other interest,and spend much of its time, to resolve issue as of this, as the time come.  And, perhaps, the time may had come already: useless to put refs on this because none care.

Comment 7 Panu Matilainen 2009-07-14 08:44:42 UTC
Fixed upstream (much less typing involved than arguing about cat behavior), opening stdin from a manifest doesn't make any sense IMO either. Not imporant enough to separately track status for Fedora though, it'll come to Fedora through updates sooner or later.

Comment 8 Fedora Update System 2009-07-24 05:16:40 UTC
rpm-4.7.1-1.fc11 has been submitted as an update for Fedora 11.

Comment 9 Fedora Update System 2009-08-05 00:40:22 UTC
rpm-4.7.1-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

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