You are not logged in.

#1 2014-09-11 03:44:31

djo0012
Member
Registered: 2010-10-14
Posts: 7

AUR helper to find wich package need rebuild

As we all know, package from AUR need rebuild when there dependency are updated. What I would like to find is some command or script that could tell me which package from aur need to be rebuild.

Is there already something like that that exist? If no do you have any idea how it would be possible to detect this, I could develop it but I don't know what info I would need to create that list.

Offline

#2 2014-09-11 10:49:54

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: AUR helper to find wich package need rebuild

I don't know of any such tool. I suppose it is the duty of the package manager to do a version bump (or at least post a comment on the AUR package page), so that users know that the packages need to be rebuilt.

Offline

#3 2014-09-11 10:59:17

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

Re: AUR helper to find wich package need rebuild

Many aur tools can tell when an aur package has a newer version available, but AFAIK there is no tool to detect when a rebuild of the same version would be necessary.  There are a few things that could be checked to cover many such cases, but there will always be corner cases that make such detection highly impractical if not impossible.

Though *most* such cases would be do to changed library versions on which AUR sourced and compiled binaries depend.  A process like the following could detect candidates:
1) pacman -Qqm for a list of packages not in the main repos
2) For each package from (1) run pacman -Ql <pkg> and search for binaries.
3) For each binary from step two, run ldd on it to get the list of libs needed
4) Check each lib from 3 to see if it still exists, if not, the package needs rebuilding

This should cover many cases, but then there are likely other causes of a need of a rebuild.  For a moment I thought about java vm updates, but actually I don't think this would be the case.  With a JRE update it will either maintain backward compatibility or the java apps would have to be revised anyhow - a simple rebuild of the same version wouldn't help (I *think*, but what I know about java could fit on the back of a very small postage stamp).

EDIT: I can't think of a time that I was ever in this situation.  I have ~20 AUR packages installed and have for some time and I have never needed to rebuild the *same* version of one of them due to updates to other packages.  Have you been in such a situation?  What was the package?

Last edited by Trilby (2014-09-11 11:02:14)


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

Online

#4 2014-09-11 11:15:32

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: AUR helper to find wich package need rebuild

Trilby wrote:

EDIT: I can't think of a time that I was ever in this situation.  I have ~20 AUR packages installed and have for some time and I have never needed to rebuild the *same* version of one of them due to updates to other packages.  Have you been in such a situation?  What was the package?

I have. It was a conky version from the AUR. See https://aur.archlinux.org/packages/conky-utfscroll/

It refused to launch because of a wireless-tools soname bump.

Last edited by x33a (2014-09-11 11:17:34)

Offline

#5 2014-09-11 18:56:22

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Re: AUR helper to find wich package need rebuild

x33a wrote:

[...] I suppose it is the duty of the package manager to do a version bump [...] so that users know that the packages need to be rebuilt.

I find it annoying when AUR package maintainers do that, after I've already rebuilt my package(s).

x33a wrote:

or at least post a comment on the AUR package page

+1


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#6 2014-09-11 19:02:03

jsteel
Package Maintainer (PM)
From: England
Registered: 2008-03-18
Posts: 119

Re: AUR helper to find wich package need rebuild

Trilby wrote:

[...] I can't think of a time that I was ever in this situation.  I have ~20 AUR packages installed and have for some time and I have never needed to rebuild the *same* version of one of them due to updates to other packages.  Have you been in such a situation?  What was the package?

This has happened to me a few times with perl updates https://www.archlinux.org/news/perl-updated-to-520/ - I have quite a few AUR perl packages installed.


PGP key: F40D2072
Key fingerprint: 8742 F753 5E7B 394A 1B04  8163 332C 9C40 F40D 2072

Offline

#7 2014-09-12 23:50:06

djo0012
Member
Registered: 2010-10-14
Posts: 7

Re: AUR helper to find wich package need rebuild

For me it's mostly python related or some important lib update. The one that got me to ask this is a libBoost update the day after I installed freeCad from aur with all it's dependencies (a few hours build for me) and then I didn't know which one I needed to rebuild.

I will try to test the algo given by Trilby, I'm not certain about the python files thought. Thanks for the feedback

