You are not logged in.

#1 2011-12-04 12:11:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

identify packages installed from ABS [SOLVED]

Topic says it all smile  I'd like to see which packages I have installed that I built via a recompile using ABS.

Last edited by graysky (2011-12-04 12:49:44)

Offline

#2 2011-12-04 12:25:44

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

You should have added them to a group e.g. mypkgs.
Is there a change you've installed them all explicitly and not as a dep for another package?

Offline

#3 2011-12-04 12:32:21

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: identify packages installed from ABS [SOLVED]

I use this ugly one-liner:

comm -23 <(pacman -Qi | grep -P '^(Name\s*|Packager\s*:\s*xduugu$)' | grep -B1 '^Packager[[:space:]]' \
	| grep ^Name | sed -r 's/^Name\s*:\s*(\S+)\s*$/\1/' | sort) <(pacman -Qmq 2>/dev/null | sort)

The "xduugu" part has to be replaced with your PACKAGER variable from /etc/makepkg.conf (or you source that file and use the PACKAGER variable directly).

Offline

#4 2011-12-04 12:37:37

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

Ah, if you've used the PACKAGER variable, then try

expac "%n %p" | grep "$PACKAGER" | column -t

Edit: Forgot quotes around $PACKAGER.

Last edited by karol (2011-12-04 12:40:31)

Offline

#5 2011-12-04 12:42:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

@xduugu - nice idea.  It give me a null set though?

$ grep graysky /etc/makepkg.conf
PACKAGER="graysky <graysky@archlinux.us>"

$ comm -23 <(pacman -Qi | grep -P '^(Name\s*|Packager\s*:\s*graysky$)' | grep -B1 '^Packager[[:space:]]' \
| grep ^Name | sed -r 's/^Name\s*:\s*(\S+)\s*$/\1/' | sort) <(pacman -Qmq 2>/dev/null | sort)

@karol - which package contains expac?

Last edited by graysky (2011-12-04 12:43:23)

Offline

#6 2011-12-04 12:45:31

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

https://wiki.archlinux.org/index.php/FA … is_X_in.3F ;P
expac from [community]


I think the packages from AUR will be shown this way too.

Last edited by karol (2011-12-04 12:46:04)

Offline

#7 2011-12-04 12:49:33

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

Thank you karol and xduugu for the suggestions.  Using expac as you suggested and grepping my nick worked like a charm!

Last edited by graysky (2011-12-04 12:51:30)

Offline

#8 2011-12-04 13:00:18

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

I added this bit of wisdom to the wiki in hopes that others find it of use.

https://wiki.archlinux.org/index.php/Ar … kepkg.conf

Last edited by graysky (2011-12-04 13:00:32)

Offline

#9 2011-12-04 13:02:18

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

graysky wrote:

I added this bit of wisdom to the wiki in hopes that others find it of use.

https://wiki.archlinux.org/index.php/Ar … kepkg.conf

What is the last grep for?

expac "%n %p" | grep "$PACKAGER" | column -t | grep myname

Offline

#10 2011-12-04 13:05:21

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

@karol - to see only those packages built by "myname" ... without that all packagers are listed.  Here is goal is to identify the subset of customized ones.  Right, no?

Last edited by graysky (2011-12-04 13:06:03)

Offline

#11 2011-12-04 13:09:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

If

$ grep myname /etc/makepkg.conf
PACKAGER="myname <myemail@myserver.com>
$ expac "%n %p" | grep "$PACKAGER" | column -t | grep myname

will show

binutils myname <myemail@myserver.com>
gcc myname <myemail@myserver.com>
gcc-libs myname <myemail@myserver.com>
glibc myname <myemail@myserver.com>
tar myname <myemail@myserver.com>

and not

binutils myname
gcc myname
gcc-libs myname
glibc myname
tar myname

You either need to use cut or awk instead of that last grep or set PACKAGER="myname".

Offline

#12 2011-12-04 13:10:38

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: identify packages installed from ABS [SOLVED]

graysky wrote:

@xduugu - nice idea.  It give me a null set though?

$ grep graysky /etc/makepkg.conf
PACKAGER="graysky <graysky@archlinux.us>"

@gravsky
For me, PACKAGER is just "xduugu", so you also have to include your email address, when you replace it. This should work:

. /etc/makepkg.conf
comm -23 <(pacman -Qi | grep -P "^(Name\s*|Packager\s*:\s*$PACKAGER$)" | grep -B1 '^Packager[[:space:]]' \
	| grep ^Name | sed -r 's/^Name\s*:\s*(\S+)\s*$/\1/' | sort) <(pacman -Qmq 2>/dev/null | sort)
karol wrote:

https://wiki.archlinux.org/index.php/FA … is_X_in.3F ;P
expac from [community]


I think the packages from AUR will be shown this way too.

Thanks for the 'expac' hint. My one-line is much more readable now (it also filters non-repo packages like the AUR). smile

. /etc/makepkg.conf; grep -xvFf <(pacman -Qqm) <(expac "%n\t%p" | grep "$PACKAGER" | cut -f1)

Last edited by xduugu (2011-12-04 13:11:21)

Offline

#13 2011-12-04 13:12:42

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

I meant to use it like this

[karol@black ~]$ grep ^PACKAGER /etc/makepkg.conf
PACKAGER="karol"
[karol@black ~]$ expac "%n %p" | grep "karol" | column -t
vtclock  karol

Offline

#14 2011-12-04 13:14:54

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

::head smack::

You're right karol!  Edited the wiki.

Offline

#15 2011-12-04 13:16:09

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

[karol@black ~]$ echo "$PACKAGER"
karol
[karol@black ~]$ expac "%n %p" | grep "$PACKAGER" | column -t
vtclock  karol

It works for me either way.

Offline

#16 2011-12-04 13:16:25

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: identify packages installed from ABS [SOLVED]

@karol
I know, but I don't want to see AUR packages. smile

edit: Oops... I guess you meant the wiki entry.

Last edited by xduugu (2011-12-04 13:17:50)

Offline

#17 2011-12-04 13:36:15

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

xduugu wrote:

@karol
I know, but I don't want to see AUR packages. smile

I knew I should have added '@graysky' to my post ;P

xduugu wrote:

edit: Oops... I guess you meant the wiki entry.

Yup. You should add your script to the wiki too.

Last edited by karol (2011-12-04 13:36:39)

Offline

#18 2011-12-04 13:44:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

I placed both scripts in the wiki.  Thanks again, all.

Offline

#19 2011-12-04 17:59:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

I'm not 100% about this but even if you haven't set the PACKAGER variable you can easily identify the packages you've built: the PACKAGER var seems to be set to 'Unknown Packager' unless overridden by what's in makepkg.conf..

Offline

#20 2011-12-04 18:07:05

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,731
Website

Re: identify packages installed from ABS [SOLVED]

@karol - Cool.  If you can verify this, please edit the wiki.

Offline

#21 2011-12-04 19:45:12

xduugu
Member
Registered: 2008-10-16
Posts: 292

Re: identify packages installed from ABS [SOLVED]

karol is right, but there are some false positives. Currently, ~100 packages in the repositories were packaged by "Unknown Packager".

Offline

#22 2011-12-04 19:56:20

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: identify packages installed from ABS [SOLVED]

xduugu wrote:

karol is right, but there are some false positives. Currently, ~100 packages in the repositories were packaged by "Unknown Packager".

So I remembered right, seems that some packages are provided by Santa Claus or some other Good Samaritan ;P

Offline

Board footer

Powered by FluxBB