You are not logged in.

#1 2023-03-21 20:56:34

90
Member
Registered: 2023-03-21
Posts: 4

Group PKGBUILD leading to conflicts between packages in the same group

I am currently trying to make a custom PKGBUILD for the Java 17 JDK based on the one for the java-openjdk-xdg AUR group. For whatever reason, I keep running into the following situation.

==> WARNING: The package group has already been built, installing existing packages...
==> Installing java17-openjdk-xdg package group with pacman -U...
loading packages...
resolving dependencies...
looking for conflicting packages...
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: jre17-openjdk-headless-xdg and jre17-openjdk-xdg are in conflict
==> WARNING: Failed to install built package(s).

Under normal circumstances, these would be able to install all at once, with the JRE depending on the headless JRE and the JDK in turn depending on the JRE. In spite of minimal editing — tacking on version numbers and fixing SHA256 sums — it ends up suffering from an irreconcilable conflict.

What could be causing this? I can paste relevant parts of the PKGBUILD as is necessary since I don't have the option to upload it directly here.

Offline

#2 2023-03-21 23:51:47

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,321

Re: Group PKGBUILD leading to conflicts between packages in the same group

It's lines 38 and 39. In the global scope, that means that every package provides all of those and every package conflicts with all of those. You would never be able to install more than one package from that PKGBUILD because of that, except that some of the provides get overridden later in the package functions. Either way, it's wrong.

Last edited by Scimmia (2023-03-21 23:53:44)

Offline

#3 2023-03-22 00:03:16

90
Member
Registered: 2023-03-21
Posts: 4

Re: Group PKGBUILD leading to conflicts between packages in the same group

Right, I suppose that makes sense. But how come that package group manages to get away with it and I'm able to install it perfectly fine, despite it doing the same thing that's causing my own PKGBUILD the problems?

Last edited by 90 (2023-03-22 00:25:27)

Offline

#4 2023-03-22 01:17:13

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,343
Website

Re: Group PKGBUILD leading to conflicts between packages in the same group

It overrides that setting in every single one of the package functions.  So it avoids the problem of having the global scope "provides" variable by overwritting that variable and never using it - which begs the question of why it is there in the first place.  It really shouldn't be - it's wrong and makes the whole PKGBUILD quite fragile (as you are now seeing).

Last edited by Trilby (2023-03-22 01:17:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2023-03-22 10:10:00

90
Member
Registered: 2023-03-21
Posts: 4

Re: Group PKGBUILD leading to conflicts between packages in the same group

Right. Correct me if I'm wrong, but doesn't Arch's own PKGBUILD for the Java 17 group also do this? If so that might need to be fixed to prevent this sort of thing later down the line.

In any case, I've been successful now in building the Java 8 and 17 JDKs using these adapted patches, so thanks for the help.

Last edited by 90 (2023-03-22 11:14:33)

Offline

#6 2023-03-22 12:39:18

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,343
Website

Re: Group PKGBUILD leading to conflicts between packages in the same group

90 wrote:

Correct me if I'm wrong

Okay, you are wrong.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#7 2023-03-22 14:33:33

90
Member
Registered: 2023-03-21
Posts: 4

Re: Group PKGBUILD leading to conflicts between packages in the same group

Trilby wrote:
90 wrote:

Correct me if I'm wrong

Okay, you are wrong.

Then I stand corrected. Consider this thread solved.

Offline

Board footer

Powered by FluxBB