Skip to content
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

Merged
merged 4 commits into from
Oct 23, 2017
Merged

Conversation

matthewrsj
Copy link
Contributor

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]

Copy link
Contributor

@phmccarty phmccarty left a 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")
Copy link
Contributor

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?

Copy link
Contributor Author

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]>
Copy link
Contributor

@phmccarty phmccarty left a 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

@matthewrsj matthewrsj merged commit 6017beb into master Oct 23, 2017
@matthewrsj matthewrsj deleted the prep-only branch October 23, 2017 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants