On Mittwoch, 15. Mai 2019 15:12:13 CEST Eli Schwartz via arch-general wrote: > On 5/14/19 5:08 PM, Sefa Eyeoglu via arch-general wrote: > > Hey fellow Arch Users, > > > > I am currently playing around with the GitLab CI and automatic building of > > Arch packages. My modified Arch Linux Docker image should include base > > and base- devel, but without all of the kernel and hardware stuff. > > This is the command, that does not work as expected: > > > > pacman -Syu --needed --noconfirm --noprogressbar --ignore linux,linux- > > firmware base base-devel git > > > > The packages linux and linux-firmware still get installed. I would prefer > > if there would be a way to install base, but without all of the > > irrelevant stuff for containers. I would propose something like > > base-container for this group. > The --ignore flag does not do what you think it does, it just has the > same result as if you had listed it in pacman.conf in IgnorePkg > > Note the documentation: "Directs pacman to ignore upgrades of package > even if there is one available." > > If you explicitly specify both packages on the command-line (which you > did when you listed "base") then they will still get installed. > Actually, pacman will interactively prompt you about whether you > actually want to install them, and --noconfirm will default to "yes". > > This is relevant e.g. when you have "linux" ignored because you don't > want to upgrade it with every pacman -Syu, but you do want to, > occasionally, update it manually -- if IgnorePkg stopped you from > specifying it on the command line, then it would be literally impossible > to ever update, without modifying your config files in /etc, then > running a manual update, then reverting your config files in /etc. > > I do not foresee us changing --ignorepkg to operate with a different > codepath following different rules that differ from IgnorePkg, both > because I think this is misuse of the feature, and because users will > then confuse the two and think they are the same when they are not. > > ... > > OTOH you can achieve your desired goal like this: > > $ pacman -Sqg base| grep -Fxv -f <(printf 'linux-firmware\nlinux\n') > # see list of packages in base, minus two that you want to exclude > > This list can be further piped to pacman -S - Thanks for all of your replies. I just decided on just removing linux and linux-firmware afterwards, as it is the cleanest solution for me. As it is just a docker image I am building I don't really care about build time as it is built weekly and just used for packaging. I was just hoping, that there would be an easy way to exclude packages from a group uninteractively. But just removing them is good enough for me. Thanks for all your suggestions though. Kins regards Sefa Eyeoglu Free Software Developer scrumplex.net[1] -------- [1] https://scrumplex.net
Attachment:
signature.asc
Description: This is a digitally signed message part.