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

Bug#60917: Request for NMU (console-tools)



About Bug#60917:

I cannot upload a fixed version now.

FIX: 

* replace the preinst code quoted in the report by the following
(please test it first).  Note that it uses evil "Press RETURN"s in
case something is probably broken.

=====
if [ -d /usr/local/share/keytables ]
then
    if [ -d `readlink -f /usr/local/share/keymaps` ]
    then
	mv /usr/local/share/keytables/* /usr/local/share/keymaps
	rmdir /usr/local/share/keytables
    elif [ -e /usr/local/share/keymaps ]
    then
	echo >&2 "/usr/local/share/keymaps is buggy - please check it"
	ls -ld /usr/local/share/keymaps >&2
	echo >&2 "Press RETURN to continue"
	read
    else
	mv /usr/local/share/keytables /usr/local/share/keymaps
    fi
elif [ -e /usr/local/share/keytables ]
then
    echo >&2 <<EOF
/usr/local/share/keytables is not a dir.  I won't try to mess
with it and you will surely want to do something with it, as the
new location for local keymaps is now /usr/local/share/keymaps/.

Press RETURN to continue
EOF
    read
fi
====

* add a versionned Depends on debianutils (>= 1.13.1), as advertised
in the readlink(1) manpage.


Testing: install the package several times, in each of the following
cases:

1. /usr/local/share/keytables/ is a dir and
 1a. /usr/local/share/keymaps is a dir
   => should move subdirs
 1b. /usr/local/share/keymaps is a special file (mknod(1) it)
   => should complain
 1c. /usr/local/share/keymaps does not exist
   => should move dir
2. /usr/local/share/keytables/ is a special file
   => should complain


* maybe apply the rules in "Filesystem hierarchy"/"Site-specific
programs" of the policy (create and remove /usr/local dirs from
postinst/prerm), but I don't know if this should really be done for
potato, better leave this for woody.

-- 
Yann.


Reply to: