Skip to content

Add example of how to depend one pkg_deb .changes file#484

Merged
aiuto merged 19 commits intobazelbuild:mainfrom
aiuto:i477
Jan 28, 2022
Merged

Add example of how to depend one pkg_deb .changes file#484
aiuto merged 19 commits intobazelbuild:mainfrom
aiuto:i477

Conversation

@aiuto
Copy link
Copy Markdown
Collaborator

@aiuto aiuto commented Dec 10, 2021

  • Improve the example about finding output file paths to show how to
    get the implicit outputs like the changes file.

Fixes #477

cc/ @phlax

- Add tests for that
- Improve the example about finding output file paths to show how to
  get the implicit outputs like the changes file.

Fixes bazelbuild#477
@phlax
Copy link
Copy Markdown

phlax commented Dec 16, 2021

thanks for this @aiuto i have tested it and, as suggested, using filegroup to pull out the debs and changes files, it works a treat

@nacl
Copy link
Copy Markdown
Collaborator

nacl commented Dec 16, 2021

I will find time to review this today or Friday.

@aiuto
Copy link
Copy Markdown
Collaborator Author

aiuto commented Dec 16, 2021

@phlax Was the example clear enough?

@phlax
Copy link
Copy Markdown

phlax commented Dec 17, 2021

Was the example clear enough?

yep. also, happy to relate use...

first, i tried to just use the pkg_deb rule i have as a src for a pkg_tar rule

this gave me the files i wanted, but it also added unwanted rulename.deb.deb files

so i then added a filegroup for each output_group of deb and changes which gave me the specific files i wanted when added to my pkg_tar

the only mistake i initially made was in thinking that it required a pkg_filegroup rather than a filegroup but not sure if that actually needs to be disambiguated, just my confusion

hope this helps

Copy link
Copy Markdown
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

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

The documentation updates are very useful, but I don't think we've ever quite come to a consensus on what should be in DefaultInfo. See the large comment for a starter discussion. on that.

I think what you have specified here is the right thing to do, but I am not completely sold on it. The code looks good modulo the below small suggestions in the test code.

@aiuto
Copy link
Copy Markdown
Collaborator Author

aiuto commented Jan 13, 2022

@nacl If you could do a quick review again, I would like to get this in for the example, as it appears relevant to bazelbuild/bazel#7977

Copy link
Copy Markdown
Collaborator

@nacl nacl left a comment

Choose a reason for hiding this comment

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

LGTM. Please update/reword the commit message to indicate what actually is happening here -- just a documentation/examples update.

@aiuto aiuto changed the title Add .changes file to pkg_deb DefaultInfo Add example of how to depend one pkg_deb .changes file Jan 28, 2022
@aiuto aiuto merged commit 068a644 into bazelbuild:main Jan 28, 2022
@aiuto aiuto deleted the i477 branch January 28, 2022 20:08
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.

Unable to use changes output file from pkg_deb in further rules

3 participants