openSUSE / cpanspec

Create openSUSE spec files form cpan tar files
Other
8 stars 10 forks source link

Skip directories when unpacking archive #13

Closed perlpunk closed 5 years ago

perlpunk commented 5 years ago

e.g. instead of having:

LibYAML
LibYAML/XS.xs
LibYAML/api.c

we now skip the first entry:

LibYAML/XS.xs
LibYAML/api.c

The problem was that the LibYAML directory ended up in %doc, and obs failed because this directory contained compiled c code (after the build).

[   57s] perl-YAML-LibYAML.x86_64: W: zero-length /usr/share/doc/packages/perl-YAML-LibYAML/LibYAML/LibYAML.bs
[   57s] perl-YAML-LibYAML.x86_64: W: zero-length /usr/share/doc/packages/perl-YAML-LibYAML/LibYAML/pm_to_blib
[   57s] perl-YAML-LibYAML.x86_64: E: arch-dependent-file-in-usr-share (Badness: 590) /usr/share/doc/packages/perl-YAML-LibYAML/LibYAML/LibYAML.o
[   57s] perl-YAML-LibYAML.x86_64: E: arch-dependent-file-in-usr-share (Badness: 590) /usr/share/doc/packages/perl-YAML-LibYAML/LibYAML/api.o
[   58s] perl-YAML-LibYAML.x86_64: E: arch-dependent-file-in-usr-share (Badness: 590) /usr/share/doc/packages/perl-YAML-LibYAML/LibYAML/dumper.o
coolo commented 5 years ago

that code is really old, I wonder why we didn't notice this problem so far

perlpunk commented 5 years ago

Of course there will be a lot of directories missing now, when this is run next time. Most of them were probably never supposed to be in the docs directory, but some might. But that shouldn't be critical.

An alternative for solving the specific problem of YAML-LibYAML would be to run a make realclean after building and before packaging.

coolo commented 5 years ago

We'll see - missing doc directories shouldn't harm the build at least