Closed Holzhaus closed 8 years ago
How do split package installations work without this option?
Looks like it's necessary to build all parts of a split package.
Relevant discussion on the mailing list: https://lists.archlinux.org/pipermail/pacman-dev/2015-September/020353.html
Upstream commit: https://projects.archlinux.org/pacman.git/commit/scripts/makepkg.sh.in?id=169287e494a5348687260a00697be06b36ba4434
Sorry I'm still a little confused. I get that if you omit this option, makepkg
will build all the packages defined in a split PKGBUILD
, but how does it know what to install?
Doesn't makepkg just build packages without installation (unless you pass -i
)? If the packages have been built, just call pacman -U pkgname
manually for all packages you'd like to install and just ignore the other ones. I don't know if there's a better way to do this.
Aurget specifically relies on makepkg -i
because locating the built package file after the fact and installing it via pacman -U
is fraught with edge cases and annoyances. Are you saying makepkg -i
is just no longer supported for split packages, or that it installs all the built packages?
Seems like for split packages it installs everything. Here's the install function from makepkg, the array it loops over contains all the package names in the split package, then it passes the list to pacman -U to install all of them. Previously the pkgname array could be overridden by the --pkg flag, but that's no longer possible.
If I were you, I'd just do the same in aurget - install everything from a package. The burden to support a feature that upstream has explicitly removed seems too much. There's always aurget -Sb and the user can install the split packages one by one manually.
# this function always returns 0 to make sure clean-up will still occur
install_package() {
(( ! INSTALL )) && return
if (( ! SPLITPKG )); then
msg "$(gettext "Installing package %s with %s...")" "$pkgname" "$PACMAN -U"
else
msg "$(gettext "Installing %s package group with %s...")" "$pkgbase" "$PACMAN -U"
fi
local fullver pkgarch pkg pkglist
(( ASDEPS )) && pkglist+=('--asdeps')
(( NEEDED )) && pkglist+=('--needed')
for pkg in ${pkgname[@]}; do
fullver=$(get_full_version)
pkgarch=$(get_pkg_arch $pkg)
pkglist+=("$PKGDEST/${pkg}-${fullver}-${pkgarch}${PKGEXT}")
if [[ -f "$PKGDEST/${pkg}-debug-${fullver}-${pkgarch}${PKGEXT}" ]]; then
pkglist+=("$PKGDEST/${pkg}-debug-${fullver}-${pkgarch}${PKGEXT}")
fi
done
if ! run_pacman -U "${pkglist[@]}"; then
warning "$(gettext "Failed to install built package(s).")"
return 0
fi
}
Thanks for providing that context @richq . Interesting that there's still some SPLITPKG
-based logic there, but the main loop does appear to do nothing special.
Merged as 82aa6334. Thanks!
The current makepkg (pacman) 5.0.1 doesn't have the
--pkg
option anymore.