From fc3834a9e0d850411b7ae92e7b15a09f0a299b99 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 13 Feb 2019 13:25:55 +0100 Subject: update: Provide APT::Update-Post-Invoke-Stats script hook point This is run after an update has been run and only if status on the new cache has been shown, allowing scripts to display their own status messages. LP: #1815760 --- apt-private/private-update.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/apt-private/private-update.cc b/apt-private/private-update.cc index c9113ddd3..4d9d0775d 100644 --- a/apt-private/private-update.cc +++ b/apt-private/private-update.cc @@ -138,6 +138,8 @@ bool DoUpdate(CommandLine &CmdL) c1out << _("All packages are up to date.") << std::endl; else ioprintf(c1out, msg, upgradable); + + RunScripts("APT::Update-Post-Invoke-Stats"); } return true; -- cgit v1.2.3 From 3f3cad74c2abbe3837fa98030c703dd4f5f191dc Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Wed, 13 Feb 2019 14:02:12 +0100 Subject: Introduce APT::Install::Pre-Invoke / Post-Invoke-Success These will run in our frontends currently, and can show messages. For the sake of keeping the implementation complexity low, a non-success variant of Post-Invoke is not provided. LP: #1815761 --- apt-private/private-install.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/apt-private/private-install.cc b/apt-private/private-install.cc index 243b75b1c..40543d995 100644 --- a/apt-private/private-install.cc +++ b/apt-private/private-install.cc @@ -103,6 +103,8 @@ static void RemoveDownloadNeedingItemsFromFetcher(pkgAcquire &Fetcher, bool &Tra } bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) { + if (not RunScripts("APT::Install::Pre-Invoke")) + return false; if (_config->FindB("APT::Get::Purge", false) == true) for (pkgCache::PkgIterator I = Cache->PkgBegin(); I.end() == false; ++I) if (Cache[I].Delete() == true && Cache[I].Purge() == false) @@ -178,7 +180,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) if (Cache->DelCount() == 0 && Cache->InstCount() == 0 && Cache->BadCount() == 0) - return true; + return RunScripts("APT::Install::Post-Invoke-Success"); // No remove flag if (Cache->DelCount() != 0 && _config->FindB("APT::Get::Remove",true) == false) @@ -392,6 +394,9 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask, bool Safety) } } + if (not RunScripts("APT::Install::Post-Invoke-Success")) + return false; + return true; } /*}}}*/ -- cgit v1.2.3 From c3005277c395c7bcb81f470e3e0466e2fd3ab38e Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Tue, 26 Feb 2019 08:32:11 +0100 Subject: Release 1.8.0~rc4 --- CMakeLists.txt | 2 +- debian/changelog | 8 ++++++++ doc/apt-verbatim.ent | 2 +- doc/po/apt-doc.pot | 4 ++-- po/apt-all.pot | 4 ++-- 5 files changed, 14 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f1a09ca68..ac825d2bc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -188,7 +188,7 @@ check_cxx_target(HAVE_FMV_SSE42_AND_CRC32DI "sse4.2" "__builtin_ia32_crc32di(0, # Configure some variables like package, version and architecture. set(PACKAGE ${PROJECT_NAME}) set(PACKAGE_MAIL "APT Development Team ") -set(PACKAGE_VERSION "1.8.0~rc3") +set(PACKAGE_VERSION "1.8.0~rc4") if (NOT DEFINED DPKG_DATADIR) execute_process(COMMAND ${PERL_EXECUTABLE} -MDpkg -e "print $Dpkg::DATADIR;" diff --git a/debian/changelog b/debian/changelog index f223349ee..2fe29954b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +apt (1.8.0~rc4) unstable; urgency=medium + + * update: Provide APT::Update-Post-Invoke-Stats script hook point + (LP: #1815760) + * Introduce APT::Install::Pre-Invoke / Post-Invoke-Success (LP: #1815761) + + -- Julian Andres Klode Tue, 26 Feb 2019 08:32:01 +0100 + apt (1.8.0~rc3) unstable; urgency=medium [ Julian Andres Klode ] diff --git a/doc/apt-verbatim.ent b/doc/apt-verbatim.ent index 55c463e1d..563a1b7f3 100644 --- a/doc/apt-verbatim.ent +++ b/doc/apt-verbatim.ent @@ -268,7 +268,7 @@ "> - + diff --git a/doc/po/apt-doc.pot b/doc/po/apt-doc.pot index 2b26b0010..f34f3ffac 100644 --- a/doc/po/apt-doc.pot +++ b/doc/po/apt-doc.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt-doc 1.8.0~rc3\n" +"Project-Id-Version: apt-doc 1.8.0~rc4\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2019-02-11 09:34+0100\n" +"POT-Creation-Date: 2019-02-26 08:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git a/po/apt-all.pot b/po/apt-all.pot index 2874fc454..49f025550 100644 --- a/po/apt-all.pot +++ b/po/apt-all.pot @@ -5,9 +5,9 @@ #, fuzzy msgid "" msgstr "" -"Project-Id-Version: apt 1.8.0~rc3\n" +"Project-Id-Version: apt 1.8.0~rc4\n" "Report-Msgid-Bugs-To: APT Development Team \n" -"POT-Creation-Date: 2019-02-11 09:34+0100\n" +"POT-Creation-Date: 2019-02-26 08:33+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" -- cgit v1.2.3