Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

4.15.1: multiple "-a<num>" parameters in %autosetup are not handled correctly #1204

Closed
kloczek opened this issue May 3, 2020 · 3 comments
Closed

Comments

@kloczek
Copy link
Contributor

kloczek commented May 3, 2020

Looks like if it is something like:

%prep
%autosetup -a1 -a2 -a3

only Source0 and Source1 will be unpacked. Probably it will be necessary to copy some parts from %setup so theoretically it should be easy to fix.

@ignatenkobrain
Copy link
Contributor

This is known bug. %setup is not really a macro, but rather something which is parsed by RPM internally. However, %autosetup is a real macro, so it parses only last -a argument.

@pmatilai
Copy link
Member

pmatilai commented May 4, 2020

See #462 / #546 , this is a limitation of the macro machinery.

@pmatilai pmatilai closed this as completed May 4, 2020
@nim-nim
Copy link

nim-nim commented Jul 6, 2020

If you wanted to fix %autosetup for multiple archives you’d need to change it to behave the same way as %forgesetup/%forge_prep:

  1. move things you’re used to pass on the macro CLI to control variables attached to a specific source file, using naming tricks to implement the attachment
  2. make the bettersetup atom process a single archive
  3. loop over archives that need processing, calling one bettersetup atom a time, un-stacking the control variables that correspond to the archive being processed

A single multiplexing call is quite hard to achieve in generic software and completely above the capabilities of the current rpm argument parser.

(the %auto_ framework I posted contains all the basic building blocks to create such looping macros, but you still need to assemble the building blocks in your own bettersetup implementation)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants