You are not logged in.

#1 2022-11-30 22:01:25

murdonk
Member
Registered: 2022-04-21
Posts: 7

[SOLVED] Overriding pacman configuration values.

In pacman.conf I added some packages to the IgnorePkg option

IgnorePkg   = linux linux-headers linux-lts linux-lts-headers virtualbox-host-modules-arch

This reduces the need for me to reboot the system when I update, but occasionally I want to update them as well, in which case I comment this line out
Is there a way to override this option in the command line so that I don't have to comment it out and uncomment it again?
Calling pacman with --ignore '' (empty quotes) does not accomplish this

Last edited by murdonk (2022-12-01 15:15:15)

Offline

#2 2022-11-30 22:09:00

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,657
Website

Re: [SOLVED] Overriding pacman configuration values.

You can explicitly list those packages and they will be updated:

pacman -S linux ...

But given the list you have, that'd be a lot of typing.  You could also just make a second pacman.conf, for example, call it pacman.conf.full which is a copy of pacman.conf just withouth the IgnorePkg line, then:

pacman --config /etc/pacman.conf.full -Syu

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#3 2022-11-30 22:45:41

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

Rather than copying the pacman.conf, you could also Include the pacman.conf.full in a pacman.conf that otherwise only has the IgnorePkg, so you don't need to sync the configs.

Online

#4 2022-11-30 22:59:09

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: [SOLVED] Overriding pacman configuration values.

(ignore)

seth wrote:

Include the pacman.conf.full in a pacman.conf

I believe seth meant that in opposite direction.

Last edited by mpan (2022-11-30 23:03:21)


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#5 2022-11-30 23:01:09

murdonk
Member
Registered: 2022-04-21
Posts: 7

Re: [SOLVED] Overriding pacman configuration values.

Trilby wrote:

You can explicitly list those packages and they will be updated:

pacman -S linux ...

But given the list you have, that'd be a lot of typing.  You could also just make a second pacman.conf, for example, call it pacman.conf.full which is a copy of pacman.conf just withouth the IgnorePkg line, then:

pacman --config /etc/pacman.conf.full -Syu

A little cumbersome, but it works, thanks!

seth wrote:

Rather than copying the pacman.conf, you could also Include the pacman.conf.full in a pacman.conf that otherwise only has the IgnorePkg, so you don't need to sync the configs.

That won't work because IgnorePkg gets concatenated when you set it multiple times in the config file.

Offline

#6 2022-11-30 23:10:20

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: [SOLVED] Overriding pacman configuration values.

Note that adding the packages to IgnorePkg will make e.g. checkupdates (of community/pacman-contrib) not report them. So you will miss the notification.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#7 2022-11-30 23:14:35

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

I didn't suggest to set it multiple times (though that would allow for a stacked IgnorePkg list)
Though I've to admit that I'm unsure whether you can have Include's "outside" groups this way.

