feat: add support for Deb822 (.sources files)#1823
feat: add support for Deb822 (.sources files)#1823silentJET85 wants to merge 1 commit intowimpysworld:mainfrom
Conversation
There was a problem hiding this comment.
1 issue found across 1 file
Confidence score: 3/5
- There is a concrete behavior risk:
deb-getparsing of Deb822APT_REPO_OPTIONStruncates values at the first space, which can silently rewrite multi-value fields likeArchitecturesinto incorrect.sourcesoutput. - Given the issue is severity 4/10, this is not likely catastrophic, but it is user-facing configuration drift and can lead to wrong repository behavior, so merge risk is moderate rather than minimal.
- Pay close attention to
deb-get- Deb822 option parsing needs to preserve full field values (including spaces) to avoid malformed.sourcesentries.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="deb-get">
<violation number="1" location="deb-get:1305">
P2: Deb822 APT_REPO_OPTIONS parsing truncates field values at the first space, so multi-value fields (e.g., Architectures) are silently rewritten and produce incorrect .sources configuration.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
|
Actually, now I'm reconsidering if this is the best approach. Parsing the existing |
|
I've updated it to check an environment variable called |
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: This PR modifies core repository management logic and introduces string parsing/manipulation for system configuration files, which could impact package manager stability.
There was a problem hiding this comment.
0 issues found across 1 file (changes from recent commits).
Requires human review: This PR modifies core logic for managing system APT repositories, including parsing and file system operations in /etc/apt/. Such changes carry high risk and require human validation.
ee046ad to
21ae50f
Compare
21ae50f to
addface
Compare
There was a problem hiding this comment.
No issues found across 1 file
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Requires human review: Modifies core repository management and file handling logic for APT sources, which involves complex string transformations that require human review.
closes #1816
EDIT: (I reworked this. See latest posts down below.)
This adds optional support for the newer Deb822
.sourcesfiles. Existing support for.listfiles is not affected.These new variables are used in a package to create a.sourcesfile:*APT_SOURCES_URLThis contains the URL to the repository. This variable being set is also what tells deb-get to use the new format.*APT_SUITESThis contains the suite(s). Equivalent to the "word" after the URL in the old format.*APT_COMPONENTSThe component(s). In the old format, this would usually be the remainder of the line after the "suite." If the suite ends with a/, this is unused.These existing variables are also used:
APT_LIST_NAMEThis variable is still used to create the name of the file, but with the.sourcesextension.*APT_REPO_OPTIONSThis still contains the options, but you need to specify them in the new format.For example
"Architectures: amd64"instead of"arch=amd64"ASC_KEY_URL,GPG_KEY_URLandGPG_KEY_IDwork exactly the same as normal.For some examples of how these would be used, here are some modified versions of existing packages that I used for testing: