Skip to content
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

FIX Add ability to regexp-replace repo.list files #76

Merged
merged 7 commits into from
Sep 30, 2024

Conversation

ukablan-wpc
Copy link
Contributor

Fixes: PAUX-6369 Invalid APT sources produced by source switch procedure

@SandakovMM
Copy link
Contributor

Overall, Could you please tell what the plan is for using regular expression substitution in the next step?
Is it possible to avoid using regular expressions? =)

@ukablan-wpc
Copy link
Contributor Author

Overall, Could you please tell what the plan is for using regular expression substitution in the next step? Is it possible to avoid using regular expressions? =)

As the bug is related to repo.list lines i.e.

deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/ubuntu/20.04/prod focal main

I am planning to utilize it to replace URLs with version strings inside (and possibly support smart replaces as opposed to SetupAptRepositories)

@SandakovMM
Copy link
Contributor

I am planning to utilize it to replace URLs with version strings inside (and possibly support smart replaces as opposed to SetupAptRepositories)

I see.
I just want to mention that, IMO using regular expressions seems a bit excessive if we are only replacing "20" with "22". However, they are acceptable if we plan to add more complex change.

pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/common/src/files.py Outdated Show resolved Hide resolved
pleskdistup/common/src/files.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
Fixes: PAUX-6369 Invalid APT sources produced by source switch procedure
Copy link
Contributor

@kpushkaryov kpushkaryov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I advise to add a setter to the name property to make it not read-only. See the InstallPackages class for an example.

Copy link
Contributor

@kpushkaryov kpushkaryov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also please note failed flake8 checks.

pleskdistup/actions/distupgrade.py Outdated Show resolved Hide resolved
pleskdistup/common/src/files.py Outdated Show resolved Hide resolved
pleskdistup/common/src/files.py Outdated Show resolved Hide resolved
@ukablan-wpc ukablan-wpc requested review from lucer and kpushkaryov and removed request for kpushkaryov September 30, 2024 11:26
@ukablan-wpc ukablan-wpc merged commit db08062 into plesk:main Sep 30, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants