-
Notifications
You must be signed in to change notification settings - Fork 58
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
Add --prep-only option to run preparatory work only #43
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this option would be more useful if autospec could also dump the values that it detects for "Name" "Version", and "Source0". Then, the user can easily copy those to the spec file. Or maybe it could write those values to the spec file header directly?
@@ -175,6 +178,14 @@ def main(): | |||
"-a/--archives or options.conf['package']['archives'] requires an " | |||
"even number of arguments")) | |||
|
|||
if args.prep_only: | |||
package(args, url, name, archives, "./workingdir") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see an empty directory called "output" within workingdir. Is that directory supposed to be empty?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've removed the unused output directory
For non-autospec enabled packages this option can be used to download the upstream tarball, any specified archives, extract them and put the archives at their destination, and update the upstream file, but not actually attempt to build a specfile. Signed-off-by: Matthew Johnson <[email protected]>
Since moving output to a temporary directory, the "output" directory has fallen out of use. Remove the output directory from autospec. Signed-off-by: Matthew Johnson <[email protected]>
Save the package metadata to the ./workingdir directory for --prep-only runs. Signed-off-by: Matthew Johnson <[email protected]>
Also move the prep work into its own function to make it easier to manage if it continues to grow. Signed-off-by: Matthew Johnson <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
For non-autospec enabled packages this option can be used to download
the upstream tarball, any specified archives, extract them and put the
archives at their destination, and update the upstream file, but not
actually attempt to build a specfile.
Signed-off-by: Matthew Johnson [email protected]