diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-02-24 19:25:21 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-04-07 09:40:15 +0000 |
| commit | f0c71b95ca00bae2b364c4b4858c51d84b002387 (patch) | |
| tree | 1a91836812c578f2919488fe2a88f74c31a1a5b6 | |
| parent | 9a97c0e647609da41a1df6574d98320e5e253988 (diff) | |
Drop warning about unstable CLI interface
A specific CLI version can now be requested using the --cli-version
flag, and old versions can be deprecated on a reasonable cadence.
Therefore, a warning is no longer necessary.
Gbp-Dch: full
| -rw-r--r-- | apt-private/private-main.cc | 19 | ||||
| -rw-r--r-- | apt-private/private-main.h | 1 | ||||
| -rw-r--r-- | cmdline/apt.cc | 1 | ||||
| -rw-r--r-- | test/integration/framework | 1 | ||||
| -rwxr-xr-x | test/integration/test-apt-cli-show | 5 | ||||
| -rwxr-xr-x | test/integration/test-bug-818628-unreadable-source | 1 |
6 files changed, 0 insertions, 28 deletions
diff --git a/apt-private/private-main.cc b/apt-private/private-main.cc index 1c34b8cd6..6e1d524ce 100644 --- a/apt-private/private-main.cc +++ b/apt-private/private-main.cc @@ -75,22 +75,3 @@ void CheckIfSimulateMode(CommandLine &CmdL) /*{{{*/ } } /*}}}*/ -void CheckIfCalledByScript(int argc, const char *argv[]) /*{{{*/ -{ - if (unlikely(argc < 1)) return; - - if (not IsStdoutAtty() && - not _config->Exists("APT::Version") && - not _config->FindB("Apt::Cmd::Disable-Script-Warning", false)) - { - // NOTE: CLI interface is redundant on the I/interface, this is - // intentional to make it easier to read. - std::cerr << std::endl - << "WARNING: " << flNotDir(argv[0]) << " " - << "does not have a stable CLI interface. " - << "Use with caution in scripts." - << std::endl - << std::endl; - } -} - /*}}}*/ diff --git a/apt-private/private-main.h b/apt-private/private-main.h index 4dcb2716a..4f91cf060 100644 --- a/apt-private/private-main.h +++ b/apt-private/private-main.h @@ -10,6 +10,5 @@ class CommandLine; void InitLocale(APT_CMD const binary); APT_PUBLIC void InitSignals(); APT_PUBLIC void CheckIfSimulateMode(CommandLine &CmdL); -APT_PUBLIC void CheckIfCalledByScript(int argc, const char *argv[]); #endif diff --git a/cmdline/apt.cc b/cmdline/apt.cc index 4a0708db8..11a14b13e 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -142,7 +142,6 @@ int main(int argc, const char *argv[]) /*{{{*/ InitSignals(); InitOutput(); - CheckIfCalledByScript(argc, argv); CheckIfSimulateMode(CmdL); return DispatchCommandLine(CmdL, Cmds); diff --git a/test/integration/framework b/test/integration/framework index 7780ef835..88a0bab7b 100644 --- a/test/integration/framework +++ b/test/integration/framework @@ -573,7 +573,6 @@ EOF chown _apt:$(id -gn) "${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem" fi echo "Acquire::https::CaInfo \"${TMPWORKINGDIRECTORY}/rootdir/etc/webserver.pem\";" > rootdir/etc/apt/apt.conf.d/99https - echo "Apt::Cmd::Disable-Script-Warning \"1\";" > rootdir/etc/apt/apt.conf.d/apt-binary export APT_KEY_DONT_WARN_ON_DANGEROUS_USAGE=no echo 'Acquire::Connect::AddrConfig "false";' > rootdir/etc/apt/apt.conf.d/connect-addrconfig # Allow release files to be 10 hours in the future, rather than 10 seconds diff --git a/test/integration/test-apt-cli-show b/test/integration/test-apt-cli-show index 8f9aa036f..c7a0983bd 100755 --- a/test/integration/test-apt-cli-show +++ b/test/integration/test-apt-cli-show @@ -196,11 +196,6 @@ Description: Some description That has multiple lines " apt info multi -a -# this is the default, but disabled by the testcases -testsuccess apt show foo -o Apt::Cmd::Disable-Script-Warning=0 -cp rootdir/tmp/testsuccess.output aptshow.output -testsuccess grep '^WARNING: ' aptshow.output - if [ "$(id -u)" != '0' ]; then testsuccess apt install foo -s -o APT::Get::Show-User-Simulation-Note=1 cp rootdir/tmp/testsuccess.output aptshow.output diff --git a/test/integration/test-bug-818628-unreadable-source b/test/integration/test-bug-818628-unreadable-source index e7ad26d04..2d942f3fe 100755 --- a/test/integration/test-bug-818628-unreadable-source +++ b/test/integration/test-bug-818628-unreadable-source @@ -56,7 +56,6 @@ N: There is 1 additional record. Please use the '-a' switch to see it}" testwarningmsg "$ERR" aptmark manual foo testwarningmsg "$ERR" aptmark auto foo } -echo 'Apt::Cmd::Disable-Script-Warning "true";' >> aptconfig.conf msgmsg 'Unreadable one-line-style sources file' chmod -r rootdir/etc/apt/sources.list.d/apt-test-unstable-deb-src.list |