pacman.conf.full

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
…
[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

pacman.conf

[options]
IgnorePkg   = linux linux-headers linux-lts linux-lts-headers virtualbox-host-modules-arch
Include     = /etc/pacman.conf.full

Online

#8 2022-11-30 23:17:24

murdonk
Member
Registered: 2022-04-21
Posts: 7

Re: [SOLVED] Overriding pacman configuration values.

mpan wrote:

Note that adding the packages to IgnorePkg will make e.g. checkupdates (of community/pacman-contrib) not report them. So you will miss the notification.

I'm not sure which notification you mean. pacman does tell you if there are updates for packages in IgnorePkg when you do -Syu, it just skips them.

Offline

#9 2022-11-30 23:27:59

murdonk
Member
Registered: 2022-04-21
Posts: 7

Re: [SOLVED] Overriding pacman configuration values.

seth wrote:

I didn't suggest to set it multiple times (though that would allow for a stacked IgnorePkg list)
Though I've to admit that I'm unsure whether you can have Include's "outside" groups this way.

pacman.conf.full

#
# GENERAL OPTIONS
#
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
…
[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

pacman.conf

[options]
IgnorePkg   = linux linux-headers linux-lts linux-lts-headers virtualbox-host-modules-arch
Include     = /etc/pacman.conf.full

Sorry, I'm having a hard time following the logic here. Isn't this setup equivalent to just having the one pacman.conf?

Offline

#10 2022-11-30 23:35:23

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

pacman.conf has your ignore list and includes pacman.conf.full
pacman.conf.full has the rest (but not the ignore list)

So regular pacman calls will use the pacman.conf w/ the ignore list, and "pacman --config /etc/pacman.conf.full" will skip the ignore list (but have your regular config)

Online

#11 2022-11-30 23:44:22

murdonk
Member
Registered: 2022-04-21
Posts: 7

Re: [SOLVED] Overriding pacman configuration values.

seth wrote:

pacman.conf has your ignore list and includes pacman.conf.full
pacman.conf.full has the rest (but not the ignore list)

So regular pacman calls will use the pacman.conf w/ the ignore list, and "pacman --config /etc/pacman.conf.full" will skip the ignore list (but have your regular config)

Oh, I see. That's clever haha, guess it's why it went over my head tongue.
Well, it works like a charm! tysm seth

Offline

#12 2022-12-01 00:52:03

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: [SOLVED] Overriding pacman configuration values.

murdonk wrote:

pacman does tell you if there are updates for packages in IgnorePkg when you do -Syu, it just skips them.

No, pacman has no option to check if there are updates available. Not without performing a partial update and also requiring root privileges. That’s why checkupdates has been created.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#13 2022-12-01 01:13:47

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,143

Re: [SOLVED] Overriding pacman configuration values.

mpan wrote:
murdonk wrote:

pacman does tell you if there are updates for packages in IgnorePkg when you do -Syu, it just skips them.

No, pacman has no option to check if there are updates available. Not without performing a partial update and also requiring root privileges. That’s why checkupdates has been created.

I think you did not read sufficiently carefully what was said. wink


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#14 2022-12-01 01:23:13

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Overriding pacman configuration values.

cfr wrote:
mpan wrote:
murdonk wrote:

pacman does tell you if there are updates for packages in IgnorePkg when you do -Syu, it just skips them.

No, pacman has no option to check if there are updates available. Not without performing a partial update and also requiring root privileges. That’s why checkupdates has been created.

I think you did not read sufficiently carefully what was said. wink

The inference is that the -Syu is terminated once the list is printed; thereby creating the conditions for a partial update.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#15 2022-12-01 02:30:49

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,143

Re: [SOLVED] Overriding pacman configuration values.

jasonwryan wrote:
cfr wrote:
mpan wrote:

No, pacman has no option to check if there are updates available. Not without performing a partial update and also requiring root privileges. That’s why checkupdates has been created.

I think you did not read sufficiently carefully what was said. wink

The inference is that the -Syu is terminated once the list is printed; thereby creating the conditions for a partial update.

But that is not what the OP is doing. That is, technically, it is a partial update because the kernel and headers aren't being updated, but that doesn't require terminating pacman -Syu.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#16 2022-12-01 04:14:28

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [SOLVED] Overriding pacman configuration values.

Yep. I was just commenting on the discussion about checkupdates versus -Syu.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#17 2022-12-01 08:50:02

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

mpan's point was that packages in the ignore list will be, well … ignored by checkupdates; so the OP isn't only ignoring them on updates, but when using tools that tell you that you're a lazy ass bitch w/ 612 pending updates, it will not report those ignored packages either.

The OP however is either not even aware of checkupdates, or not using it or doesn't care to not get reports about movements in the ignored packages - at least not this way.
That's not really a problem, but just something to be aware of iff one uses checkupdates etc. AND actually wanted it to be alerted about updates in ignored packages.


@murdonk
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Online

#18 2022-12-01 09:26:24

d.ALT
Member
Registered: 2019-05-10
Posts: 923

Re: [SOLVED] Overriding pacman configuration values.

Can a user create a "custom" group defining inside unwnated packages and then perform this?:

# pacman -Syu --ignoregroup <UNWANTED>

[and maybe alias the above]

<49,17,III,I>    Fama di loro il mondo esser non lassa;
<50,17,III,I>    misericordia e giustizia li sdegna:
<51,17,III,I>    non ragioniam di lor, ma guarda e passa.

Offline

#19 2022-12-01 09:39:45

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

You could also alias the regular --ignore command and export the undesired packages into a shell variable.
The group affiliation is defined in the PKGBUILD and while you can probably edit the local package database, that would be lost w/ an update and probably also not be a good idea.

The benefit of the IgnorePkg entry is the reversed default - those packages become opt-in, rather than your proposed opt-out (regardless of how you approach that)

Online

#20 2022-12-01 20:15:32

mpan
Member
Registered: 2012-08-01
Posts: 1,223
Website

Re: [SOLVED] Overriding pacman configuration values.

cfr wrote:

That is, technically, it is a partial update because the kernel and headers aren't being updated, but that doesn't require terminating pacman -Syu.

Seth has shortly explained my point and the purpose of what I wrote.

As for being pedantic: yes, if we ignore obvious details provided by the context, technically those are both in the set called “partial upgrades”. But the context provides a particular qualification to “partial upgrades”. Intentional ignoring of selected packages is not the same as a persistent mismatch between sync and local databases. Even more, OP wants to hold updates to core/linux and friends. This package gets some special treatment when it comes to talking about partial upgrades.


Sometimes I seem a bit harsh — don’t get offended too easily!

Offline

#21 2022-12-01 20:46:06

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 7,143

Re: [SOLVED] Overriding pacman configuration values.

mpan wrote:
cfr wrote:

That is, technically, it is a partial update because the kernel and headers aren't being updated, but that doesn't require terminating pacman -Syu.

Seth has shortly explained my point and the purpose of what I wrote.

As for being pedantic: yes, if we ignore obvious details provided by the context, technically those are both in the set called “partial upgrades”. But the context provides a particular qualification to “partial upgrades”. Intentional ignoring of selected packages is not the same as a persistent mismatch between sync and local databases. Even more, OP wants to hold updates to core/linux and friends. This package gets some special treatment when it comes to talking about partial upgrades.

Which was my point wink.


CLI Paste | How To Ask Questions

Arch Linux | x86_64 | GPT | EFI boot | refind | stub loader | systemd | LVM2 on LUKS
Lenovo x270 | Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz | Intel Wireless 8265/8275 | US keyboard w/ Euro | 512G NVMe INTEL SSDPEKKF512G7L

Offline

#22 2022-12-01 21:00:31

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,657
Website

Re: [SOLVED] Overriding pacman configuration values.

FWIW, murdonk, if you are considering an alias for running different versions of pacman commands, don't bother with different configs or flags, just create an alias for your ignored packages and leave pacman.conf alone:

alias fullupdate='pacman -Syu $(sed -n "s/IgnorePkg[^=]*=//p" /etc/pacman.conf)'

Last edited by Trilby (2022-12-01 21:00:49)


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#23 2022-12-01 21:30:13

seth
Member
Registered: 2012-09-03
Posts: 52,598

Re: [SOLVED] Overriding pacman configuration values.

"^\s*"

There could be multiple IgnorePkg lines and non-tailing ones be commented
(Though arguebly that could be an advantage, since one could use a dummy to limit the selection to one IgnorePkg instance)

Online

Board footer

Powered by FluxBB