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

Cannot update packages that depend on a specific version #53

Closed marcvangend closed 8 years ago

marcvangend commented 8 years ago

I have installed jre8-openjdk-headless-infinality, jre8-openjdk-infinality and jdk8-openjdk-infinality, which are part of the same base package (https://aur.archlinux.org/pkgbase/java8-openjdk/). Unfortunately apacman is unable to update those packages.

The PKGBUILD declares that the packages are dependent on each other, including the package version and package release number, like this:

package_jre8-openjdk-headless-infinality() {
  pkgdesc='OpenJDK Java 8 headless runtime environment with infinality patch applied'
  depends=('java-runtime-common' 'ca-certificates-utils' 'nss')
[...]
package_jre8-openjdk-infinality() {
  pkgdesc='OpenJDK Java 8 full runtime environment with infinality patch applied'
  depends=("jre8-openjdk-headless-infinality=${pkgver}-${pkgrel}" 'xdg-utils' 'hicolor-icon-theme')
[...]
package_jdk8-openjdk-infinality() {
  pkgdesc='OpenJDK Java 8 development kit with infinality patch applied'
  depends=('java-environment-common' "jre8-openjdk-infinality=${pkgver}-${pkgrel}")

According to the maintainer this normally should not be a problem. However apacman seems to invoke pacman -U separately for every package. As a result, the first package cannot update because it would break the dependency of the other two on the current version, and the others cannot update because they depend on the newer version being installed. You get the picture: it will never happen.

Can this be fixed in apacman?

PS. I you're going to try and install those packages make sure your /tmp has plenty of tmpfs-space available (4GB is not enough), or relocate it to a real disk.

justin8 commented 8 years ago

I think this is a duplicate of https://github.com/oshazard/apacman/issues/44

As you said, the issue is -U is invoked seperately for each package.

marcvangend commented 8 years ago

Ah, I see. That issue doesn't really mention the problems it causes, but it does indeed describe the same cause.

marcvangend commented 8 years ago

Should this now be fixed by https://github.com/oshazard/apacman/pull/47 ?

justin8 commented 8 years ago

It should do

marcvangend commented 8 years ago

Thanks Justin. Things work as expected, as far as I can see now.