openSUSE / cpanspec

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

Prevent invalid "perl-.spec" and "perl-.changes" from being generated #6

Closed kraih closed 6 years ago

kraih commented 6 years ago

There are multiple issues here. First, the regular expressions for extracting package names from tarballs use "(.*)" instead of "(.+)". And second, the get_file function prints a message indicating that it will skip files it can't find, but then happily proceeds to generate invalid spec and changes files.

Yes, the next alone should take care of the problem too. But i think it makes sense to be as defensive as possible considering the lack of tests.