-
-
Notifications
You must be signed in to change notification settings - Fork 442
Manage deb822 format and apt-key removal in trixie #1437
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
Manage deb822 format and apt-key removal in trixie #1437
Conversation
|
Just to let know you I am working on, comments are welcome |
5d70a6b to
5c4cebf
Compare
pyinfra/facts/apt.py
Outdated
| from __future__ import annotations | ||
|
|
||
| import re | ||
| from typing import List |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't actually need to import this, as it's deprecated. You should use list now as type annotation
pyinfra/facts/apt.py
Outdated
|
|
||
|
|
||
| class AptSources(FactBase): | ||
| def parse_deb822_stanza(lines: list[str]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type annotation.
pyinfra/facts/apt.py
Outdated
| return repos | ||
|
|
||
|
|
||
| def parse_apt_list_file(lines: List[str]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type annotation, use list[str] for lines
pyinfra/facts/apt.py
Outdated
| return repos | ||
|
|
||
|
|
||
| def parse_deb822_sources_file(lines: List[str]): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add return type annotation, use list[str] for lines
pyinfra/facts/apt.py
Outdated
| stanza. Returns a combined list of repo dicts for all stanzas. | ||
| """ | ||
| repos = [] | ||
| stanza: List[str] = [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| stanza: List[str] = [] | |
| stanza: list[str] = [] |
pyinfra/operations/apt.py
Outdated
| # 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)