From: LaMont Jones Date: Wed, 15 Aug 2007 06:15:31 +0000 (-0600) Subject: mount: Use Breaks: control file syntax where possible, instead of preinst. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=90c51d137af45128d79d15662c2ab8edc67c3a18;p=util-linux mount: Use Breaks: control file syntax where possible, instead of preinst. --- diff --git a/debian/control b/debian/control index c20f5b44..b4471f0c 100644 --- a/debian/control +++ b/debian/control @@ -40,7 +40,8 @@ Architecture: alpha amd64 arm armeb armel hppa i386 ia64 lpia m32r m68k mips mip Essential: yes Section: admin Depends: ${mount:Depends} -Suggests: nfs-common (>=1:1.1.0-7) +Suggests: nfs-common (>=1:1.1.0-13) +Breaks: nfs-common (<<1:1.1.0-7) Description: Tools for mounting and manipulating filesystems This package provides the mount(8), umount(8), swapon(8), swapoff(8), and losetup(8) commands. diff --git a/debian/control.in b/debian/control.in new file mode 100644 index 00000000..b4471f0c --- /dev/null +++ b/debian/control.in @@ -0,0 +1,76 @@ +Source: util-linux +Section: base +Priority: required +Build-Depends: libncurses5-dev, libslang2-dev (>=2.0.4-1), gettext, zlib1g-dev, libvolume-id-dev (>=0.113-2), uuid-dev, dpkg-dev (>=1.13.12), libselinux1-dev [!kfreebsd-i386 !kfreebsd-amd64 !hurd-i386] +Maintainer: LaMont Jones +Standards-Version: 3.7.2.0 + +Package: util-linux +Architecture: any +Depends: ${util-linux:Depends} +Section: utils +Priority: required +Essential: yes +Depends: lsb-base (>= 3.0-6), tzdata (>=2006c-2) +Suggests: util-linux-locales, kbd | console-tools, dosfstools +Replaces: schedutils, miscutils, setterm, fdisk, ${util-linux:Conflicts} +Conflicts: schedutils, setterm, fdisk, kbd (<< 1.05-3), console-tools (<< 1:0.2.3-21), ${util-linux:Conflicts} +Provides: schedutils +Description: Miscellaneous system utilities + This package contains a number of important utilities, most of which + are oriented towards maintenance of your system. Some of the more + important utilities included in this package allow you to partition + your hard disk, view kernel messages, and create new filesystems. + +Package: util-linux-locales +Architecture: all +Section: utils +Priority: optional +Depends: util-linux (>= ${Upstream}-0), util-linux (<< ${Upstream}.0-0) +Replaces: util-linux (<< 2.11b) +Description: Locales files for util-linux + This package contains the internationalization files of for the util-linux + package. + . + They are needed when you want the programs in util-linux to print their + messages in other languages than English. + +Package: mount +Architecture: alpha amd64 arm armeb armel hppa i386 ia64 lpia m32r m68k mips mipsel powerpc ppc64 sh s390 sparc sparc64 +Essential: yes +Section: admin +Depends: ${mount:Depends} +Suggests: nfs-common (>=1:1.1.0-13) +Breaks: nfs-common (<<1:1.1.0-7) +Description: Tools for mounting and manipulating filesystems + This package provides the mount(8), umount(8), swapon(8), + swapoff(8), and losetup(8) commands. + +Package: bsdutils +Architecture: any +Essential: yes +Section: utils +Depends: ${bsdutils:Depends} +Recommends: bsdmainutils +Description: Basic utilities from 4.4BSD-Lite + This package contains the bare minimum number of BSD utilities needed + to boot a Debian system. You should probably also install + bsdmainutils to get the remaining standard BSD utilities. + . + Included are: logger, renice, replay, script, wall + +Package: fdisk-udeb +Architecture: alpha amd64 arm armeb armel hppa i386 ia64 lpia m32r mips mipsel powerpc ppc64 hurd-i386 sparc s390 +Priority: extra +Section: debian-installer +Depends: ${fdisk-udeb:Depends} +Description: Partition a hard drive (manual) + fdisk package + +Package: cfdisk-udeb +Architecture: alpha amd64 arm armeb armel hppa i386 ia64 lpia m32r mips mipsel powerpc ppc64 hurd-i386 s390 +Priority: extra +Section: debian-installer +Depends: ${cfdisk-udeb:Depends} +Description: Partition a hard drive (cfdisk) + Cfdisk package diff --git a/debian/mount.preinst b/debian/mount.preinst index 5717239a..583749ef 100644 --- a/debian/mount.preinst +++ b/debian/mount.preinst @@ -11,6 +11,7 @@ ## DEBCONF= ##fi +DISTRO=$(lsb_release -is 2>/dev/null || echo Debian); case "$1" in install) ;; @@ -19,19 +20,21 @@ case "$1" in version=$2 export LANG=C # for the comparison of mail version... - if [ -f /var/lib/dpkg/info/nfs-common.list ] && [ -f /proc/mounts ]; then - NFS_IN_USE=$(sed -n '/^[^ ]* [^ ]* nfs /p' /proc/mounts) - else - NFS_IN_USE="" - fi - if [ -n "$NFS_IN_USE" ] && [ ! -x /sbin/mount.nfs ] ; then - cat << EOF + if [ Debian = "$DISTRO" ]; then + if [ -f /var/lib/dpkg/info/nfs-common.list ] && [ -f /proc/mounts ]; then + NFS_IN_USE=$(sed -n '/^[^ ]* [^ ]* nfs /p' /proc/mounts) + else + NFS_IN_USE="" + fi + if [ -n "$NFS_IN_USE" ] && [ ! -x /sbin/mount.nfs ] ; then + cat << EOF You have NFS mount points currently mounted, and this version of mount requires that nfs-common be upgraded before NFS mounts will work. Aborting install. EOF - exit 1 + exit 1 + fi fi ;; diff --git a/debian/rules b/debian/rules index c59c9189..11d029d9 100755 --- a/debian/rules +++ b/debian/rules @@ -61,6 +61,11 @@ clean: find . -name '*.rej' -print0 | xargs -0r rm rm -rf debian/tmp* debian/files* debian/substvars po/messages rm -rf $(CFDISK_PO_DIR) +ifeq ($(DISTRO),"Debian") + sed '/^Breaks:/d' debian/control.in > debian/control +else + cp debian/control.in debian/control +endif # Architecture independant stuff