[oe] [PATCH 3/3] base-files-3.0.14 configuration files

Martin Jansa martin.jansa at gmail.com
Fri Mar 18 15:30:48 UTC 2011


On Fri, Mar 18, 2011 at 02:08:15PM +0100, Peter Gsellmann wrote:
> Am Freitag, 18. März 2011, 09:59:17 schrieb Hauser, Wolfgang (external):
> > >> > Mark some files in ${sysconfdir} as configuration files so they are
> > >> not blindly overwritten when upgrading
> > >> 
> > >> I would suggest a pre-/post processing in the packages, like debian
> > >> does.
> > >> If a config file exists or is changed, the current File will be
> > rotated
> > >> or, if possible, left as it is and the new 
> > >> file is installed beside the changed one.
> > 
> > >The opkg does not touch a present config file, but installs the new
> > file with the name *-opkg
> > >So if you do a find /etc -name \*-opkg you see the conflicts.
> > 
> > >Any sensible conversion from old to new config file should be made by
> > the package itself.
> > 
> > As I experienced, opkg exits with an error code if a config file already
> > exists, so if you want to create an image, the process will break at
> > that error.
> > It wasn't possible to create an image automatically then.
> If you create a fresh new image, the config files should not exist.
> opkg should not complain.

Looks like you two are talking about 2 different things.

W) If 2 different packages are installing same config file, opkg won't
overwrite it and image creation would also fail

P) If same package is trying to install newer version of config file it
overwrites it silently when md5 sums are the same or file is not in
CONFFILES or creates config.file-opkg otherwise.

So the patch idea looks sane to me, only please check why there is
unused conffiles variable and maybe use it as default CONFFILES or
remove it completely.

Regards,
 
> Problem arises if you do a 'opkg upgrade' from the running target;
> With patch, opkg knows about Conffiles of base-files:
> root at us-3:~# opkg info base-files
> Package: base-files
> Version: 3.0.14-r101.9
> Provides:
> Status: install user installed
> Section: base
> Architecture: pcontrol_g20
> Maintainer: Angstrom Developers <angstrom-distro-devel at linuxtogo.org>
> MD5Sum: d5553232d20233866c7f626b7f1d6d4f
> Size: 4336
> Filename: base-files_3.0.14-r101.9_pcontrol_g20.ipk
> Conffiles:
>  /etc/fstab 8a0d747a1565dfb39ae3b27b33ab5031
>  /etc/hostname 0e97f4187e8f27c48206165806f9310a
>  /etc/motd d41d8cd98f00b204e9800998ecf8427e
>  /etc/profile 573d43f3c53d5bdabca7ec2317f5eb28
>  /etc/nsswitch.conf 109e33e2c91d1853b5bc56078a96aa18
>  /etc/host.conf a61b9f6548d337c1cc1e5a4de39f7b7f
> Source: file://nsswitch.conf file://motd file://inputrc file://host.conf file://profile file://profile.d file://fstab file://filesystems file://issue.net file://issue file://usbd file://share/dot.bashrc file://share/dot.profile file://licenses/BSD file://licenses/GPL-2 file://licenses/GPL-3 file://licenses/LGPL-2 file://licenses/LGPL-2.1 file://licenses/LGPL-3 file://licenses/GFDL-1.2 file://licenses/Artistic
> Description: Miscellaneous files for the base system.
> Installed-Time: 1300270958
> 
> 
> As you can see, opkg maintains some md5-hash value for the unchanged Conffile so a sensible conflict resolution is possible.
> If it is not done so, its a opkg bug
> 
> Tested: it is possible to create an image with this patch.
> Tested: 'opkg upgrade' handles the Conffiles as expected.
> 
> Peter
> 
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.openembedded.org/pipermail/openembedded-devel/attachments/20110318/4cba8e30/attachment-0002.sig>


More information about the Openembedded-devel mailing list