Bug 1397209 - expansion of macro in %autosetup
Summary: expansion of macro in %autosetup
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-11-21 22:38 UTC by Igor Gnatenko
Modified: 2017-03-07 12:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-01-16 14:02:18 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github rpm-software-management rpm issues 127 0 None closed Parametric macro arguments are not expanded 2020-11-01 22:22:38 UTC

Description Igor Gnatenko 2016-11-21 22:38:12 UTC
%global rev 133
...
%autosetup %{?rev:-c}
...

but it doesn't really do `-c`. If I remove macro (%autosetup -c) it starts working

Comment 1 Igor Gnatenko 2016-11-21 22:38:40 UTC
with %setup -q %{?rev:-c} it works fine.

Comment 2 Panu Matilainen 2016-11-22 04:37:19 UTC
IIRC this is "by design" for parameterized macros like %autosetup, %setup is not a macro even if it looks like one...

Comment 3 Igor Gnatenko 2016-11-22 08:17:45 UTC
(In reply to Panu Matilainen from comment #2)
> IIRC this is "by design" for parameterized macros like %autosetup, %setup is
> not a macro even if it looks like one...
Okay, but I think it's bug. We should expand such conditionals everywhere.

Comment 4 Panu Matilainen 2017-01-16 06:58:22 UTC
This is an upstream issue, lets move the discussion there: https://github.com/rpm-software-management/rpm/issues/127

I'm tempted to CLOSE -> UPSTREAM but we can keep this open for Fedora tracking if you like.

Comment 5 Panu Matilainen 2017-03-07 12:52:15 UTC
FWIW, fixed upstream now at https://github.com/rpm-software-management/rpm/commit/5adc56897b9da5dac49701f704ef54390db57c59

Lets see what breaks ;)


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