Ability to reference packaged content within .install
Hello,
So I have asked around and I do not believe this exists, if it does sorry for the noise.
I am the maintainer of onedev-bin
(formerly known as onedev) AUR package. Onedev is built on JSW, I know every single time I bring up JSW everyone gets mad and demands it to be changed to an open source alternative, it won't happen the dev has made it clear hes sticking with JSW (he has a open source licence for it, and has no intention of changing).
In order to update onedev, you must have the old onedev installation, and then get the new installation, and then use the upgrade.sh script on onedev which migrate the database tables (by exporting them and then reimporting them) and then also updates the installation using the libs it requires to load.
This means the current methods are the following (HIGHLY INEFFICIENT):
Installation
Installing the package is still as simple as with any other package, if you use my unofficial mirror you would do:
pacman -Syu onedev-bin
(I plan to make a source install soon; this will replace -bin in my unofficial repository)
or the typical method of cloning the package from aur, makepkg and then install.
Upgrading
This is where it gets messy, to upgrade there is two packages, onedev-bin
and onedev-new-bin
, onedev-bin
contains the system user and the systemd service, while onedev-new-bin
only contains the new code, this then patches the current installation, and onedev-bin is installed with --overwrite '*'
(as the update script patches all libs which are outdated with the libs in the package, cant do anything to change this), this installs any updates to the onedev
user or to the systemd service.
Now this works, even if it is messy (I was thinking of writing a script to pull the build and patch it and having onedev-utils instead, but this is less efficient).
I have two huge packages, both containing duplicate files, all because I cant patch during the upgrade, I have read everything on the archwiki possible about the .install and I read the man pages, upgrade functions only get the new versions and the old versions, it cant actually use the files within the package during install.
Implementation
I am not sure how pacman installs packages, but the following would work with this feature:
- extract the package to a temporary directory
- execute the pre-upgrade script allowing the script to use whatever scripts contained within the package
- continue with normal install procedures...
Again, if this exists and I am blind (or it just isn't documented) please let me know how to do it and I will get to updating the package, if it does not exist does anyone have any temporary improvements I could make while waiting for someone to have time to implement this (if it is even passed) as I assume implementation of new features to pacman will take a VERY long time! (testing, stablity, development time etc)