oshazard / apacman

ArchLinux User Repository (AUR) helper and pacman wrapper
https://aur.archlinux.org/packages/apacman/
GNU General Public License v3.0
70 stars 11 forks source link

Use unified sources for split PKGBUILDs/better slit package support #14

Closed ghost closed 7 years ago

ghost commented 9 years ago

Hey! Came across an interesting behaviour...

If one downloads a split PKGBUILD tarball (e.g. I maintain https://aur.archlinux.org/pkgbase/nquake/ which builds.. 6? packages, i think) and runs makepkg against the PKGBUILD manually, it uses the same sources for all split packages (as well it should, since that's what split packages are designed for).

However, if one builds with apacman, the sources get re-downloaded with each sub-package. additionally, the sub-packages don't get saved to /var/cache/apacman/pkg/ (though i'm not sure if that's expected behavior or not).

for example:

manually:

[bts@dawid nquake]$ ls
addon-clanarena.zip  addon-textures.zip  gpl.zip    non-gpl.zip                        nquake-base-2.3-4-any.pkg.tar.xz      nquake.install                       nquake-textures-2.3-4-any.pkg.tar.xz  PKGBUILD
addon-fortress.zip   CC0-1.0             linux.zip  nquake-arena-2.3-4-any.pkg.tar.xz  nquake-fortress-2.3-4-any.pkg.tar.xz  nquake-nonfree-2.3-4-any.pkg.tar.xz  pkg                                   src

apacman (in the $TMPDIR/pkgbuild-$UID? dir):

[bts@dawid pkgbuild-0]$ ls */*
nquake-arena/nquake-arena.tar.gz  nquake-fortress/nquake-fortress.tar.gz  nquake-nonfree/nquake-nonfree.tar.gz  nquake-textures/nquake-textures.tar.gz

nquake-arena/nquake-arena:
addon-clanarena.zip  addon-textures.zip  gpl.zip    non-gpl.zip                        nquake-base-2.3-4-any.pkg.tar.xz      nquake.install                       nquake-textures-2.3-4-any.pkg.tar.xz  PKGBUILD
addon-fortress.zip   CC0-1.0             linux.zip  nquake-arena-2.3-4-any.pkg.tar.xz  nquake-fortress-2.3-4-any.pkg.tar.xz  nquake-nonfree-2.3-4-any.pkg.tar.xz  pkg                                   src

nquake-fortress/nquake-fortress:
addon-clanarena.zip  addon-textures.zip  gpl.zip    non-gpl.zip                        nquake-base-2.3-4-any.pkg.tar.xz      nquake.install                       nquake-textures-2.3-4-any.pkg.tar.xz  PKGBUILD
addon-fortress.zip   CC0-1.0             linux.zip  nquake-arena-2.3-4-any.pkg.tar.xz  nquake-fortress-2.3-4-any.pkg.tar.xz  nquake-nonfree-2.3-4-any.pkg.tar.xz  pkg                                   src

nquake-nonfree/nquake-nonfree:
addon-clanarena.zip  addon-textures.zip  gpl.zip    non-gpl.zip                        nquake-base-2.3-4-any.pkg.tar.xz      nquake.install                       nquake-textures-2.3-4-any.pkg.tar.xz  PKGBUILD
addon-fortress.zip   CC0-1.0             linux.zip  nquake-arena-2.3-4-any.pkg.tar.xz  nquake-fortress-2.3-4-any.pkg.tar.xz  nquake-nonfree-2.3-4-any.pkg.tar.xz  pkg                                   src

nquake-textures/nquake-textures:
addon-clanarena.zip  addon-textures.zip  gpl.zip    non-gpl.zip                        nquake-base-2.3-4-any.pkg.tar.xz      nquake.install                       nquake-textures-2.3-4-any.pkg.tar.xz  PKGBUILD
addon-fortress.zip   CC0-1.0             linux.zip  nquake-arena-2.3-4-any.pkg.tar.xz  nquake-fortress-2.3-4-any.pkg.tar.xz  nquake-nonfree-2.3-4-any.pkg.tar.xz  pkg                                   src

maybe either:

overall, i'd suggest the last option as it offers the greatest flexibility and would add better support for split packages overall, would GREATLY speed up building of split packages (nvidia beta drivers, anyone?), and would be a good mix of effort vs. payoff, i think.

oshazard commented 9 years ago

@bts368 Method 1 has been implemented in apacman v2.0 (aa86d596eaf85fb993f7d7a5e4b6570c5fc2fd0f)

rmarquis commented 9 years ago

@oshazard Imho, you should still consider the last option for a later version. Making the helper behave exactly as the manual process avoids a lot of little bugs and side effects here and there. That's how it is implemented in pacaur.

oshazard commented 7 years ago

Deprecated by makepkg (resolved in #61)