This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=b6b7d10bc6f7f04ef972e4f22facc24ec578b3c1

commit b6b7d10bc6f7f04ef972e4f22facc24ec578b3c1
Author: Guillem Jover <[email protected]>
AuthorDate: Fri Dec 27 02:53:59 2019 +0100

    dselect: Remove harddisk methods
    
    These were non-functional due to fdisk changes, and do not make sense
    anymore, as we can expect users to mount any such filesystem on their
    own and then use a filesystem method instead.
---
 debian/changelog                   |  5 +++
 dselect/methods/Makefile.am        |  1 -
 dselect/methods/disk/desc.harddisk |  9 -----
 dselect/methods/disk/names         |  1 -
 dselect/methods/disk/setup         | 70 --------------------------------------
 dselect/methods/multicd/install    |  5 ---
 dselect/methods/multicd/setup      | 63 ----------------------------------
 7 files changed, 5 insertions(+), 149 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 2d542168e..0353ff64b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,11 @@ dpkg (1.20.0) UNRELEASED; urgency=medium
   * dpkg-buildpackage: Do not accept equal signs as part of the hook names.
     Reported by Daniel Shahaf <[email protected]>. Closes: #948291
   * dselect: Mark a string for translation.
+  * dselect: Cleanup access methods:
+    - Remove harddisk methods, as they were non-functional due to fdisk
+      interface changes, and do not make sense anymore as we can expect users
+      to mount any such filesystem on their own, to then use a filesystem
+      method instead. Prompted by Helmut Grohne <[email protected]>.
   * Perl modules:
     - Dpkg::Source::Package: Verify original tarball signatures at build time.
     - Dpkg::BuildFlags: Add new unset() method.
diff --git a/dselect/methods/Makefile.am b/dselect/methods/Makefile.am
index 74c8be2ce..7807210eb 100644
--- a/dselect/methods/Makefile.am
+++ b/dselect/methods/Makefile.am
@@ -6,7 +6,6 @@ nobase_dist_methods_DATA = \
        disk/names \
        disk/desc.cdrom \
        disk/desc.nfs \
-       disk/desc.harddisk \
        disk/desc.mounted \
        ftp/names \
        ftp/desc.ftp \
