-
Notifications
You must be signed in to change notification settings - Fork 75
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
refactor: simplify prerm to not import python #2783
Conversation
Jira: This PR is not related to a Jira item. (The PR title does not include a SC-#### reference) GitHub Issues: No GitHub issues are fixed by this PR. (No commits have Fixes: #### references) Launchpad Bugs:
Documentation: The changes in this PR do not require documentation changes. 👍 this comment to confirm that this is correct. |
1128e21
to
91b0a7e
Compare
LP: #2021988
91b0a7e
to
d826d66
Compare
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.
LGTM, thanks!
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.
LGTM, I just think there is one service missing
' | ||
|
||
# This list should be kept up to date with the list of available apt-repo-based services | ||
for service in anbox cc-eal cis esm-apps esm-infra fips fips-preview fips-updates realtime-kernel ros ros-updates; do |
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.
I think we also need usg
here
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.
It won't hurt, but is the apt source file named with the presented_as
name?
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.
nope, source-file and key will be ubuntu-cis.list
unfortunately 🤡 :upset_cry:
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.
/methinks we can merge this
@@ -661,43 +660,6 @@ def remove_apt_list_files(repo_url, series): | |||
system.ensure_file_absent(path) | |||
|
|||
|
|||
def clean_apt_files(*, _entitlements=None): |
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.
removing code and keeping functionality? good good
CI errors are unrelated |
LP: #2021988
Why is this needed?
Importing our python module in prerm exposes the packaing script to all the complexity of our python and the risk that a seemingly unrelated change in the python could affect the prerm script.
This happened when we started relying on python3-apt and resulted in LP: #2021988
This PR removes the python import entirely and instead hardcodes the files that need to be removed.
Test Steps
Checklist
Does this PR require extra reviews?