rmarquis / pacaur

[unmaintained] An AUR helper that minimizes user interaction
https://bbs.archlinux.org/viewtopic.php?pid=1755144#p1755144
ISC License
796 stars 113 forks source link

Problematic build order #752

Closed Skycoder42 closed 7 years ago

Skycoder42 commented 7 years ago
Version

pacaur -v

pacaur 4.7.10
Description

When rebuild or upgrade packages, the packages are not build in order of their dependencies. Simple example: pacaur --rebuild -S dee libunity builds libunity first, even though it depends on dee. This is not a bug itself, but for many packages, including this example, it is problematic, as libunity needs to be rebuilt every time dee is updated. I do know about the --forgein option, but as I do not want to rebuild all dependencies, it doesn't really help. (these two packages are just an example. I observed this for many other packages, too)

Strangly enough, this order seems to be random per device, as this particular case can only be produced on two of my three machines.

It would be nice if pacaur would honor depencies when determining the build order, even un upgrades or rebuilds. (Because for installations, this obviously has to be done).

Output

pacaur --rebuild -S dee libunity (with both already installed)

I removed the build part, as it is not relevant for the issue. Sorry the log is german, but as the only important part here is the order, I hope it's fine.

:: Packages dee libunity not found in repositories, trying AUR...
:: Löse Abhängigkeiten auf...
:: Suche nach Paketkonflikten...
:: dee-1.2.7-9 ist aktuell -- installiere erneut
:: libunity-7.1.4-5 ist aktuell -- installiere erneut

AUR Packages  (2) dee-1.2.7-9  libunity-7.1.4-5  

:: Mit Installation fortfahren? [J/n] 
:: Hole Paket(e)...
:: dee: Build-Dateien sind aktuell -- überspringe
:: libunity: Build-Dateien sind aktuell -- überspringe
:: Überprüfe Integrität von libunity...
:: Überprüfe Integrität von dee...
:: Erstelle libunity-Paket(e)...

...

:: Installiere libunity-Paket(e)...
Lade Pakete...
Löse Abhängigkeiten auf...
Suche nach in Konflikt stehenden Paketen...

Pakete (1) libunity-7.1.4-5

Gesamtgröße der installierten Pakete:  1,75 MiB
Größendifferenz der Aktualisierung:  0,00 MiB

:: Installation fortsetzen? [J/n] 
Prüfe Schlüsselring...
Prüfe Paketintegrität...
Lade Paket-Dateien...
Prüfe auf Dateikonflikte...
Überprüfe verfügbaren Festplattenspeicher...
:: Verarbeite Paketänderungen...
Reinstalliere libunity...
:: Starte post-transaction hooks...
(1/4) Compiling GSettings XML schema files...
(2/4) Cleaning up pacaur cache...
(3/4) Check for packages that need to be rebuild
(4/4) Arming ConditionNeedsUpdate...
:: Erstelle dee-Paket(e)...

...

:: Installiere dee-Paket(e)...
Lade Pakete...
Löse Abhängigkeiten auf...
Suche nach in Konflikt stehenden Paketen...

Pakete (1) dee-1.2.7-9

Gesamtgröße der installierten Pakete:  1,54 MiB
Größendifferenz der Aktualisierung:  0,00 MiB

:: Installation fortsetzen? [J/n] 
Prüfe Schlüsselring...
Prüfe Paketintegrität...
Lade Paket-Dateien...
Prüfe auf Dateikonflikte...
Überprüfe verfügbaren Festplattenspeicher...
:: Verarbeite Paketänderungen...
Reinstalliere dee...
:: Starte post-transaction hooks...
(1/3) Cleaning up pacaur cache...
(2/3) Check for packages that need to be rebuild
(3/3) Arming ConditionNeedsUpdate...
Debug output

bash -x pacaur --rebuild --noconfirm -S dee libuntiy

Attached as file, because of the big size pacaur_verbose_log.txt

rmarquis commented 7 years ago

Thanks for the report! Yes, this definitely seems to be a bug as the build order should be already taken care of. I'll have a closer look tomorrow.

Skycoder42 commented 7 years ago

I added the verbose output (with bash -x).

rmarquis commented 7 years ago

Took me a while to figure it out, but this issue is related to the IgnorePkg code. I could only reproduce the issue when adding oracle-sqldeveloper as IgnorePkg in pacman.conf. I guess this explains why you've observed different behavior across your machines.

When IgnorePkg is empty, the topological dependency solver does its job correctly.

rmarquis commented 7 years ago

Fixed in 05c39443263523f36b40cd948afcbdd7491e66c2.