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.
Last edited by kokoko3k (2013-10-09 15:39:51)
You can list them by hand or maybe grep pacman.conf.
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)
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)
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)
How long have you been running with that list of ignores? especially base & base-devel groups! Is this some kind of breakage test?
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.
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.
Last edited by kokoko3k (2013-10-09 15:39:34)
The initial sed command should have gotten rid of "IgnorePkg = ". I'd work to fix that rather than add another layer.