Skip to content

Include components when suite does not end with slash#1259

Open
bwitt wants to merge 1 commit intopuppetlabs:mainfrom
bwitt:bwitt/source-components
Open

Include components when suite does not end with slash#1259
bwitt wants to merge 1 commit intopuppetlabs:mainfrom
bwitt:bwitt/source-components

Conversation

@bwitt
Copy link

@bwitt bwitt commented Sep 17, 2025

Summary

Omit Components only when Suite ends with a slash.

Additional Context

https://repolib.readthedocs.io/en/latest/deb822-format.html

Related Issues (if any)

Fixes #1252

Checklist

  • 🟢 Spec tests.
  • 🟢 Acceptance tests.
  • Manually verified. (For example puppet apply)

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

Choose a reason for hiding this comment

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

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.

Copy link
Author

Choose a reason for hiding this comment

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

I've updated to fail in this case

@bwitt bwitt force-pushed the bwitt/source-components branch from 8c58f0d to 742f9f7 Compare February 16, 2026 00:40
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.

apt 11.0.0 creates invalid *.source files

2 participants