Merge ~bryce/ubuntu/+source/php8.1:fix-lp1890263-jammy into ubuntu/+source/php8.1:ubuntu/devel
Status: | Merged |
---|---|
Merge reported by: | Bryce Harrington |
Merged at revision: | 131b045cd85901ba1c4fd68ca9242f680f34d820 |
Proposed branch: | ~bryce/ubuntu/+source/php8.1:fix-lp1890263-jammy |
Merge into: | ubuntu/+source/php8.1:ubuntu/devel |
Diff against target: |
139 lines (+75/-2) 4 files modified
debian/changelog (+9/-0) debian/control (+32/-0) debian/control.in (+32/-0) debian/rules (+2/-2) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Canonical Server | Pending | ||
Canonical Server packageset reviewers | Pending | ||
Review via email: mp+419245@code.launchpad.net |
Description of the change
Since the package name providing mod-php includes the php version number, when moving to new PHP versions it gets removed rather than upgraded. This branch adds dummy packages with the same names as the old mod-phps; these dummy packages are empty and just serve to require the 'libapache2-
I found that the build would fail building in PPA (but not locally) during dh_install because these packages weren't found. I worked around this via a couple --exclude arguments, as suggested by some random internet pages, but am not sure if there may be better solutions for this.
I've tested this only lightly so far, so there may still be some large corner cases I've overlooked. I'll be continuing to test it, and appreciate any additional banging on it others can do.
I'm also looking for feedback on the general approach. I plan to SRU this fix to focal as well (for bionic->focal upgrades), etc.
A PPA with this fix is at:
https:/
Easiest way to test this is to set up an impish LXC container, install libapache2-
I was curious what the outcome of this testing will be - I see it ended as double replaces combined with a double transitional package.
You have made the versioned transitional to depend on the generic libapache2-mod-php.
Which will depend on whatever the current version is.
I know that you know that there might be corner cases left.
For example:
If you installed in the past the generic libapache2-mod-php all will be fine anyway.
But if you installed the versioned pkg in the past it will now via the transitional depend on the new version. But since the transitional says "can be removed" people might remove it and then nothing will depend on the new versioned mod-php anymore leading to the old problem. So the new version might show in auto-remove.
I have done some testing to check my assumptions, after upgrade I got: ~impish2 mod-php8. 0 8.1.2-1ubuntu2~ impish4 mod-php8. 1 8.1.2-1ubuntu2~ impish4
ii libapache2-mod-php 2:8.1+92ubuntu2
ii libapache2-
ii libapache2-
Good so far,
But also as assumed if I do remove the transitional now I get: mod-php8. 1 libapr1 libaprutil1 libaprutil1- dbd-sqlite3 libaprutil1-ldap liblua5.3-0 php-common php8.1-cli mod-php8. 0
The following packages were automatically installed and are no longer required:
apache2 apache2-bin apache2-data apache2-utils libapache2-mod-php libapache2-
php8.1-common php8.1-opcache php8.1-readline ssl-cert
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
libapache2-
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 6144 B disk space will be freed.
Do you want to continue? [Y/n]
After "apt install libapache2- mod-php8. 1" or "apt install libapache2-mod-php" this would no more happen.
But I stay to my word that I think it might be ok to close 95% of this issue which is much better not fixing it at all.
- It does no more remove mod-php on upgrade +1
- It does not list it on auto-remove +1
- Removing the transitional only puts the new one on auto-remove
-> That might indeed be enough, open for future improvement but enough to fix the immediate issue before people upgrade to 22.04
---
I have also a few very minor comments inline below ...
About the issues that made you add "--exclude=" do you have a pastebin of those issues?
I think only than can others think about suggesting alternatives (if there are any).
Disabling the pedantic along the way LGTM as well.
+99 from my side
Not consuming the review slot to leave this open for other reviews or suggestions.