[Rpm-maint] [rpm-software-management/rpm] %setup -T -a 0 -a 1 doesn't extract %{S:0} (#462)

Andreas Scherer notifications at github.com
Fri Sep 21 15:39:37 UTC 2018


@ignatenkobrain what exactly are you trying to set up in the `BUILD` arena? After downloading ca. 80 MB (which most certainly is not a 'minimal' example), I find that the two tarballs contain top-level directories `nipy-data-0.2/` and `nipy-templates-0.2/` respectively. So, with your example this should result in
```
nipy-data-0.2/
      nipy-data-0.2/
      nipy-templates-0.2/
```
where each subdirectory has similar stuff (`MANIFEST.in`, `PKG-INFO`, `README.txt`, and `setup.py`) and a single sub-subdirectory (`data` and `templates`, resp.).

If this really is your goal, then `%autosetup -c -a1` does exactly that. ([RTFM](http://ftp.rpm.org/max-rpm/s1-rpm-inside-macros.html))

* `-c` creates the default top-level and cd's into it
* the default source drop is extracted (`-T -a 0` is totally redundant and achieves the same effect)
* `-a 1` extracts the next tarball
----
However, if you aim for a more compact `BUILD` stage, I'd suggest to use
```
%autosetup
tar xzvf %{S:1} --strip-components=1
```
which results in
```
nipy-data-0.2/
      data/
      templates/
      MANIFEST.in
      PKG-INFO
      README.txt
      setup.py
```
(I haven't looked at the four top-level files, of which only one version survives extraction.)

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/462#issuecomment-423577883
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20180921/7358596a/attachment-0001.html>


More information about the Rpm-maint mailing list