This bug was fixed in the package apt - 1.7.4 --------------- apt (1.7.4) cosmic; urgency=medium
* Fix name of APT::Update::Post-Invoke-Stats (was ...Update-Post...) * CMake: Install auth.conf.d directory (LP: #1818996) * Merge translations from 1.8.0 apt (1.7.3) cosmic; urgency=medium [ Michael Vogt ] * private-json-hooks.cc: deal with EPIPE (LP: #1814543) [ Julian Andres Klode ] * Introduce experimental 'never' pinning for sources (LP: #1814727) * Add a Packages-Require-Authorization Release file field (LP: #1814727) * doc: Set ubuntu-codename to cosmic (LP: #1812696) * 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 <juli...@ubuntu.com> Mon, 11 Mar 2019 10:31:46 +0100 ** Changed in: apt (Ubuntu Cosmic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Touch seeded packages, which is subscribed to apt in Ubuntu. https://bugs.launchpad.net/bugs/1814543 Title: deal with EPIPE from json hooks Status in apt package in Ubuntu: Fix Released Status in apt source package in Bionic: Fix Committed Status in apt source package in Cosmic: Fix Released Status in apt source package in Disco: Fix Released Bug description: [Impact] json hooks ending with EPIPE on first read fail, but should simply do nothing. This causes spurious failures of uninstalled hooks. Also, there is a missing error exit, causing errors reported by the script to not exit. [Test case] For the first part, I cannot generate one. This was discovered by snapd ci, but I did not find a reproducer yet. FWIW, the change should be tiny enough to see that it is not wrong: - if (errno != ECONNRESET) + if (errno != ECONNRESET && errno != EPIPE) _error->Error("Could not read response to hello message from hook %s: %s", Opts->Value.c_str(), strerror(errno)); The missing error handling is the next lines: else if (strstr(line, "error") != nullptr) { _error->Error("Hook %s reported an error during hello: %s", Opts->Value.c_str(), line); + goto out; } that can be checked: sudo apt -o AptCli::Hooks::Install::="/usr/bin/printf '{error should be json}\n\n' >&3" install [Regression potential] JSON hooks failures with EPIPE are now ignored, so if it fails with EPIPE for other reasons than just exiting, I guess we might miss it To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/1814543/+subscriptions -- Mailing list: https://launchpad.net/~touch-packages Post to : touch-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~touch-packages More help : https://help.launchpad.net/ListHelp