summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2025-05-19 16:03:03 +0000
committerJulian Andres Klode <jak@debian.org>2025-05-19 16:03:03 +0000
commit50adb7b651317c22e7997991e07a6b78568337e1 (patch)
tree98f5486f31777d998f68d453488f52a67d31fa4f
parent49e0eec055c5feca1ff7289c0fc59306a3a67a3d (diff)
parente17f8916fd32228009293087a6fdc6d8c9c9db9f (diff)
Merge branch 'pu/dselect-method' into 'main'
Cleanup dselect method See merge request apt-team/apt!423
-rw-r--r--doc/guide.dbk1
-rw-r--r--doc/method.dbk1
-rw-r--r--doc/po/apt-doc.pot3
-rw-r--r--doc/po/de.po2
-rw-r--r--doc/po/es.po2
-rw-r--r--doc/po/fr.po3
-rw-r--r--doc/po/it.po2
-rw-r--r--doc/po/ja.po2
-rw-r--r--doc/po/nl.po2
-rw-r--r--doc/po/pl.po2
-rw-r--r--doc/po/pt.po2
-rw-r--r--doc/po/pt_BR.po1
-rw-r--r--dselect/desc.apt6
-rw-r--r--dselect/names2
-rwxr-xr-xdselect/setup71
-rwxr-xr-xdselect/update7
16 files changed, 65 insertions, 44 deletions
diff --git a/doc/guide.dbk b/doc/guide.dbk
index bb314fdd5..32674ca14 100644
--- a/doc/guide.dbk
+++ b/doc/guide.dbk
@@ -223,6 +223,7 @@ use packages on your CD-ROM before downloading from the Internet.
For example:
file:/mnt/debian,
+ https://deb.debian.org/debian,
http://deb.debian.org/debian,
diff --git a/doc/method.dbk b/doc/method.dbk
index 2ec1f3e3e..eb4ae407a 100644
--- a/doc/method.dbk
+++ b/doc/method.dbk
@@ -159,6 +159,7 @@ Some examples:
<screen>
file:/var/mirrors/debian/
ftp://ftp.example.org/debian
+https://deb.debian.org/debian
ftp://jgg:MooCow@localhost:21/debian
nfs://bigred/var/mirrors/debian
rsync://debian.midco.net/debian
diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot
index 5801149de..bc4fbbce0 100644
--- a/doc/po/apt-doc.pot
+++ b/doc/po/apt-doc.pot
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: apt-doc 3.0.1\n"
"Report-Msgid-Bugs-To: APT Development Team <deity@lists.debian.org>\n"
-"POT-Creation-Date: 2025-05-06 17:57+0200\n"
+"POT-Creation-Date: 2025-05-19 17:43+0200\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -9040,6 +9040,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/de.po b/doc/po/de.po
index e478dd2f0..2dd6d6a1b 100644
--- a/doc/po/de.po
+++ b/doc/po/de.po
@@ -12791,6 +12791,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12803,6 +12804,7 @@ msgstr ""
"\n"
" Zum Beispiel:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/es.po b/doc/po/es.po
index 4b01f2511..48d4b78e1 100644
--- a/doc/po/es.po
+++ b/doc/po/es.po
@@ -12082,6 +12082,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12094,6 +12095,7 @@ msgstr ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/fr.po b/doc/po/fr.po
index 0edf3c6ac..0e6b70114 100644
--- a/doc/po/fr.po
+++ b/doc/po/fr.po
@@ -12815,6 +12815,7 @@ msgstr ""
#| "\n"
#| " For example:\n"
#| " file:/mnt/debian,\n"
+#|" https://deb.debian.org/debian,\n"
#| " ftp://ftp.debian.org/debian,\n"
#| " http://ftp.de.debian.org/debian,\n"
#| "\n"
@@ -12828,6 +12829,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12841,6 +12843,7 @@ msgstr ""
" Exemple :\n"
" file:/mnt/debian,\n"
" ftp://ftp.debian.org/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://ftp.de.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/it.po b/doc/po/it.po
index 47271f4a6..3afd11924 100644
--- a/doc/po/it.po
+++ b/doc/po/it.po
@@ -12426,6 +12426,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12438,6 +12439,7 @@ msgstr ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/ja.po b/doc/po/ja.po
index 5845814a6..a8d861404 100644
--- a/doc/po/ja.po
+++ b/doc/po/ja.po
@@ -11924,6 +11924,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -11936,6 +11937,7 @@ msgstr ""
"\n"
" 例:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/nl.po b/doc/po/nl.po
index 67c3c32d5..0e69452ff 100644
--- a/doc/po/nl.po
+++ b/doc/po/nl.po
@@ -12932,6 +12932,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12944,6 +12945,7 @@ msgstr ""
"\n"
" Bijvoorbeeld:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/pl.po b/doc/po/pl.po
index 6a14d5b49..48d37fb2f 100644
--- a/doc/po/pl.po
+++ b/doc/po/pl.po
@@ -11273,6 +11273,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -11285,6 +11286,7 @@ msgstr ""
"\n"
" Przykłady:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://ftp.pl.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/pt.po b/doc/po/pt.po
index d77ff1a03..646366232 100644
--- a/doc/po/pt.po
+++ b/doc/po/pt.po
@@ -12629,6 +12629,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
@@ -12641,6 +12642,7 @@ msgstr ""
"\n"
" Por exemplo:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/doc/po/pt_BR.po b/doc/po/pt_BR.po
index e30868092..e7872b5c0 100644
--- a/doc/po/pt_BR.po
+++ b/doc/po/pt_BR.po
@@ -9401,6 +9401,7 @@ msgid ""
"\n"
" For example:\n"
" file:/mnt/debian,\n"
+" https://deb.debian.org/debian,\n"
" http://deb.debian.org/debian,\n"
"\n"
"\n"
diff --git a/dselect/desc.apt b/dselect/desc.apt
index 5601919ac..dac14253c 100644
--- a/dselect/desc.apt
+++ b/dselect/desc.apt
@@ -1,8 +1,8 @@
The APT installation method encompasses most other installation methods
under the umbrella of the new Package Acquisition code. This method allows
-installation from locations in the filesystem, ftp and http URLs, supports
-full installation ordering and dependency checking as well as multiple
-sources. See the man pages apt-get(8) and sources.list(5)
+installation from locations in the filesystem, https, http and ftp URLs,
+supports full installation ordering and dependency checking as well as
+multiple sources. See the man pages apt-get(8) and sources.list(5)
HTTP proxies can be used by setting http_proxy="http://proxy:port/" before
running DSelect. FTP proxies require special configuration detailed in
diff --git a/dselect/names b/dselect/names
index 8daa53782..58294c82d 100644
--- a/dselect/names
+++ b/dselect/names
@@ -1 +1 @@
-70 apt APT Acquisition [file,http,ftp]
+70 apt APT Acquisition [file,https,http,ftp]
diff --git a/dselect/setup b/dselect/setup
index 522362e68..aed7baa26 100755
--- a/dselect/setup
+++ b/dselect/setup
@@ -1,41 +1,39 @@
-#!/usr/bin/perl -w
-# -*- Mode: Perl -*-
-# setup.pl ---
-# Author : Manoj Srivastava ( srivasta@tiamat.datasync.com )
-# Created On : Wed Mar 4 15:11:47 1998
-# Created On Node : tiamat.datasync.com
-# Last Modified By : Manoj Srivastava
-# Last Modified On : Tue May 19 11:25:32 1998
-# Last Machine Used: tiamat.datasync.com
-# Update Count : 87
-# Status : Unknown, Use with caution!
-# HISTORY :
-# Description :
-# This file is designed to go into /usr/lib/apt/methods/setup
-#
+#!/usr/bin/perl
+# Copyright (c) 1998 Manoj Srivastava <srivasta@tiamat.datasync.com>
+#
+# SPDX-License-Identifier: GPL-2.0+
-#use strict;
+use strict;
+use warnings;
#use diagnostics;
#printf STDERR "DEBUG: Arguments $ARGV[0];$ARGV[1];$ARGV[2];\n";
+use Term::ANSIColor;
+
# Handle the arguments
my $vardir=$ARGV[0];
my $method=$ARGV[1];
my $option=$ARGV[2];
my $config_file = '/etc/apt/sources.list';
-my $boldon=`setterm -bold on`;
-my $boldoff=`setterm -bold off`;
+my $boldon = color('bold');
+my $boldoff = color('reset');
-my @known_types = ('deb');
-my @known_access = ('http', 'ftp', 'file');
-my @typical_distributions = ('stable', 'unstable', 'testing');
-my @typical_components = ('main', 'contrib', 'non-free', 'non-free-firmware');
+my @known_types = qw(deb);
+my @known_access = qw(https http ftp file);
+my @typical_distributions = qw(stable unstable testing);
+my @typical_components = qw(main contrib non-free non-free-firmware);
my %known_access = map {($_,$_)} @known_access;
my %typical_distributions = map {($_,$_)} @typical_distributions;
+sub print_bold {
+ my $msg = shift;
+
+ print "$boldon$msg$boldoff";
+}
+
# Read the config file, creating source records
sub read_config {
my %params = @_;
@@ -118,7 +116,7 @@ sub get_source {
}
$type = 'deb';
- $urn = "http://deb.debian.org/debian" unless $urn;
+ $urn = "https://deb.debian.org/debian" unless $urn;
$distribution = "stable" unless $distribution;
$components = "main contrib non-free non-free-firmware" unless $components;
@@ -130,7 +128,7 @@ sub get_source {
while (!$done) {
print "\n";
- print "$boldon URL [$urn]: $boldoff";
+ print_bold(" URL [$urn]: ");
$answer=<STDIN>;
chomp ($answer);
@@ -159,10 +157,10 @@ sub get_source {
print " Please give the distribution tag to get or a path to the\n";
print " package file ending in a /. The distribution\n";
- print " tags are typically something like:$boldon ";
- print join(' ', @typical_distributions), "$boldoff\n";
+ print " tags are typically something like: ";
+ print_bold(join(' ', @typical_distributions) . "\n");
print "\n";
- print "$boldon Distribution [$distribution]:$boldoff ";
+ print_bold(" Distribution [$distribution]: ");
$answer=<STDIN>;
chomp ($answer);
$answer =~ s/\s*//og;
@@ -193,10 +191,10 @@ sub get_components {
print "\n";
print " Please give the components to get\n";
- print " The components are typically something like:$boldon ";
- print join(' ', @typical_components), "$boldoff\n";
+ print " The components are typically something like: ";
+ print_bold(join(' ', @typical_components) . "\n");
print "\n";
- print "$boldon Components [$default]:$boldoff ";
+ print_bold(" Components [$default]: ");
$answer=<STDIN>;
chomp ($answer);
$answer =~ s/\s+/ /og;
@@ -219,12 +217,12 @@ sub get_sources {
@Oldconfig = &read_config('Filename' => $config_file)
}
- print "\t$boldon Set up a list of distribution source locations $boldoff \n";
+ print_bold("\t Set up a list of distribution source locations\n");
print "\n";
print " Please give the base URL of the debian distribution.\n";
- print " The access schemes I know about are:$boldon ";
- print join (' ', @known_access), "$boldoff\n";
+ print " The access schemes I know about are: ";
+ print_bold(join (' ', @known_access) . "\n");
# print " The mirror scheme is special that it does not specify the\n";
# print " location of a debian archive but specifies the location\n";
# print " of a list of mirrors to use to access the archive.\n";
@@ -232,6 +230,7 @@ sub get_sources {
print " For example:\n";
print " file:/mnt/debian,\n";
print " ftp://ftp.example.org/debian,\n";
+ print " https://deb.debian.org/debian,\n";
print " http://deb.debian.org/debian,\n";
# print " and the special mirror scheme,\n";
# print " mirror:http://www.debian.org/archivemirrors \n";
@@ -246,7 +245,7 @@ sub get_sources {
push (@Config, &get_source());
}
print "\n";
- print "$boldon Would you like to add another source?[y/N]$boldoff ";
+ print_bold(" Would you like to add another source? [y/N] ");
my $answer = <STDIN>;
chomp ($answer);
$answer =~ s/\s+/ /og;
@@ -265,11 +264,11 @@ sub main {
if (-e $config_file) {
my @Oldconfig = &read_config('Filename' => $config_file);
- print "$boldon I see you already have a source list.$boldoff\n";
+ print_bold(" I see you already have a source list.\n");
print "-" x 72, "\n";
&print_config('Config' => \@Oldconfig);
print "-" x 72, "\n";
- print "$boldon Do you wish to overwrite it? [y/N]$boldoff ";
+ print_bold(" Do you wish to overwrite it? [y/N] ");
my $answer = <STDIN>;
chomp ($answer);
$answer =~ s/\s+/ /og;
diff --git a/dselect/update b/dselect/update
index 0ab317ee4..057e26e65 100755
--- a/dselect/update
+++ b/dselect/update
@@ -28,10 +28,11 @@ STATUS=1
if $APTGET $OPTS "$APT_OPT0" "$APT_OPT1" update
then
echo $"Merging available information"
+ # XXX: Make sure we remove an old intermediate file that we used to feed
+ # to dpkg, until enough time has passed that we have some guarantee it
+ # is no longer left over in the cache directory (since apt 2.9.x).
rm -f $CACHEDIR/available
- $APTCACHE dumpavail > $CACHEDIR/available
- $DPKG "$DPKG_OPTS" --update-avail $CACHEDIR/available
- rm -f $CACHEDIR/available
+ $APTCACHE dumpavail | $DPKG "$DPKG_OPTS" --update-avail
case "$CLEAN" in
Pre-Auto|PreAuto|pre-auto)