-
Notifications
You must be signed in to change notification settings - Fork 208
Add Aptsources822 lens for Deb822 style Apt sources #801
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
base: master
Are you sure you want to change the base?
Conversation
|
The lenses aptsources.aug and aptsources822.aug have overlapping definitions in the filter statement. Error in /etc/apt/sources.list.d/man_examples.sources (mxfm_load) According to the man page for sources.list.d:
This means that the existing lens should be limited to files named *.list, like this: Although this could be the subject of a separate PR, can I ask you to update this PR with the above change? |
|
The lens works well, and thank you in particular for including tests Just one point, if I may: Each "paragraph" must be separated by a non-comment blank line Multiple blank lines are permitted between "paragraphs", as long as there is at least one blank line Could you please update the lens to allow leading, trailing and repeated blank lines? |
f4e2619 to
15c3749
Compare
The lens 'aptsources' parses the old, one-line style sources list. These files must have .list as their extension[1]. On Debian 13 (Trixie) and newer systems, the new Deb822 styled files are more common. They use .sources as their extension. If the lens 'aptsources' tries to parse these newer files, it will fail as the format is completely different. Users upgrading theirs systems to Trixie will be prompted to upgrade the file format using simple command. So, .sources files are more prevalent now. Link: https://manpages.debian.org/trixie/apt/sources.list.5.en.html Signed-off-by: Sunil Mohan Adapa <[email protected]>
We are using this lens in FreedomBox to add/remove "tor+" prefix to Apt sources URIs. Original commit: https://salsa.debian.org/freedombox-team/freedombox/-/commit/cd21c7f247135828e63379cc6d32a8edcb53a582 Closes: hercules-team#297. [sunil: Handle DOS style line terminators for empty, comment, stanza lines] [sunil: Allow leading, trailing and repeating empty lines] [sunil: Don't allow spaces and tabs in empty lines separating stanzas] Link: https://salsa.debian.org/apt-team/apt/-/blob/3c9399e643a07074d47c9bceca88e8d43ff55d36/apt-pkg/tagfile.cc#L585 Link: https://salsa.debian.org/apt-team/apt/-/blob/3c9399e643a07074d47c9bceca88e8d43ff55d36/apt-pkg/tagfile.cc#L580 Signed-off-by: James Valleroy <[email protected]> Signed-off-by: Sunil Mohan Adapa <[email protected]>
15c3749 to
992e58d
Compare
|
@georgehansper , Thank you for the review. I have collaborated with @jvalleroy in this MR and addressed all the review comments. Here are my changes:
Please let me know if further changes are required. |
We are using this lens in FreedomBox to add/remove "tor+" prefix to Apt sources URIs. Original commit: https://salsa.debian.org/freedombox-team/freedombox/-/commit/cd21c7f247135828e63379cc6d32a8edcb53a582
Closes: #297.
Signed-off-by: James Valleroy [email protected]