[arch-general] ABS and pacman

Karol Blazewicz karol.blazewicz at gmail.com
Tue Sep 25 15:54:59 EDT 2012


On Tue, Sep 25, 2012 at 8:34 PM, Manolo Martínez
<manolo at austrohungaro.com> wrote:
> On 09/25/12 at 08:16pm, Karol Blazewicz wrote:
>> On Tue, Sep 25, 2012 at 8:09 PM, Manolo Martínez
>> <manolo at austrohungaro.com> wrote:
>> > Would it be possible/make sense to have pacman inform us whenever it is going to
>> > substitute a package that has been ABS'd?
>>
>> Why not put your tweaked packages in 'IgnorePkg' in pacman.conf?
>
> Many times these tweaks are temporary and, indeed, newer versions make
> them unnecessary. It can definitely be done as you suggest, but I think
> it'd be in the spirit of the help provided by, e.g., .pacsave and .pacnew files, to have pacman issue a warning.
> --

AFAICT, ABS is not something Arch devs care all that much about and
'IgnorePkg' serves as an universal warning generator ;P


You can create a script that checks the package updates and notifies
you if any of the packages you compiled yourself  is going to be
updated.
It's enough to set yourself as the packager in /etc/makepkg.conf (mine
is 'karol') and see if any of packages output by
comm -23 <(expac "%n %p" -Q | awk '$2 == "karol" { print $1}')
<(pacman -Qqm|sort)
is mentioned in the output of 'pacman -Qqu'

As 'pacman -Qqu' doesn't care about AUR packages, we can abbreviate
comm -23 <(expac "%n %p" -Q | awk '$2 == "karol" { print $1}')
<(pacman -Qqm|sort)
to
expac "%n %p" -Q | awk '$2 == "karol" { print $1}'
The first command prints just packages from the repos, the second one
(the shorter one) prints also packages from the AUR, but it doesn't
matter here.

If you want to automate it in a safe way, try something like
http://www.andreascarpino.it/blog/posts/hey-youve-n-outofdated-packages-part-ii/
Update your fake pacman db:
-------------------
#!/bin/bash

fakedb=/dev/shm/fakepacdb
realdb=/var/lib/pacman

[[ ! -d $fakedb ]] && { mkdir -p "$fakedb/sync" || exit 1; }
[[ ! -L $fakedb/local ]] && { ln -s "$realdb/local" "$fakedb" || exit 2; }

exec fakeroot pacman --dbpath "$fakedb" -Sy
-------------------

Packages you've built via ABS that are about to be updated:
-------------------
#!/bin/bash

fakedb=/dev/shm/fakepacdb

mypkgs=$(comm -12 <(pacman --dbpath "$fakedb" -Qqu) <(expac "%n %p" -
Q | awk '$2 == "karol" { print $1}'))

echo "Warning: $mypkgs need to be rebuilt."
-------------------

$mypkgs can be empty of course.


More information about the arch-general mailing list