You are not logged in.
The backup array in my PKGBUILD defines two package-provided conf files:
backup=('etc/conf.d/openvpn-lxc-snapshot.conf' 'etc/conf.d/pihole-lxc-snapshot.conf')
If I modify them after installing, and then bump the $pkgver and install the newer package, pacman does not write the package-provided virgin ones as .pacnew files... why not? They are clearly in the $pkgdir:
% makepkg -si
...
% tree pkg
pkg
└── lxc-snapshots
├── etc
│ └── conf.d
│ ├── openvpn-lxc-snapshot.conf
│ └── pihole-lxc-snapshot.conf
...
Full PKGBUILD: https://aur.archlinux.org/packages/lxc-snapshots/
Last edited by graysky (2017-07-22 02:12:57)
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Are you sure you're not falling under case "original=X, current=Y, new=X" or "original=X, current=Y, new=Y" from the HANDLING CONFIG FILES section in pacman(8)? Also, I could be misunderstanding what you mean by "originals", but just to clarify: pacman would write the newer package files as .pacnew files, not the ones you had.
Last edited by GenkiSky (2017-07-22 01:01:45)
Offline
@GS - Yes, I edited the post. I need to read that section of the man page to be sure... but again,
1) Install version xxx-1
2) Edit foo.conf installed by pacman as part of that package and that is in the backup array
3) Install version xxx-2
4) Since foo.conf was modified by me, pacman should install the package provided foo.conf as foo.pacnew
Am I missing something?
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
Yeah so here is where I think pacman does something that is opinionated, but in my opinion, correct in the case of "original=X, current=Y, new=X". Basically in this case, pacman sees that even though you modified foo.conf, and the package upgrade results in installing a file that /differs/ from your modified foo.conf, it chooses /not/ to put the package's file in your system at all, as .pacnew or otherwise. This is because it reasons that even though the upgraded package's file differs, it is the same config as the file that you originally edited, so you would probably just apply your exact same changes to that file and move on. So pacman in this case just silently ignores the fact that the upgraded package has a differing file. Of course, in the case of "original=X, current=Y, new=Z" where the upgraded package has a file that is different from /both/ your current config and from the original config that you edited, pacman deems that you should know and installs it as .pacnew . I get the feeling we might be talking past each other though, so please say if that's the case.
Last edited by GenkiSky (2017-07-22 01:21:38)
Offline
Pacman will only install a pacnew file if the file in the package changes. If xxx-1 and xxx-2 are installing the exact same file, there's no pacnew.
Offline
@Scimmia - That makes sense. xxx-1 was modified by the user. If xxx-2 = xxx-1, then why bother the user since he/she already deviated from xxx-1 with xxx-1'. That makes sense. Thanks for the post.
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline