deal with EPIPE from json hooks
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
apt (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Cosmic |
Fix Released
|
Undecided
|
Unassigned | ||
Disco |
Fix Released
|
Undecided
|
Unassigned |
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)
The missing error handling is the next lines:
else if (strstr(line, "error") != nullptr)
{
+ goto out;
}
that can be checked:
sudo apt -o AptCli:
[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
description: | updated |
description: | updated |
Changed in apt (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in apt (Ubuntu Cosmic): | |
status: | New → In Progress |
This bug was fixed in the package apt - 1.8.0~rc2
---------------
apt (1.8.0~rc2) unstable; urgency=medium
* Bump SONAMEs in preparation for ABI breaks
* Correctly handle feature detection for sse4.2 and crc32
-- Julian Andres Klode <email address hidden> Mon, 04 Feb 2019 18:15:07 +0100