[go: up one dir, main page]

File: coreutils.preinst

package info (click to toggle)
coreutils 6.10-6
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 9,128 kB
  • ctags: 14
  • sloc: makefile: 133; sh: 21
file content (42 lines) | stat: -rw-r--r-- 1,891 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

set -e

# shellutils in woody contained symlinks for these items. On upgrade, dpkg 
# doesn't cope well with the transition from those symlinks to the current
# directories.
for i in /usr/share/locale/cs /usr/share/locale/da /usr/share/locale/de /usr/share/locale/el /usr/share/locale/es /usr/share/locale/fr /usr/share/locale/gl /usr/share/locale/it /usr/share/locale/ja /usr/share/locale/ko /usr/share/locale/nl /usr/share/locale/no /usr/share/locale/pl /usr/share/locale/pt /usr/share/locale/pt_BR /usr/share/locale/ru /usr/share/locale/sk /usr/share/locale/sl /usr/share/locale/sv /usr/share/locale/zh ; do
	test -L $i/LC_TIME && rm -f $i/LC_TIME
	test -L $i/LC_MESSAGES/coreutils.mo && rm -f $i/LC_MESSAGES/coreutils.mo 
done

# make sure old info files are cleaned up
for i in sh-utils fileutils textutils ; do
	if grep -qs $i /usr/info/dir /usr/share/info/dir ; then
		install-info --quiet --remove /usr/share/info/$i.info
	fi
done

# work around stupid dpkg diversion of md5sum
# get rid of this for etch+1, I don't think there's a better solution until then
case "$2" in
'' | 4.* | 5.?.*)
    # coreutils 5.93-1 onwards do this, so we can avoid doing
    # it if we know it's already been done.  That avoids trashing
    # any real local diversion subsequently introduced by the sysadmin.
    # (There are no coreutils versions between 5.2.1 and 5.93.)
    rm -f /usr/bin/md5sum.textutils
    rm -f /usr/share/man/man1/md5sum.1.gz
    rm -f /usr/share/man/man1/md5sum.textutils.1.gz
    dpkg-divert --remove /usr/share/man/man1/md5sum.textutils.1.gz
    dpkg-divert --remove /usr/bin/md5sum.textutils
    # Possibly this can be removed at some distant point, when we're
    # sure that all of the systems infected with the diversion (ie,
    # systems which were running the wrong version of sid, breezy or
    # dapper) have been fixed.
    ;;
esac

#DEBHELPER#

exit 0