diff --git a/dselect/methods/disk/desc.harddisk 
b/dselect/methods/disk/desc.harddisk
deleted file mode 100644
index ba4575030..000000000
--- a/dselect/methods/disk/desc.harddisk
+++ /dev/null
@@ -1,9 +0,0 @@
-Installation from filesystem on a hard disk partition that's not
-currently mounted.
-
-The partition should contain the Packages.gz file from each
-distribution area being installed (usually stable, contrib and
-non-free) as well as the corresponding binary/*/*.deb files.
-
-The easiest way to get this is to make a (partial) copy of the
-distribution site's directory hierarchy, if possible.
diff --git a/dselect/methods/disk/names b/dselect/methods/disk/names
index 1f55b78e3..273d47477 100644
--- a/dselect/methods/disk/names
+++ b/dselect/methods/disk/names
@@ -1,4 +1,3 @@
 30 cdrom Install from a CD-ROM.
 35 nfs Install from an NFS server (not yet mounted).
-40 harddisk Install from a hard disk partition (not yet mounted).
 42 mounted Install from a filesystem which is already mounted.
diff --git a/dselect/methods/disk/setup b/dselect/methods/disk/setup
index 7039ed161..632b357ce 100755
--- a/dselect/methods/disk/setup
+++ b/dselect/methods/disk/setup
@@ -54,13 +54,6 @@ yesno () {
        done
 }
 
-print_partition_table()
-{
-       device="$1"
-
-       printf "p\nq\n" | fdisk "$device" 2>/dev/null
-}
-
 getblockdev () {
        mountpoint="$vardir/methods/mnt"
        if [ -z "$defaultdevice" ]
@@ -88,43 +81,6 @@ getblockdev () {
                if [ $option = cdrom ]
                then
                        fstype=iso9660
-               elif [ $option = harddisk ]
-               then
-                       blockbase="`echo \"$tryblockdevice\" | sed -e 
's/[0-9]\{1,\}$//'`"
-                       set +e
-                       print_partition_table "$blockbase" >$tp.f
-                       set -e
-                       proposeddevice="$tryblockdevice" perl -ne '
-next unless /^ *Device +Boot +Start +End +Blocks +Id +System *$/i .. !/\S/;
-next unless s:^/\S+::p && ${^MATCH} eq $ENV{proposeddevice};
-next unless s/^ +(\* +)?\d+ +\d+ +\d+\+? +//;
-next unless m/^([0-9a-f]{1,2}) /i;
-%types= ( "1","msdos", "4","msdos", "6","msdos", "7","hpfs", "80","minix",
-          "81","minix", "83","ext2" );
-print $types{$1}; exit(0);     ' <$tp.f >$tp.m
-                       defaultfstype="`cat $tp.m`"
-                       if [ -n "$defaultfstype" ]
-                       then
-                               cat <<END
-The partition table for $blockbase claims that $tryblockdevice
-contains filesystem type $defaultfstype.
-END
-                               if ! grep "     $defaultfstype$" 
/proc/filesystems >/dev/null
-                               then
-                                       echo \
-       "Your kernel does not appear to support that filesystem type."
-                                       defaultfstype=""
-                               fi
-                       fi
-                       echo -n "Supported filesystems: "
-                       sed -e 's/^.*   / /' /proc/filesystems | tr '\n' ' '
-                       echo -n "
-Enter filesystem type (for $tryblockdevice) [$defaultfstype]:  "
-                       read fstype
-                       if [ -z "$fstype" ]
-                       then
-                               fstype="$defaultfstype"
-                       fi
                fi
                umount="$mountpoint"
                if mount -rt "$fstype" -o nosuid,nodev "$tryblockdevice" 
"$mountpoint"
@@ -302,32 +258,6 @@ the Debian files? [$defaultnfsrempath]  "
        nfs="$nfsserver:$nfsrempath"
 fi
 
-if [ $option = harddisk ]
-then
-       set +e
-       print_partition_table /dev/hda >$tp.f
-       if [ $? != 0 ]
-       then
-               print_partition_table /dev/sda >$tp.f
-       fi
-       set -e
-       perl -ne '
-next unless /^ *Device +Boot +Start +End +Blocks +Id +System *$/i .. !/\S/;
-next unless / [146] +DOS \d+-bit \S+$/;
-next unless m:^/\S+:p;
-print ${^MATCH};               ' <$tp.f >$tp.d
-       newdefaultdevice="`cat $tp.d`"
-       echo "
-I need to know which disk partition contains the distribution files;
-disk partitions are specified by the block device name in Linux."
-       if [ -n "$newdefaultdevice" ]
-       then
-               echo \
-"By the way, $newdefaultdevice looks like a DOS partition."
-       fi
-       getblockdev "Enter the partition's block device name"
-fi
-
 if [ -n "$mountpoint" ]
 then
        # We must have $mountpoint
diff --git a/dselect/methods/multicd/install b/dselect/methods/multicd/install
index e4d772c6a..6db59824d 100755
--- a/dselect/methods/multicd/install
+++ b/dselect/methods/multicd/install
@@ -87,11 +87,6 @@ do_mount() {
                umount="$p_mountpoint"
                echo mount -rt nfs "$p_nfs" -o nosuid,nodev "$p_mountpoint"\; 
umount="$p_mountpoint"
        fi
-
-       #if [ -n "$p_multi" -a -n "$p_multi_contentsfile" ]; then
-               #echo "This is disk "
-               #echo "    "`getdisklabel "${p_mountpoint}" "${p_hierbase}"`
-       #fi
 }
 
 trap 'eval `do_umount`; exit $xit' 0
diff --git a/dselect/methods/multicd/setup b/dselect/methods/multicd/setup
index 3470da3fd..9badab318 100755
--- a/dselect/methods/multicd/setup
+++ b/dselect/methods/multicd/setup
@@ -115,43 +115,6 @@ getblockdev () {
                if [ $option = multi_cd ]
                then
                        fstype=iso9660
-               elif [ $option = harddisk2 ]
-               then
-                       blockbase="`echo \"$tryblockdevice\" | sed -e 
's/[0-9]\{1,\}$//'`"
-                       set +e
-                       printf 'p\nq\n' | fdisk "$blockbase" 2>/dev/null >$tp.f
-                       set -e
-                       proposeddevice="$tryblockdevice" perl -ne '
-next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. 
!/\S/;
-next unless s:^/\S+::p && ${^MATCH} eq $ENV{proposeddevice};
-next unless s/^ +(\* +)?\d+ +\d+ +\d+ +\d+\+? +//;
-next unless m/^([0-9a-f]{1,2}) /i;
-%types= ( "1","msdos", "4","msdos", "6","msdos", "7","hpfs", "80","minix",
-          "81","minix", "83","ext2" );
-print $types{$1}; exit(0);     ' <$tp.f >$tp.m
-                       defaultfstype="`cat $tp.m`"
-                       if [ -n "$defaultfstype" ]
-                       then
-                               cat <<END
-The partition table for $blockbase claims that $tryblockdevice
-contains filesystem type $defaultfstype.
-END
-                               if ! grep "     $defaultfstype$" 
/proc/filesystems >/dev/null
-                               then
-                                       echo \
-       "Your kernel does not appear to support that filesystem type."
-                                       defaultfstype=""
-                               fi
-                       fi
-                       echo -n "Supported filesystems: "
-                       sed -e 's/^.*   / /' /proc/filesystems | tr '\n' ' '
-                       echo -n "
-Enter filesystem type (for $tryblockdevice) [$defaultfstype]:  "
-                       read fstype
-                       if [ -z "$fstype" ]
-                       then
-                               fstype="$defaultfstype"
-                       fi
                fi
                umount="$mountpoint"
                if mount -rt "$fstype" -o nosuid,nodev$loop "$tryblockdevice" 
"$mountpoint"
@@ -331,32 +294,6 @@ the Debian files ? [$defaultnfsrempath]  "
        nfs="$nfsserver:$nfsrempath"
 fi
 
-if [ $option = harddisk2 ]
-then
-       set +e
-       printf 'p\nq\n' | fdisk /dev/hda 2>/dev/null >$tp.f
-       if [ $? != 0 ]
-       then
-               printf 'p\nq\n' | fdisk /dev/sda 2>/dev/null >$tp.f
-       fi
-       set -e
-       perl -ne '
-next unless /^ *Device +Boot +Begin +Start +End +Blocks +Id +System *$/i .. 
!/\S/;
-next unless / [146] +DOS \d+-bit \S+$/;
-next unless m:^/\S+:p;
-print ${^MATCH};               ' <$tp.f >$tp.d
-       newdefaultdevice="`cat $tp.d`"
-       echo "
-I need to know which disk partition contains the distribution files;
-disk partitions are specified by the block device name in Linux."
-       if [ -n "$newdefaultdevice" ]
-       then
-               echo \
-"By the way, $newdefaultdevice looks like a DOS partition."
-       fi
-       getblockdev "Enter the partition's block device name"
-fi
-
 if [ -n "$mountpoint" ]
 then
        # We must have $mountpoint

-- 
Dpkg.Org's dpkg

Reply via email to