Kwpolska / pkgbuilder

An AUR helper (and library) in Python 3.
http://pkgbuilder.rtfd.org/
BSD 3-Clause "New" or "Revised" License
71 stars 12 forks source link

Install only needed split subpackages #39

Closed rmarquis closed 1 year ago

rmarquis commented 8 years ago

PKGBUILDer is one of the rare helper that supports building of split packages. However, it currently always installs all built subpackages, instead of installing only the necessary subpackages.

The makepkg --pkg option was very useful in this very situation but it has been removed in pacman/makepkg 5.0, so using pacman -U is the only alternative. This option might however come back in the near future, see this recent discussion on pacman-dev mailing list.

You can test this with the python-novaclient PKGBUILD, which builds the python-novaclient and python2-novaclient subpackages, and whose dependencies are also split packages.

Kwpolska commented 8 years ago

The problem is, this would become a special option hidden behind a switch, at best. The default behavior of makepkg is depended on by some people (including me with the python-nikola-doc package). And in most cases, having all the split packages installed is good enough (says the man who constantly runs out of / disk space).

The python-novaclient package works fine for me, and so does the aformentioned python-nikola family (installs python2-nikola, python-nikola-doc, and a ton of split makedepends). However, one of its dependencies (python-oslo-utils) lead to installing [community] packages in the last (pacman -U) step, something I tried to prevent in my packages (via the large makedepends array; however, the AUR dependency builder picks AUR dependencies up correctly)

That said, if makepkg restores the option, I might support it. Otherwise, I would need to work out some hacks around the package detection part, which is already a hack.

(I’m not subscribed to the pacman-dev mailing list, please notify me if the option is restored.)

AladW commented 7 years ago

For comparison, see: https://github.com/trizen/trizen/commit/3c94434c66ede793758f2bf7de84d68e3174e2ac https://github.com/trizen/trizen/commit/0f8ddb11a732176f06658ebe062b7fc066f810e0 in particular, use of makepkg --packagelist to retrieve the package names.

Kwpolska commented 7 years ago

makepkg --packagelist isn’t necessary, since I could just look at the built .pkg.tar.xz files and compare it with .SRCINFO or whatever.

IMO it might not be worth the effort to support this; however, if anyone wants to implement it, I’ll happily take a pull request for this.