Bug 4263 - rpm-3.0.2 - macro problems - some sorting goes wrong
Summary: rpm-3.0.2 - macro problems - some sorting goes wrong
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 6.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 1999-07-30 08:10 UTC by benedict
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 1999-08-16 16:20:30 UTC
Embargoed:


Attachments (Terms of Use)

Description benedict 1999-07-30 08:10:44 UTC
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 19:30:59 UTC
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 16:16:59 UTC
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 16:20:59 UTC
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.