#87 filter_requires_in has started to match against paths prefixed with %buildroot
Closed: Fixed None Opened 12 years ago by ppisar.

I used to call %filter_requires_in with anchored path (!^/foo) but that stopped to work as reported in [https://bugzilla.redhat.com/show_bug.cgi?id=225672#c11]. I found the regular expression has been started evaluating against paths with %{buildroot} preppended.

It would be good to document this fact in packaging guidelines (current examples utilize $ only).

You should consider documenting new rpm-4.9 macros %__requires_exclude_from etc. too.


Interesting that rpm actually changed; I was wonder what had broken things.

Propose adding a section after "Location of macro invocation":

Pathnames

Some rpm versions pass pathnames to these macros with the build root prepended; some do not. It is strongly recommended that your regular expressions not anchor the match at the beginning of the string (i.e. not use "^") so that they work regardless of whether the build root is present in the string or not.

For the new stuff, please see the existing ticket: https://fedorahosted.org/fpc/ticket/76 and the draft at https://fedoraproject.org/wiki/User:Tibbs/AutoProvidesAndRequiresFiltering. You are welcome to help in working out the remaining issues with that draft.

action approved draft (+1:6, 0:0, -1:0)

Announcement text:

Some rpm versions pass pathnames to the automatic filtering macros, so a section has been added to the guidelines to help packagers deal with it:

https://fedoraproject.org/wiki/Packaging:AutoProvidesAndRequiresFiltering#Pathnames

Metadata Update from @tibbs:
- Issue assigned to spot

7 years ago

Login to comment on this ticket.

Metadata