Bug 706161 - data returned from rpm -D and rpm --define is different
Summary: data returned from rpm -D and rpm --define is different
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 14
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Panu Matilainen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-19 16:31 UTC by Miloslav Trmač
Modified: 2012-05-07 09:28 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 166311
Environment:
Last Closed: 2012-05-07 09:28:03 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Miloslav Trmač 2011-05-19 16:31:42 UTC
To reproduce:

# see (rpmbuild --help) implying that -D and --define are the same
$ echo '%_rpmdir	/home/mitr/rh/rpm/RPMS' > ~/.rpmmacros
$ rpmbuild -D '_rpmdir foo' --eval '%_rpmdir'
/home/mitr/rh/rpm/RPMS
$ rpmbuild --define '_rpmdir foo' --eval '%_rpmdir'
foo

Seen in rpm-4.8.1-5.fc14.x86_64; today's git head still contains 'D' for --predefine.

If you don't want to change the behavior of -D, I'd be fine with just changing the --help output.

+++ This bug was initially created as a clone of Bug #166311 +++
[edited]

rpm -D and rpm --define are supposed to have the same functionality.  The
data returned by these two commands is different.

--- Additional comment from pnasrat on 2005-08-23 11:53:03 EDT ---

Created attachment 118008 [details]
Proposed patch

D was mapped both predefine and define this should be the correct fix.

Comment 1 Panu Matilainen 2011-05-20 07:13:57 UTC
(clearing up unnecessary privacy flags)

Thanks for digging up the old bug. I tried to collect these sort of fixes from RHEL and other distros back in 4.4.2.* days but I've completely missed this one. Applied upstream now, leaving open for Fedora tracking.

Comment 2 Panu Matilainen 2012-05-07 09:28:03 UTC
F14 is EOL, but fixed in Fedora >= 15 for quite some time now.


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