You are not logged in.

#1 2013-10-09 13:24:14

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,471

[SOLVED] How to get a list of ignored packages?

I'm trying to make a script to compile my already *AND UP TO DATE* installed packages for my cpu.
Right now it works well, but i'm facing the issue that i've to avoid building packages that are in my ignoregroup or ignorepkg (say - an old version of grub and flashplayer) and can't find a pacman option that tells me what packages i'm ignoring.

Suggestions?

Last edited by kokoko3k (2013-10-09 15:39:51)

Offline

#2 2013-10-09 13:45:59

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: [SOLVED] How to get a list of ignored packages?

Why do you need a pacman option to tell you, it's in plain text in pacman.conf?  Use grep.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#3 2013-10-09 13:46:10

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

Re: [SOLVED] How to get a list of ignored packages?

You can list them by hand or maybe grep pacman.conf.

Offline

#4 2013-10-09 13:55:39

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,471

Re: [SOLVED] How to get a list of ignored packages?

Thanks.
You're suggesting to parse pacman.conf, but I'd like to find a way that works for every "setup"
Right now my pacman.conf is a bit... messy, but valid.

# ignorepkg = blablabla
#ignorepkg = blablabla
   ignorepkg = blablabla
ignorepkg = blablabla #ignoring because...
ignoregroup = groupblablabla #comment here
# ignoregroup = groupblablabla #comment here

...And what i thought is that if pacman is able to do that, then i could avoid to reinvent the wheel that would be surely worse than the original...

Last edited by kokoko3k (2013-10-09 13:57:48)

Offline

#5 2013-10-09 14:43:43

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: [SOLVED] How to get a list of ignored packages?

pkgs="$(grep IgnorePkg /etc/pacman.conf | sed -e 's/IgnorePkg =//' -e 's/#.*//')"
grps="$(grep IgnoreGroup /etc/pacman.conf | sed -e 's/IgnoreGroup =//' -e 's/#.*//')"
[[ -n $grps ]] && pkgs="$pkgs $(pacman -Sgq $grps)"

*untested as I don't ignore anything.

Last edited by Trilby (2013-10-09 15:05:57)


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#6 2013-10-09 14:52:30

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,471

Re: [SOLVED] How to get a list of ignored packages?

Thanks, it almost works.

I corrected some uppercase in ignorepkg -> IgnorePkg and ignoregroup->IgnoreGroup, that's what happens:

IgnorePkg = hplip IgnorePkg = libv4l IgnorePkg = grub IgnorePkg = flashplugin base-devel base gnome-extra gnome calligra ladspa-plugins xfce4 xorg xorg-fonts fprint gstreamer0.10-plugins kde-meta kde kdebase kdeaccessibility kdeadmin kdeartwork kdebindings kdeedu kdegames kdegraphics kdemultimedia kdenetwork kdepim kdeplasma-addons kdesdk kdetoys kdeutils kdewebdev libreoffice libreoffice-extensions xfce4-goodies qt qt5 telepathy kde-telepathy texlive-most texlive-lang xorg-drivers xorg-apps cegcc linux-tools dlang dlang-dmd fcitx-im firefox-addons gambas3 dlang-gdc gnustep-core google-gadgets lxde i3 dlang-ldc qtcurve tesseract-data vim-plugins xmms-plugins xmms-io-plugins abc ifiction inform esclinux tads bepo

the first 3 packages are right, but it echoes "IgnorePkg =" too.
I don't know where the rest of the list comes from, it seems just a plain list of the available groups; probably done because i've no ignore groups?

Last edited by kokoko3k (2013-10-09 14:52:54)

Offline

#7 2013-10-09 15:06:07

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: [SOLVED] How to get a list of ignored packages?

Revised above.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#8 2013-10-09 15:11:04

satanselbow
Member
Registered: 2011-06-15
Posts: 530

Re: [SOLVED] How to get a list of ignored packages?

How long have you been running with that list of ignores? especially base & base-devel groups! Is this some kind of breakage test?

Offline

#9 2013-10-09 15:17:13

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: [SOLVED] How to get a list of ignored packages?

satanselbow, that is not kokoko3k's actual ignore list, that was the result of the first version of my script which had a bug when no groups were ignored: if filled in everything as pacman -Sqg without any parameter lists every member of every group.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

#10 2013-10-09 15:38:11

kokoko3k
Member
Registered: 2008-11-14
Posts: 1,471

Re: [SOLVED] How to get a list of ignored packages?

Yep it seems almost perfect:

# echo $pkgs
IgnorePkg = hplip IgnorePkg = libv4l IgnorePkg = grub flashplugin

Is this expected?
Anyway, another sed fixes it:

echo $pkgs| sed 's:IgnorePkg = ::g'
hplip libv4l grub flashplugin

I'll mark this as solved, even if i still wonder if there is a pacman thing that would do the same.

Thanks!

Last edited by kokoko3k (2013-10-09 15:39:34)

Offline

#11 2013-10-09 15:57:52

Trilby
Forum Moderator
From: Massachusetts, USA
Registered: 2011-11-29
Posts: 13,699
Website

Re: [SOLVED] How to get a list of ignored packages?

The initial sed command should have gotten rid of "IgnorePkg = ".  I'd work to fix that rather than add another layer.


InterrobangSlider
• How's my coding? See this page.
• How's my moderating? Feel free to email any concerns, complaints, or objections.

Offline

Board footer

Powered by FluxBB