You are not logged in.

#1 2024-03-17 11:16:35

lambdarch
Member
From: France
Registered: 2021-01-10
Posts: 106
Website

[Solved] Creation of .pacnew files when updating pacman-contrib

Hi,

I've been wondering about this for a while and finally bothered to ask here: I've made a few changes to /usr/lib/systemd/system/paccache.service and /usr/lib/systemd/system/paccache.timer, and every time pacman-contrib is updated, pacman creates .pacnew files for these two files, even though they don't change from one version of pacman-contrib to the next.

According to the wiki, this is the situation "original = X, current = Y, new = X" in https://wiki.archlinux.org/title/Pacman … ve#.pacnew, where pacman should "leave the current version in place and discard the new version without notifying the user", i.e. without creating .pacnew files, and therefore without any warning from pacman during installation.

If the creation of .pacnew files is in fact normal, could you tell me what I'm missing? Thanks!

Last edited by lambdarch (2024-03-17 16:16:24)

Offline

#2 2024-03-17 13:18:11

merlock
Member
Registered: 2018-10-30
Posts: 262

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

lambdarch wrote:

I've been wondering about this for a while and finally bothered to ask here: I've made a few changes to /usr/lib/systemd/system/paccache.service and /usr/lib/systemd/system/paccache.timer, and every time pacman-contrib is updated, pacman creates .pacnew files for these two files, even though they don't change from one version of pacman-contrib to the next.

If you in fact did change the service and timer files in /usr/lib/systemd/system, then they *have* been changed for the purposes of the update/upgrade.

You'd be better off creating drop-in files instead of directly editing the base files in /usr/lib/systemd/system/


Eenie meenie, chili beanie, the spirits are about to speak -- Bullwinkle J. Moose
It's a big club...and you ain't in it -- George Carlin
Registered Linux user #149839
perl -e 'print$i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10); '

Offline

#3 2024-03-17 13:19:20

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,684

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

It sounds like a bug, tried to update/re-install the package w/ --debug?

However, you don't want to edit those files tbw: https://wiki.archlinux.org/title/System … ided_units

Edit: oh c'mon…

Last edited by seth (2024-03-17 13:20:05)

Offline

#4 2024-03-17 14:49:36

lambdarch
Member
From: France
Registered: 2021-01-10
Posts: 106
Website

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

merlock wrote:

If you in fact did change the service and timer files in /usr/lib/systemd/system, then they *have* been changed for the purposes of the update/upgrade.
You'd be better off creating drop-in files instead of directly editing the base files in /usr/lib/systemd/system/

Thanks for the link, I'll do it that way from now on, but I don't understand why we're not in the situation described in the wiki, where .pacnew files shouldn't be created, i.e. original == new != current.

seth wrote:

It sounds like a bug, tried to update/re-install the package w/ --debug?

There don't seem to be any errors:

debug: extract: skipping dir extraction of /usr/lib/
debug: extract: skipping dir extraction of /usr/lib/systemd/
debug: extract: skipping dir extraction of /usr/lib/systemd/system/
debug: extracting /usr/lib/systemd/system/paccache.service.pacnew
warning: /usr/lib/systemd/system/paccache.service installed as /usr/lib/systemd/system/paccache.service.pacnew
debug: extracting /usr/lib/systemd/system/paccache.timer.pacnew
warning: /usr/lib/systemd/system/paccache.timer installed as /usr/lib/systemd/system/paccache.timer.pacnew
debug: extracting /usr/lib/systemd/system/pacman-filesdb-refresh.service
debug: extracting /usr/lib/systemd/system/pacman-filesdb-refresh.timer

Offline

#5 2024-03-17 15:33:25

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,684

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

What if you replace /usr/lib/systemd/system/paccache.service w/ /usr/lib/systemd/system/paccache.service.pacnew and re-install the package?
Still a useless /usr/lib/systemd/system/paccache.service.pacnew?
If not, change it again and re-install the package once more.

Another thing could be the timestamp, you could run a test for that on /usr/lib/systemd/system/paccache.timer and just "touch" it and see whether that has any impact hmm

Offline

#6 2024-03-17 15:47:06

lambdarch
Member
From: France
Registered: 2021-01-10
Posts: 106
Website

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

There's definitely a problem here, whether it's mine or not remains to be seen: if I remove pacman-contrib (and delete the .service and .timer files by hand because pacman refuses to do so, which is consistent with the above), and reinstall pacman-contrib, then reinstall it again, pacman creates .pacnew files.
Can you reproduce this?

Offline

#7 2024-03-17 16:08:40

apg
Developer
Registered: 2012-11-10
Posts: 211

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

Remove the files from NoUpgrade in pacman.conf

Offline

#8 2024-03-17 16:14:44

lambdarch
Member
From: France
Registered: 2021-01-10
Posts: 106
Website

Re: [Solved] Creation of .pacnew files when updating pacman-contrib

Oh I completely forgot about that, sorry. I guess I must have put it in because otherwise pacman would overwrite my changes, which is now solved via drop-in files. Thanks a lot, solved smile

Offline

Board footer

Powered by FluxBB