Last edited by djo0012 (2014-09-12 23:50:50)

Offline

#8 2014-09-13 01:05:58

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

Re: AUR helper to find wich package need rebuild

My suggested approach wouldn't work at all for anything but compiled binaries - so not python modules.  Though variations changing out step 3 for something to fit different types might still be a starting point.  Perhaps there is a python tool for detecting which modules are needed that would be an equivalent to ldd.  Perhaps even just 'grepping' for "import" lines, though I'm not very good with python.


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

Online

#9 2014-09-13 01:54:06

djo0012
Member
Registered: 2010-10-14
Posts: 7

Re: AUR helper to find wich package need rebuild

Well, it's probably the compiled part of python that break and need a rebuild against the updated python, the interpreted part shouldn't need a rebuild anyway

Offline

#10 2014-09-13 03:22:27

djo0012
Member
Registered: 2010-10-14
Posts: 7

Re: AUR helper to find wich package need rebuild

That actually work, at least for some kind of package. I found 3 package that need a rebuild in my aur installed package and after testing them they really didn't work, bu as I don't use them often I didn't know it. I still can't say for python package (or other interpreted language: ruby perl...) as I don't have problem with them at the moment (at least that I know).

Here is the code used:

#!/bin/bash
pacman -Qqm | while read package
do
	pacman -Ql $package | grep -v -E "(.gz|.html|.h|.hxx|/)$" | awk '{ print $2}' | while read curFile
	do
		ldd $curFile &> /dev/null
		if [ $? = 0 ]
		then
			ldd $curFile 2> /dev/null | awk '{ print $3}' | while read libFile
			do
				if [ ! -f $libFile ]
				then
					echo $package
				fi
			done
		fi
	done
done

Last edited by djo0012 (2014-09-13 04:05:11)

Offline

#11 2014-09-13 07:30:49

hb860
Member
Registered: 2014-09-12
Posts: 81
Website

Re: AUR helper to find wich package need rebuild

What about

yaourt -Syu --aur

The output is as follows:

<here is some blah-blah>
==> Package upgrade only (new release):
aur/qbittorrent          3.1.9.2-1           1 -> 2
aur/sunflower            0.2_59-4            4 -> 5

==> Software upgrade (new version) :
extra/firefox            32.0-1              -> 32.0.1-1
extra/firefox-i18n-en-us 32.0-1              -> 32.0.1-1
extra/xf86-video-intel   2.99.914-4          -> 2.99.916-1
aur/ioquake3-git         20140319.gb099255-1 -> 20140829.gc621589-1

So, I can see that I need to upgrade/rebuild three packages from AUR

Last edited by hb860 (2014-09-13 07:33:11)

Offline

#12 2014-09-13 11:43:22

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

Re: AUR helper to find wich package need rebuild

Trilby wrote:

Many aur tools can tell when an aur package has a newer version available, but AFAIK there is no tool to detect when a rebuild of the same version would be necessary.

None of those three are a rebuild of the same version.  Yaourt cannot detect that.


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

Online

#13 2014-09-26 03:00:25

thesystematic
Member
Registered: 2013-02-08
Posts: 44

Re: AUR helper to find wich package need rebuild

Not sure about a helper, but I have to do this every now and then with my ROS installation (few hundred AUR packages, which don't always get a version bump).

I use pactree to find the dependencies and rebuild them. Similar to what you can find here: http://brandon.invergo.net/news/2012-02 … acman.html

It can probably be adapted to a script of some kind if there are several packages you need to rebuild dependencies for

Offline

#14 2014-09-28 20:57:25

Stefan Husmann
Member
From: Germany
Registered: 2007-08-07
Posts: 1,391

Re: AUR helper to find wich package need rebuild

x33a wrote:

I don't know of any such tool. I suppose it is the duty of the package manager to do a version bump (or at least post a comment on the AUR package page), so that users know that the packages need to be rebuilt.

Definitely not. It is the duty of AUR users to know that this can happen all the time and how to deal with it.

And it is not an issue of  AUR packages but of broken installations. Run findbrokenpkgs (from AUR) or lddd (from devtools-package) from time to time.

Last edited by Stefan Husmann (2014-09-28 21:00:17)

Offline

Board footer

Powered by FluxBB