Bug 49461 - rpm/popt options parsing incorrectly
rpm/popt options parsing incorrectly
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: popt (Show other bugs)
7.3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-07-19 14:16 EDT by Tom "spot" Callaway
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-07-19 14:17:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom "spot" Callaway 2001-07-19 14:16:09 EDT
Description of Problem:
popt not parsing options on cli correctly

How Reproducible:
always

Steps to Reproduce:
1. rpm -ba logjam.spec --target i386,i586,i686

Actual Results:
Building target platforms: logjam.spec
Building for target logjam.spec
error: failed to stat /usr/src/redhat/SPECS/i386,i586,i686: No such file or
directory


Expected Results:

rpms to be built for target architectures.
this works if the syntax is moved around to:

rpm -ba --target i386,i586,i686 logjam.spec

but it shouldn't discriminate on order.
Comment 1 Tom "spot" Callaway 2001-07-19 14:17:19 EDT
oh yeah. version of popt is popt-1.6.3-0.74, rpm is rpm-4.0.3-0.74
Comment 2 Jeff Johnson 2001-07-19 14:28:41 EDT
Either
	1) Specify --target first (as you've found)
	2) Execute rpmbuild directly.
Popt magic glue is execing rpmbuild for you for legacy compatible reasons,
and there's no way to reorder the args as desired until the legacy
compatibility is removed (not yet, or so I'm told).
Comment 3 Tom "spot" Callaway 2001-07-19 14:39:32 EDT
OK, addendum:

rpm -ba --target i386,i586,i686 --define 'withgnome 1' logjam.spec

this breaks, with a similar message

Building target platforms: --define
Building for target --define
error: failed to stat /usr/src/redhat/SPECS/withgnome 1: No such file or directory

this brings the conclusion that any options placed between --target and the
.spec are parsed as targets. this is a bad thing (tm).

this works when reordered as 
rpm -ba --define 'withgnome 1' --target=i386,i586,i686 logjam.spec
Comment 4 Jeff Johnson 2001-07-19 14:47:13 EDT
Again, the build modes (i.e. -ba) moved out of rpm over a year ago,
but, for legacy reasons, there is still some pokery jiggery to achieve
backeward compatibility. The intent is to move the build modes from
rpm to rpmbuild, so start typing "rpmbuild -ba ...", not "rpm -ba ...".

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