Include components when suite does not end with slash#1259
Open
bwitt wants to merge 1 commit intopuppetlabs:mainfrom
Open
Include components when suite does not end with slash#1259bwitt wants to merge 1 commit intopuppetlabs:mainfrom
bwitt wants to merge 1 commit intopuppetlabs:mainfrom
Conversation
rrotter
reviewed
Feb 12, 2026
spec/defines/source_spec.rb
Outdated
| it { is_expected.to contain_apt__setting("sources-#{title}").without_content(%r{Components:}) } | ||
| end | ||
|
|
||
| context 'multiple suites, not all end with slash (should require Components)' do |
There was a problem hiding this comment.
This is incorrect, and will produce an invalid file.
Multiple Suites, where some end with a slash and some don't, is not allowed and stops apt-get from parsing any apt sources (not just the invalid source).
I would expect an error to be raised at this point, because the only alternative to failing to apply the catalog is writing an invalid file that will break apt.
Author
There was a problem hiding this comment.
I've updated to fail in this case
8c58f0d to
742f9f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Omit
Componentsonly when Suite ends with a slash.Additional Context
https://repolib.readthedocs.io/en/latest/deb822-format.html
Related Issues (if any)
Fixes #1252
Checklist
puppet apply)