I stumbled across a (slight? I'd say not quite slight) issue with packaging and 
apt.
It seems we added quite a bit of sample configs and accompanying files to emc2. 
These were all installed by default to /etc/emc2/sample-configs/.
There is a small problem though, debian's (and thus ubuntu's too) apt has a 
problem with packages which have too many configuration files.
The configuration files get remembered at installation time (by filename and 
md5sum), that way when someone upgrades the package apt&co check if the 
configuration files have changed since the initial version, and if they didn't 
they don't get replaced by newer config files from the updated package. If they 
hadn't changed, then it's safe to upgrade them. This list of configuration 
files is stored in /var/lib/dpkg/status. For packages where the configuration 
file list exceeds 32k (bytes, not items), apt will simply refuse to read the 
list. (Apt uses an internal buffer of 32k to read those values before doing 
anything, and if one package exceeds that size, it will simply refuse to do 
it's job). So once a user has installed such a package it's impossible for him 
to run any apt tools (including apt-get, aptitude, synaptic and whatever else 
there is out there). The only way to cure such a system is to use dpkg remove 
--purge packagename.

On emc2-2.2.x we are only a couple bytes away from that limit, so that hasn't 
bitten us. On emc2-TRUNK however, we exceeded that limit by ~10k.

There are now 2 approaches:

1. clean up the sample configs, so they fit in 32k. 
disadvantages:
* we need to decide what gets included and what gets discarded, 
* it can bite us at any time in the future. (note: it's unlikely debian people 
will fix the issue with apt, likewise for the ubuntu people [1]). 
advantages:
* users that change the sample configs (despite we tell them repeatedly not to) 
won't get their changes overwritten by package updates.

2. change the install location for the sample configs from 
/etc/emc2/sample-configs to /usr/share/doc/emc2/sample-configs (it's quite 
common to use /usr/share/doc/package/examples/ as a location for sample 
configs).
advantages:
* no limit how much sample configs we put there
* the user won't see a difference, the config picker is perfectly fine with any 
location of the config files
* the location is still readonly for regular users, so they will be prompted to 
make a working copy of the config, and change that one
disadvantage:
* when updating to a new emc2 package, the sample configs in 
/usr/share/doc/emc2/sample-configs will get replaced (even if they have been 
changed by the user).

I think the sane approach is to do #2, so I went ahead and made the changes for 
that on TRUNK so more people can look at it and comment.

Regards,
Alex

[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=174945 - reported in 2003, 
fixed sometimes in 2004 (changing the buffersize from 32k to 128k). 
Yet now it's back again to 32k: 
http://bzr.debian.org/loggerhead/apt/apt/debian-sid/annotate/head:/apt-pkg/tagfile.h?
 line 85.
I submitted a new bugreport against Ubuntu here: 
https://bugs.launchpad.net/ubuntu/+source/apt/+bug/329554, and tried to reopen 
the debian bugreport (but my email to [email protected] bounced).
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Emc-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/emc-developers

Reply via email to