Bug 1397209

Summary: expansion of macro in %autosetup
Product: [Fedora] Fedora Reporter: Igor Gnatenko <ignatenko>
Component: rpmAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ignatenko, kardos.lubos, novyjindrich, packaging-team-maint, pknirsch, pmatilai
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-01-16 14:02:18 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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 ;)