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#22107 - Previously valid backup=() now invalid in makepkg

Attached to Project: Pacman
Opened by Anonymous Submitter - Wednesday, 15 December 2010, 09:36 GMT
Last edited by Allan McRae (Allan) - Monday, 27 December 2010, 10:28 GMT
Task Type Bug Report
Category makepkg
Status Closed
Assigned To Allan McRae (Allan)
Architecture All
Severity Low
Priority Normal
Reported Version 3.4.1
Due in Version 3.5.0
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

My packages are now complaining about the form of the backup=() entry when I use makepkg. I've always used relative file names, although I haven't in the past enclosed them in quotes. To try to fix this I have tried every possible combination e.g. for my radvd package -

backup=(etc/$pkgname/radvd.conf)

backup=("etc/$pkgname/radvd.conf")

backup=('etc/$pkgname/radvd.conf')

backup=('etc/radvd/radvd.conf')

backup=('etc/radvd.conf') # not valid for my package, but I tested it anyway

All of the above alternatives give the following message -

==> WARNING: Invalid backup entry : <backup filename>

According to the PKGBUILD manual page, at least one of the above should be correct.

I have a number of packages that would suffer from this problem. I've looked in what I think are the obvious places as to how to fix this, or what has changed, but can't find anything. How do I fix my packages?
This task depends upon

Closed by  Allan McRae (Allan)
Monday, 27 December 2010, 10:28 GMT
Reason for closing:  Implemented
Additional comments about closing:  Warning messages clarified in commit 68d8bfa0
Comment by Allan McRae (Allan) - Wednesday, 15 December 2010, 09:42 GMT
That file is not in your final package...
Comment by Anonymous Submitter - Thursday, 16 December 2010, 09:19 GMT
Does it have to be? A non-existent configuration file at initial installation would seem to me to be quite valid and has been in the past. For some packages, I think it is better to have an example configuration file that isn't named as the default configuration file, to force people to learn how to build one. Routing protocol daemons, where significant damage to the network can be caused if they're not configured from scratch, could be another example.

A more informative error/warning message would have also been more helfpul in makepkg.
Comment by Allan McRae (Allan) - Thursday, 16 December 2010, 10:29 GMT
Why would you backup a non-existent file? Pacman does not know about the file to remove it...
Comment by Anonymous Submitter - Tuesday, 21 December 2010, 10:39 GMT
Hi Allan,

"Why would you backup a non-existent file?"

Well, after the user has installed the package, without a configuration file, they'll create a configuration file so they can use the package. Then a file now exists to be backed up if the package is removed.

To my mind, the word "backup" means keep "this" data if there is any chance it would be removed, because I might want to use it again - hence backing up/keeping a configuration file that didn't exist at package installation. If I removed the backup() entry for /etc/radvd/radvd.conf, would that file be deleted if the package was removed?
Comment by Allan McRae (Allan) - Tuesday, 21 December 2010, 10:43 GMT
Pacman knows nothing about the file as it is in no package. So not matter what package you remove, pacman would not remove that file.
Comment by Anonymous Submitter - Wednesday, 22 December 2010, 10:07 GMT
Hi Allan,

My fear was that if the package didn't know about the file in the e.g. /etc/radvd subdirectory, it would delete the subdirectory, and therefore the file, when the package was removed. My thinking was that putting the non-existent configuration file in the backup() entry would ensure that the file wouldn't be deleted.
Comment by Allan McRae (Allan) - Sunday, 26 December 2010, 07:11 GMT
Pacman will never delete a file that it does not know about. I will adjust the warning message to make it clearer what the error is.
Comment by Allan McRae (Allan) - Monday, 27 December 2010, 10:27 GMT
The clarification of the warning messages has already been done in git:
http://projects.archlinux.org/pacman.git/commit/?id=68d8bfa0

Loading...