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 replace 20.04->22.04 in repo URLs #5

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ubuntu20to22/upgrader.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ def construct_actions(
# we support following PHP versions: PHP 7.1, 7.2, 7.3.
actions.UpdateLegacyPhpRepositories(self._distro_from, self._distro_to),
actions.SetupUbuntuRepositories("focal", "jammy"),
actions.ReplaceAptReposRegexp(
r'(http|https)://([^/]+)/(.*\b)20\.04(\b.*)',
Copy link
Contributor

Choose a reason for hiding this comment

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

This looks scary 😆
But ok, let's try this approach

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For me replacing strings naively is more scary :)
I expect, at most no-op (transform the string as is) when it could harm.

'\g<1>://\g<2>/\g<3>22.04\g<4>',
),
actions.SwitchPleskRepositories(to_os_version="22.04"),
],
"Dist-upgrade": [
Expand Down
Loading