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

buildsys: Use bundle name setting for output #2403

Merged

Conversation

stmcginnis
Copy link
Contributor

Issue number:

Closes #2402

Description of changes:

The bundled-output-path setting for external files had a small error when processing the output bundle for Go project dependencies where it would always use the default value, even when a different value was provided. This fixes the name of the variable used so it uses the provided name instead. This already handles setting this to the default value if the package maintainer has not provided an overridden value.

Testing done:

Made local change in #2377 and made sure it would try to use the specified name instead of the default.

Terms of contribution:

By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.

The `bundled-output-path` setting for external files had a small error
when processing the output bundle for Go project dependencies where it
would always use the default value, even when a different value was
provided. This fixes the name of the variable used so it uses the
provided name instead. This already handles setting this to the default
value if the package maintainer has not provided an overridden value.

Signed-off-by: Sean McGinnis <[email protected]>
Copy link
Contributor

@jpmcb jpmcb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent! Tested this out on the hotdog package and gave the following Cargo.toml change:

bundle-output-path: "woof-woof.tar.gz"

and I see it now correctly renames it in the package's working directory:

❯ ls -la
total 1204
drwxr-xr-x.  3 fedora fedora    4096 Sep  7 21:56 .
drwxr-xr-x. 95 fedora fedora    4096 Sep  6 22:27 ..
-rw-r--r--.  1 fedora fedora     209 Aug  5 21:51 build.rs
-rw-r--r--.  1 fedora fedora     624 Sep  7 21:53 Cargo.toml
-rw-r--r--.  1 fedora fedora   17270 Sep  7 21:56 hotdog-b85b755.tar.gz
-rw-r--r--.  1 fedora fedora    2042 Sep  6 16:24 hotdog.spec
-rw-r--r--.  1 fedora fedora      12 Aug  5 21:51 pkg.rs
drwxr-xr-x.  3 fedora fedora    4096 Aug 23 19:25 target
-rw-r--r--.  1 fedora fedora 1180409 Sep  7 21:56 woof-woof.tar.gz

🐕

@stmcginnis stmcginnis merged commit a19e42a into bottlerocket-os:develop Sep 7, 2022
@stmcginnis stmcginnis deleted the ext-files-output-path branch September 7, 2022 22:38
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.

buildsys: external files bundle-output-path not being honored
3 participants