summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2019-01-22 10:54:07 +0000
committerJulian Andres Klode <jak@debian.org>2019-01-22 10:54:07 +0000
commit01c57d7235e9013a977646cbee73af43cbc1048b (patch)
tree20c6953585a1c55472b6bf73197dc0bf48b4d35e /apt-private
parent1351fb372ae01453166682e8e12484b2e02c759b (diff)
parentbe7eb047e1202971f84bb4ac27e796d85bebdce9 (diff)
Merge branch 'pu/minimize-manual' into 'master'
apt-mark minimize-manual See merge request apt-team/apt!39
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/private-cmndline.cc11
-rw-r--r--apt-private/private-output.h4
2 files changed, 11 insertions, 4 deletions
diff --git a/apt-private/private-cmndline.cc b/apt-private/private-cmndline.cc
index 101e0ae40..87deb6bf0 100644
--- a/apt-private/private-cmndline.cc
+++ b/apt-private/private-cmndline.cc
@@ -287,7 +287,7 @@ static bool addArgumentsAPTMark(std::vector<CommandLine::Args> &Args, char const
{
if (CmdMatches("auto", "manual", "hold", "unhold", "showauto",
"showmanual", "showhold", "showholds",
- "markauto", "unmarkauto"))
+ "markauto", "unmarkauto", "minimize-manual"))
{
addArg('f',"file","Dir::State::extended_states",CommandLine::HasArg);
}
@@ -303,7 +303,14 @@ static bool addArgumentsAPTMark(std::vector<CommandLine::Args> &Args, char const
addArg('v',"verbose","APT::MarkAuto::Verbose",0);
}
- if (Cmd != nullptr && strncmp(Cmd, "show", strlen("show")) != 0)
+ if (CmdMatches("minimize-manual"))
+ {
+ addArg('y',"yes","APT::Get::Assume-Yes",0);
+ addArg('y',"assume-yes","APT::Get::Assume-Yes",0);
+ addArg(0,"assume-no","APT::Get::Assume-No",0);
+ }
+
+ if (CmdMatches("minimize-manual") || (Cmd != nullptr && strncmp(Cmd, "show", strlen("show")) != 0))
{
addArg('s',"simulate","APT::Mark::Simulate",0);
addArg('s',"just-print","APT::Mark::Simulate",0);
diff --git a/apt-private/private-output.h b/apt-private/private-output.h
index 1ac861328..c20cc9e17 100644
--- a/apt-private/private-output.h
+++ b/apt-private/private-output.h
@@ -101,11 +101,11 @@ bool ShowEssential(std::ostream &out,CacheFile &Cache);
void Stats(std::ostream &out, pkgDepCache &Dep);
// prompting
-bool YnPrompt(char const * const Question, bool Default=true);
+APT_PUBLIC bool YnPrompt(char const *const Question, bool Default = true);
bool YnPrompt(char const * const Question, bool const Default, bool const ShowGlobalErrors, std::ostream &c1o, std::ostream &c2o);
bool AnalPrompt(std::string const &Question, const char *Text);
-std::string PrettyFullName(pkgCache::PkgIterator const &Pkg);
+APT_PUBLIC std::string PrettyFullName(pkgCache::PkgIterator const &Pkg);
std::string CandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);
std::function<std::string(pkgCache::PkgIterator const &)> CandidateVersion(pkgCacheFile * const Cache);
std::string CurrentToCandidateVersion(pkgCacheFile * const Cache, pkgCache::PkgIterator const &Pkg);