#669 More robust spec file presence checking
Merged by onosek. Opened by onosek.
onosek/rpkg specfile_checking  into  master

Download 669.patch

Some commands (verrel, sources, prep, import, ...) need to check whether the dist-git repository is in the correct state. It means at least the presence of the specfile.
In the beginning, rpkg detects layouts. Layouts determine the file structure of the repository. For example, most commands can't be executed for the RetiredLayout (there is no specfile).
When the repository directory exists, some layout can be always detected. Therefore '--path' argument is now checked for a valid directory.
The timeout change in the request fixes the new bandit's finding.

Fixes: #663
JIRA: RHELCMP-11387

Signed-off-by: Ondrej Nosek onosek@redhat.com

rebased onto 23b7b91dbe6b02d80d5867996862671f3fcf8fd2

rebased onto ea2cfa7fd40093ce10a8d099f934d3a9e9983294

This change seems suspicious. As far as I can tell, the u function is only used in rpkg in argument parser to handle non-ascii paths correctly.

Are we sure downstreams are not using it for something else though? Maybe it would be safer to add a new function that would do the conversion + validation.

I don't see any obvious problem with this change. It looks very reasonable to me. There could still be some use cases that I'm not thinking about though. That is likely going to always be the case, there are just too many different ways people have started to use rpkg.

rebased onto 1108810bdefd0d880517b274acd6a3bd0d4156e0

This change seems suspicious. As far as I can tell, the u function is only used in rpkg in argument parser to handle non-ascii paths correctly.

Are we sure downstreams are not using it for something else though? Maybe it would be safer to add a new function that would do the conversion + validation.

I didn't find u occurrences elsewhere either (with the exception of six.u). But I added new validation methods anyway.

Pull-Request has been merged by onosek

Metadata