From f0c71b95ca00bae2b364c4b4858c51d84b002387 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 24 Feb 2026 19:25:21 +0100 Subject: 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 --- apt-private/private-main.cc | 19 ------------------- apt-private/private-main.h | 1 - 2 files changed, 20 deletions(-) (limited to 'apt-private') 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 -- cgit v1.2.3-70-g09d2