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

guillem pushed a commit to branch main
in repository dpkg.

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

commit 43c95774959d7a20f564eb8fcd4a2ebde01d68ab (HEAD -> main)
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sun Mar 20 20:18:02 2022 +0100

    dselect: Rename disk method to file
    
    The disk name while somewhat appropriate might, does not map to a URL
    style nomenclature, which we should be moving to, so that different
    protocols are clearly recognizable by the users.
---
 debian/dselect.preinst                    |  1 +
 debian/dselect.prerm                      |  1 +
 dselect/methods/Makefile.am               | 18 +++++++++---------
 dselect/methods/disk/desc.mounted         | 12 ------------
 dselect/methods/disk/names                |  1 -
 dselect/methods/{disk => file}/.gitignore |  0
 dselect/methods/file/desc.file            |  8 ++++++++
 dselect/methods/{disk => file}/install.sh |  2 +-
 dselect/methods/file/names                |  1 +
 dselect/methods/{disk => file}/setup.sh   |  2 +-
 dselect/methods/{disk => file}/update.sh  |  2 +-
 11 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/debian/dselect.preinst b/debian/dselect.preinst
index ada5529bf..59d36e90f 100644
--- a/debian/dselect.preinst
+++ b/debian/dselect.preinst
@@ -33,6 +33,7 @@ rename_method_state_dir() {
 case "$1" in
 install|upgrade)
   if [ -n "$2" ]; then
+    rename_method_state_dir disk mounted file file
     rename_method_state_dir multicd multi_cd media media
   fi
   ;;
diff --git a/debian/dselect.prerm b/debian/dselect.prerm
index 63b699c5f..0a49491ec 100644
--- a/debian/dselect.prerm
+++ b/debian/dselect.prerm
@@ -34,6 +34,7 @@ case "$1" in
 upgrade)
   if dpkg --compare-versions "$2" lt 1.21.3; then
     # Downgrade
+    rename_method_state_dir file file disk mounted
     rename_method_state_dir media media multicd multi_cd
   fi
   ;;
diff --git a/dselect/methods/Makefile.am b/dselect/methods/Makefile.am
index 988937540..d8404b502 100644
--- a/dselect/methods/Makefile.am
+++ b/dselect/methods/Makefile.am
@@ -3,8 +3,8 @@
 methodsdir = $(pkglibexecdir)/methods
 
 nobase_dist_methods_DATA = \
-       disk/names \
-       disk/desc.mounted \
+       file/names \
+       file/desc.file \
        ftp/names \
        ftp/desc.ftp \
        media/names \
@@ -12,9 +12,9 @@ nobase_dist_methods_DATA = \
        # EOL
 
 nobase_methods_SCRIPTS = \
-       disk/install \
-       disk/setup \
-       disk/update \
+       file/install \
+       file/setup \
+       file/update \
        ftp/install \
        ftp/setup \
        ftp/update \
@@ -29,9 +29,9 @@ nobase_dist_perllib_DATA = \
        # EOL
 
 EXTRA_DIST = \
-       disk/setup.sh \
-       disk/update.sh \
-       disk/install.sh \
+       file/setup.sh \
+       file/update.sh \
+       file/install.sh \
        ftp/setup.pl \
        ftp/update.pl \
        ftp/install.pl \
@@ -51,6 +51,6 @@ include $(top_srcdir)/build-aux/subst.am
 
 install-data-local:
        $(MKDIR_P) $(DESTDIR)$(admindir)/methods/mnt
-       $(MKDIR_P) $(DESTDIR)$(admindir)/methods/disk
+       $(MKDIR_P) $(DESTDIR)$(admindir)/methods/file
        $(MKDIR_P) $(DESTDIR)$(admindir)/methods/ftp
        $(MKDIR_P) $(DESTDIR)$(admindir)/methods/media
diff --git a/dselect/methods/disk/desc.mounted 
b/dselect/methods/disk/desc.mounted
deleted file mode 100644
index b980d70ae..000000000
--- a/dselect/methods/disk/desc.mounted
+++ /dev/null
@@ -1,12 +0,0 @@
-Installation from a directory on a filesystem that has already been
-mounted.  If the options available for mounting things automatically
-are inadequate for your needs you'll need to get a shell command
-prompt (for example by switching VT using Alt-F<n> or quitting
-dselect) and use it to mount the filesystem before continuing.
-
-The area you're installing from 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 do 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
deleted file mode 100644
index f474d67ee..000000000
--- a/dselect/methods/disk/names
+++ /dev/null
@@ -1 +0,0 @@
-42 mounted Install from a filesystem which is already mounted.
diff --git a/dselect/methods/disk/.gitignore b/dselect/methods/file/.gitignore
similarity index 100%
rename from dselect/methods/disk/.gitignore
rename to dselect/methods/file/.gitignore
diff --git a/dselect/methods/file/desc.file b/dselect/methods/file/desc.file
new file mode 100644
index 000000000..a2ceaf363
--- /dev/null
+++ b/dselect/methods/file/desc.file
@@ -0,0 +1,8 @@
+Installation from a directory on the filesystem.
+
+The area you are installing from should contain the Packages.gz file
+from each distribution area being installed (usually main, contrib
+and non-free) as well as the corresponding binary/*/*.deb files.
+
+The easiest way to do get this is to make a (partial) copy of the
+distribution site's directory hierarchy, if possible.
diff --git a/dselect/methods/disk/install.sh b/dselect/methods/file/install.sh
similarity index 99%
rename from dselect/methods/disk/install.sh
rename to dselect/methods/file/install.sh
index 297c47cf9..3945bf5dd 100755
--- a/dselect/methods/disk/install.sh
+++ b/dselect/methods/file/install.sh
@@ -18,7 +18,7 @@ vardir="$1"
 method=$2
 option=$3
 
-cd "$vardir/methods/disk"
+cd "$vardir/methods/file"
 
 . ./shvar.$option
 
diff --git a/dselect/methods/file/names b/dselect/methods/file/names
new file mode 100644
index 000000000..3b36a4846
--- /dev/null
+++ b/dselect/methods/file/names
@@ -0,0 +1 @@
+42 file Install from a directory in the filesystem.
diff --git a/dselect/methods/disk/setup.sh b/dselect/methods/file/setup.sh
similarity index 99%
rename from dselect/methods/disk/setup.sh
rename to dselect/methods/file/setup.sh
index 9045539fe..b0a721df7 100755
--- a/dselect/methods/disk/setup.sh
+++ b/dselect/methods/file/setup.sh
@@ -18,7 +18,7 @@ vardir="$1"
 method=$2
 option=$3
 
-cd "$vardir/methods/disk"
+cd "$vardir/methods/file"
 tp="$(mktemp --tmpdir $method.XXXXXXXXXX)"
 
 iarch=$(dpkg --admindir $vardir --print-architecture)
diff --git a/dselect/methods/disk/update.sh b/dselect/methods/file/update.sh
similarity index 98%
rename from dselect/methods/disk/update.sh
rename to dselect/methods/file/update.sh
index 5b672de76..c0937cc94 100755
--- a/dselect/methods/disk/update.sh
+++ b/dselect/methods/file/update.sh
@@ -18,7 +18,7 @@ vardir="$1"
 method=$2
 option=$3
 
-cd "$vardir/methods/disk"
+cd "$vardir/methods/file"
 
 . ./shvar.$option
 

-- 
Dpkg.Org's dpkg

Reply via email to