pakku icon indicating copy to clipboard operation
pakku copied to clipboard

unnecessary builds under certain circumstances

Open FeddaHeiko opened this issue 4 years ago • 2 comments

Im not sure if this is really a problem of pakku, but pls have a look at the eclipse-* packages in AUR.

I wanted to install one of it (pakku -S eclipse-php), but it downloads and builds all 6 (eclipse-java, -jee, -cpp, -php, -javascript and -rust).

The problem ist described in comments-section on https://aur.archlinux.org/pkgbase/eclipse/ but it seems noone there is willing to fix it.

FeddaHeiko avatar Apr 01 '21 14:04 FeddaHeiko

This is due to the way the PKGBUILD has been written. To change this behaviour, you could edit the PKGBUILD when prompted by the Pakku build process. If you are working on modifying or creating a PKGBUILD it's usually easier to use makepkg directly though. This requires some study to understand how the PKGBUILD works, and probably a little trial and error to create a working version. This AUR package may provide a helpful reference for comparison: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=lombok There is also a binary version of eclipse-java in the AUR: https://aur.archlinux.org/packages/eclipse-java-bin/ Perhaps you could modify that to install a binary eclipse-php package, there's no reason why you cannot create and use your own PKGBUILD's, it's one of the advantages of the system.

zqqw avatar Apr 15 '21 13:04 zqqw

With this PKGBUILD it's quite simple to modify thanks to the way it's written, when you are asked this by pakku, type y: :: View and edit eclipse/PKGBUILD? [Y/n/s/a/?] y

Then change these 2 lines:

pkgname=(eclipse-{java,jee,cpp,php,javascript,rust}) sha256sums_x86_64=('2193208753cae8505b4926386dc7bb71cb665929180bf8c1a63dda0251dbaaf1' # Java '7349e3051925c6ec88f03036f40b3f493e62e252d050e86493a9ceea5d1ab1b2' # Jee 'b5678a117da21912178d4188b8b6976b578dc03a38669eb4c8e16dd71c74747a' # C++ 'a681e8e65835f75ad8b9a7da8e11ded90ea4d8bda82b8133a8debd1852ec37b9' # PHP 'e1152efe94be5c00d8abf1ed135234404c9affb309336600e7ef3d1dd9dfa3e4' # JS '797ac2190c110d556a1a9b7e4fa327a5f0ca1814006397f89158d59109943a6e') # Rust

To this:

pkgname=(eclipse-php) sha256sums_x86_64=('a681e8e65835f75ad8b9a7da8e11ded90ea4d8bda82b8133a8debd1852ec37b9') # PHP

And then it works and builds / downloads eclipse-php and nothing else. I expect the same method can be applied to the other possible variants. If you wanted to save the modified PKGBUILD for future reference then look in /tmp/pakku-$USER/eclipse and save a copy before it gets wiped on reboot.

zqqw avatar Apr 19 '21 20:04 zqqw