Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#65970 - NoUpgrade should not create .pacnew with identical md5

Attached to Project: Pacman
Opened by Monson Shao (monson) - Wednesday, 25 March 2020, 06:07 GMT
Last edited by Eli Schwartz (eschwartz) - Wednesday, 25 March 2020, 19:47 GMT
Task Type Feature Request
Category Backend/Core
Status Unconfirmed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version 5.2.1
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Summary and Info:
According to [1], files with same md5 would be overwrote. But it creates a .pacnew anyway.

[1] https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave#.pacnew


Steps to Reproduce:

1. Setting in pacman.conf
NoUpgrade = usr/share/applications/*.desktop

2. Upgrade packages will create .pacnew, even they share same md5.
```
❯ md5sum code-oss.desktop*
1d6b1809a829061a0f31e391c9a2129b code-oss.desktop
1d6b1809a829061a0f31e391c9a2129b code-oss.desktop.pacnew
```
This task depends upon

Comment by Eli Schwartz (eschwartz) - Wednesday, 25 March 2020, 16:38 GMT
"All files listed with a NoUpgrade directive will never be touched during a package install/upgrade, and the new files will be installed with a .pacnew extension."

The link you are reading is explicitly talking about files tagged as "backup" files, not files tagged as "NoUpgrade" files.

That being said, I'm not actually sure what is the utility of extracting them if they are identical to the on-disk version. On the other hand, for non-backup files we don't checksum them and cannot (easily) compare them. So I'd call this expected behavior, which it is possible but not guaranteed we could make prettier.
Comment by Allan McRae (Allan) - Thursday, 26 March 2020, 01:47 GMT
Don't we have checksums in the mtree files?
Comment by Monson Shao (monson) - Thursday, 26 March 2020, 13:15 GMT
"All files listed with a NoUpgrade directive will never be touched during a package install/upgrade, and the new files will be installed with a .pacnew extension."

But during my test, it shows that the origin files listed in NoUpgrade will be installed anyway if they are missing, while be installed with a .pacnew extension if they are already existed during reinstall/upgrade. And it will cause conflicting files error during installation if the files listed in NoUpgrade exist.

Anyway as a user, I do hope NoUpgrade (or a new "Backup") directive working as the backup in PKGBUILD.
Comment by Andrew Gregory (andrewgregory) - Sunday, 29 March 2020, 20:27 GMT
The original md5 is irrelevant here; all we need is the on-disk md5, which we can obviously calculate. As for why it installs identical files, I have no idea; that behavior appears to go all the way back to the initial revision.

Loading...