Welcome to CRUX bug tracking.
FS#1074 - package upgrades removes files if they don't exist in the new package, regardless of rejection rules
Attached to Project:
CRUX
Opened by Alan Mizrahi (alancio) - Friday, 24 October 2014, 08:25 GMT
Last edited by Predrag Ivanovic (pedja) - Friday, 16 June 2017, 17:28 GMT
Opened by Alan Mizrahi (alancio) - Friday, 24 October 2014, 08:25 GMT
Last edited by Predrag Ivanovic (pedja) - Friday, 16 June 2017, 17:28 GMT
|
Detailspkgadd -u removes files if they don't exist in the new package, regardless of the rejection rules in pkgadd.conf.
As a test I create package for app-1.0 with /etc/app.conf, and then app-2.0 without it: [root@koji ~]# mkdir etc [root@koji ~]# echo default configuration > etc/app.conf [root@koji ~]# tar -czf app#1.0-1.pkg.tar.gz etc [root@koji ~]# rm etc/app.conf [root@koji ~]# tar -czf app#2.0-1.pkg.tar.gz etc I will install app-1.0, and then customize my configuration file: [root@koji ~]# pkgadd app#1.0-1.pkg.tar.gz [root@koji tmp]# cat /etc/app.conf default configuration [root@koji tmp]# echo customized configuration > /etc/app.conf Now I will upgrade to app-2.0, and my custom configuration file will be gone: [root@koji tmp]# pkgadd -u app#2.0-1.pkg.tar.gz [root@koji tmp]# ls -l /etc/app.conf ls: cannot access /etc/app.conf: No such file or directory My pkgadd.conf contains: UPGRADE ^etc/.*$ NO |
This task depends upon

Attached a patch that seems to fix this, with a drawback.

Re-adding patch