[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Using SMARTLIST from bo? Please, READ this.



This message is for users of the Debian smartlist package.

I have detected a little problem which may arise when upgrading smartlist
from bo to hamm. If you are running smartlist_3.10­16 from bo, please read
the following before upgrading to hamm.

The problem is very simple: In bo, when a list was created, the script
/var/list/.bin/createlist used HARDlinks to link some files from the list
directory to the .etc directory.

Well, by design, dpkg does not preserve those hardlinks on upgrades.
Instead, they end up being different files.

For example, if, say "foo/rc.request" is a hardlink to ".etc/rc.request"
(created automatically by "createlist") and the file .etc/rc.request is
replaced by a newer one by dpkg, then foo/rc.request and .etc/rc.request
will not be hardlinked anymore.

This is not what one might expect. All lists should "benefit" from
enhancements in the files in .etc.

Therefore it is much better to use symlinks and not hardlinks.

The .bin/createlist in hamm's smartlist already uses symlinks. However,
one may have already lots of created lists with hardlinks to .etc.

I strongly recommend to convert all those hardlinks into symlinks
*before* upgrading to hamm's smartlist.

The "preinst" script for smartlist_3.10.7-5 (just installed in hamm) will
just warn you about this and will let you to break the process by pressing
Control-C. This way, smartlist will not be upgraded until the user is
aware of the problem and has fixed it.

The following script will do the job. I have tested it and works for
me, but use it at your own risk.


filestosymlink="rc.submit rc.init rc.request help.txt subscribe.txt \
                unsubscribe.txt archive.txt reject"

cd /var/list
# Note: touching .etc/rc.lock makes incoming mails to be on hold
# temporarily, while we convert hardlinks into symlinks.
# See the smartlist Manual for details.
touch .etc/rc.lock
echo Please wait for 5 seconds.
sleep 5
echo Converting most hardlinks into symlinks...
for a in `ls`; do
  if [ -d $a ]; then
    cd $a
    if [ -d archive ]; then
      for b in $filestosymlink; do
        if [ -f $b ]; then
          inode1=`ls -li ../.etc/$b | awk '{ print $1 }'`
          inode2=`ls -li $b | awk '{ print $1 }'`
          if [ "$inode1" = "$inode2" ]; then
            rm -f $b
            ln -s ../.etc/$b
    cd ..
rm -f .etc/rc.lock
echo Done.

Sorry for the inconvenience, etc.

p.s. I have uploaded today bo-unstable releases of procmail and smartlist,
for people using 1.3.1 who want Maildir support in procmail or
confirmation of subscriptions in smartlist (remember to transform
hardlinks into symlinks *first*).


Version: 2.6.3ia
Charset: latin1


To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org

Reply to: