-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
tree-wide: alternatives support for pacman #25222
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
tree-wide: alternatives support for pacman #25222
Conversation
d29a118
to
4cd97be
Compare
4cd97be
to
a6d1823
Compare
I have now actually tested this on a termux-pacman device.
I have added commits with all the additional changes that were necessary for the
|
The error says that the checksum of the |
a6d1823
to
ca475dc
Compare
All the packages that need to be rebuilt couldn't be built within 6 hours, so there will need to be a second PR later to revision-bump the remaining packages. I also had to change the checksum of |
|
If accepted, this PR + the follow-up revision-bumps would solve this error that currently happens in default termux-pacman after installing
(explanation: the termux-packages/packages/git/build.sh Lines 34 to 35 in c8e204d
|
- The `update-alternatives` tool can also be used by `pacman`, and is necessary for convenient management of some symbolic links,like `$PREFIX/bin/pager`, so split from `dpkg` into a subpackage that `pacman` can depend on the same way that `apt`-based bootstraps pull in `update-alternatives`
- This block is frequently found as necessary among packages that have a `postinst` script: ``` if [ "$TERMUX_PACKAGE_FORMAT" = "pacman" ]; then echo "post_install" > postupg fi ``` - The reason this block is necessary is because otherwise, when upgrading packages using `pacman`, if the package was already previously installed (an "upgrade" situation), **unlike `apt`, `pacman` does not actually run its `post_install` script function by default, only its `post_upgrade` script function.** - I noticed that to avoid repetitively pasting it into many packages, it seems reasonable to globally include this check and override in `termux_step_create_pacman_install_hook()`. - `postupg` is not used for anything else anywhere in Termux except for termux-pacman. Therefore, it seems safe to universally override `post_upgrade()` with `post_install()` in pacman packages anytime a `postupg` script that does something other than `post_install` doesn't actually exist in Termux (no such script currently exists, but could in the future) and a `post_install` script function has already been created (implying that a `postinst` script existed and has just been converted into a `post_install` function in the pacman `.INSTALL` file)
ca475dc
to
769a102
Compare
update-alternatives
tool can also be used bypacman
-based Termux installations, and is necessary for convenient management of some symbolic links, like$PREFIX/bin/pager
, so split fromdpkg
into a subpackage thatpacman
can depend on the same way thatapt
-based bootstraps pull inupdate-alternatives
postinst
script:The reason this block is necessary is because otherwise, when upgrading packages using
pacman
, if the package was already previously installed (an "upgrade" situation), unlikeapt
,pacman
does not actually run itspost_install
script function by default, only itspost_upgrade
script function.I noticed that to avoid repetitively pasting it into many packages, it seems reasonable to globally include this check and override in
termux_step_create_pacman_install_hook()
.postupg
is not used for anything else anywhere in Termux except for termux-pacman. Therefore, it seems safe to universally overridepost_upgrade()
withpost_install()
in pacman packages anytime apostupg
script that does something other thanpost_install
doesn't actually exist in Termux (no such script currently exists, but could in the future) and apost_install
script function has already been created (implying that apostinst
script existed and has just been converted into apost_install
function in the pacman.INSTALL
file)