Manage deb822 format and apt-key removal in trixie#1437
Manage deb822 format and apt-key removal in trixie#1437maisim wants to merge 4 commits intopyinfra-dev:3.xfrom
Conversation
|
Just to let know you I am working on, comments are welcome |
5d70a6b to
5c4cebf
Compare
| from __future__ import annotations | ||
|
|
||
| import re | ||
| from typing import List |
There was a problem hiding this comment.
You don't actually need to import this, as it's deprecated. You should use list now as type annotation
|
|
||
|
|
||
| class AptSources(FactBase): | ||
| def parse_deb822_stanza(lines: list[str]): |
There was a problem hiding this comment.
Add return type annotation.
| return repos | ||
|
|
||
|
|
||
| def parse_apt_list_file(lines: List[str]): |
There was a problem hiding this comment.
Add return type annotation, use list[str] for lines
| return repos | ||
|
|
||
|
|
||
| def parse_deb822_sources_file(lines: List[str]): |
There was a problem hiding this comment.
Add return type annotation, use list[str] for lines
| stanza. Returns a combined list of repo dicts for all stanzas. | ||
| """ | ||
| repos = [] | ||
| stanza: List[str] = [] |
There was a problem hiding this comment.
| stanza: List[str] = [] | |
| stanza: list[str] = [] |
| # then export and dearmor to the APT keyring destination. | ||
| yield ( | ||
| "sh -c 'set -e;" | ||
| " install -d -m 0755 /etc/apt/keyrings;" |
There was a problem hiding this comment.
Why not use a fact to check if that dir already exists and only emit a files.directory command if it doesn't?
|
Hey @maisim, I hope you don't mind me leaving some comments. I agreed with @Fizzadar to help him out a bit with reviewing PRs. This is great work! Support for the new DEB822-style apt sources and a replacement for I have a couple of general suggestions, and I'll leave it to @Fizzadar if he agrees:
|
|
Hi @DonDebonair ! |
|
Let me know if you need any help @maisim ! |
5c4cebf to
18070e3
Compare
|
Hi @DonDebonair , Big changes here, this is still a WIP. Don't waste your time and let me double check tomorrow before :) |
|
It's a big all in one push but i will take care to split all this when I will get this all working ;) |
d8a1cbe to
2c1bdf5
Compare
|
I started separating this into several PRs, the first one is here #1460 |
WIP
3.xat this time)scripts/dev-test.sh)scripts/dev-lint.sh)