adelcast / opkg_old

Automatically exported from code.google.com/p/opkg
0 stars 0 forks source link

error message if a conffile was changed #128

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. install a package that contain a conffile
2. change this conffile
3. upgrade the package

What is the expected output?
An simple message (not an error) that the existing conffile different from the 
conffile in the new package.

What do you see instead?
An error message that inform about this.

What version of the product are you using? On what operating system?
0.2.1 on MLD Linux

Please provide any additional information below.
Since this is not an error, it should not have the headline "Collected errors". 
It would be better if this issue has the headline "Collected informations".
The problem is, that I get often requests from customers, who want to know, 
what they have done wrong.

Can you tell me, what is the correct way to handle conffiles like the 
/etc/hosts, where it's normal if that file was changed by a customer. I want to 
get no message if this kind of file was changed by the customer.

Original issue reported on code.google.com by muuscl...@gmail.com on 20 Apr 2014 at 9:20

GoogleCodeExporter commented 9 years ago
Can you give me the exact error message you're seeing so I can ensure I'm 
looking at the right bit of the code?

There is currently a "force_maintainer" option to forcibly overwrite a modified 
conffile with the one in the package. It may be that we need to add an opposite 
option to always silently keep the modified conffiles.

Original comment by paul.betafive on 21 Apr 2014 at 2:55

GoogleCodeExporter commented 9 years ago
Here I have a full example for you:

MLD> opkg upgrade base
Upgrading base on root from 0-31 to 0-32...
Downloading 
http://www.minidvblinux.de/download/4.0.0-rpi/files/base/base_0-32.opk.
Configuring base.
Collected errors:
 * resolve_conffiles: Existing conffile /etc/hosts is different from the conffile in the new package. The new conffile will be placed at /etc/hosts-opkg.
 * resolve_conffiles: Existing conffile /etc/fstab is different from the conffile in the new package. The new conffile will be placed at /etc/fstab-opkg.
 * file_md5sum_alloc: Failed to open file /etc/modprobe.conf: No such file or directory.
 * file_md5sum_alloc: Failed to open file /etc/modules.conf: No such file or directory.
 * resolve_conffiles: Existing conffile /etc/rc.config is different from the conffile in the new package. The new conffile will be placed at /etc/rc.config-opkg.

Original comment by muuscl...@gmail.com on 21 Apr 2014 at 3:11

GoogleCodeExporter commented 9 years ago
Yes, a force_owner option or something else would be a good solution, since 
most users do not are interested in conffile update messages

Original comment by muuscl...@gmail.com on 21 Apr 2014 at 3:17

GoogleCodeExporter commented 9 years ago
I assume the file_md5sum_alloc errors are caused by the user having deleted the 
specified conffile. Is that correct?

I'll fix this on the development branch but I'll try to do it in a way that you 
can backport the changes onto opkg v0.2.1 if you wish to. This probably won't 
be fixed in a v0.2.x release though as it involves adding new config options.

Original comment by paul.betafive on 21 Apr 2014 at 3:21

GoogleCodeExporter commented 9 years ago
Yes, the both md5sum error are because of deleted files. That messages are OK 
in my opinion. 
Only the other messages are interesting for this bug report.

Original comment by muuscl...@gmail.com on 21 Apr 2014 at 3:32

GoogleCodeExporter commented 9 years ago
I'm finally looking at this issue again.

I think the messages are useful as they indicate to the user that they may need 
to merge the changes. They should be NOTICE rather than ERROR messages though 
(which will display like the messages above "Collected errors" in comment #2).

To save space in /etc where the modified conffiles from an upgraded package are 
never wanted, I'll add an "ignore_maintainer" option to do the opposite of 
"force_maintainer". This will print the NOTICE message "Conffile %s ignoring 
maintainer's changes." and the new conffile will be removed.

How does this sound?

Original comment by paul.betafive on 12 Oct 2014 at 11:13

GoogleCodeExporter commented 9 years ago
That sounds good to me.

Original comment by muuscl...@gmail.com on 12 Oct 2014 at 12:51

GoogleCodeExporter commented 9 years ago
This is now fixed on the master branch.

Original comment by paul.betafive on 21 Oct 2014 at 4:34