Bug 4263 - rpm-3.0.2 - macro problems - some sorting goes wrong
rpm-3.0.2 - macro problems - some sorting goes wrong
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-07-30 04:10 EDT by benedict
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-08-16 12:20:30 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 benedict 1999-07-30 04:10:44 EDT
The following snippet

%define AAAAAAAAA alphabetically first

%define testmacro() echo %1

echo %{AAAAAAAAA}

%testmacro a

echo %{AAAAAAAAA}

expands to

echo alphabetically first

echo a
echo %{AAAAAAAAA}

If I use ZZZZZZZZZ as the name, problem disappears:

%define ZZZZZZZZZ alphabetically last

%define testmacro() echo %1

echo %{ZZZZZZZZZ}

%testmacro a

echo %{ZZZZZZZZZ}

expands to

echo alphabetically last

echo a
echo alphabetically last
Comment 1 Jeff Johnson 1999-08-15 15:30:59 EDT
Macros are retrieved using bsearch which depends on having the
list of macro names in sorted order so that a binary search
works. There was a problem with the list not being sorted
after an undefine, but I believe that I've fixed that.

Can you verify if the problem exists in the latest rpm-3.0.3?
If the problem does persist, can you send me an entire
spec file (since I believe the problem is triggered by an undefine)?

Thanks.
Comment 2 Jeff Johnson 1999-08-16 12:16:59 EDT
Macros are retrieved using bsearch which depends on having the
list of macro names in sorted order so that a binary search
works. There was a problem with the list not being sorted
after an undefine, but I believe that I've fixed that.

Can you verify if the problem exists in the latest rpm-3.0.3?
If the problem does persist, can you send me an entire
spec file (since I believe the problem is triggered by an undefine)?

Thanks.
Comment 3 Jeff Johnson 1999-08-16 12:20:59 EDT
Fixed in CVS and will be in rpm-3.0.3-0.15). There was a missing
sort after a popMacro which screwed up the bsearch lookup.

Thanks for the spec file to reproduce.

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