One bad apt source line (two Signed-By for one repository) makes apt refuse every source. The update read then failed with only "apt list --upgradable failed with exit status 100", because APT_UPGRADABLE_COMMAND threw stderr away.
APT_UPGRADABLE_COMMAND passes apt's E: lines on, marked __APT_E: (stdout goes around the pipe on fd 3, plain sh); apt's warnings stay out as before.
parse_apt_upgradable raises the new PackageSourcesUnreadable (a ValueError, so existing except ValueError callers such as napalm-proxmox keep working) with apt's errors when apt says "The list of sources could not be read.", and names apt's errors after the exit status for any other failure.
4.57.0, CHANGELOG.
Tests: parser cases plus one that runs the real command in sh against a conflicting sources dir (APT_CONFIG). Full suite 2349 passed; napalm-linux (481) and napalm-proxmox (806) pass against it.
For NetOrk/netork#3087.
One bad apt source line (two `Signed-By` for one repository) makes apt refuse **every** source. The update read then failed with only "apt list --upgradable failed with exit status 100", because `APT_UPGRADABLE_COMMAND` threw stderr away.
- `APT_UPGRADABLE_COMMAND` passes apt's `E:` lines on, marked `__APT_E:` (stdout goes around the pipe on fd 3, plain `sh`); apt's warnings stay out as before.
- `parse_apt_upgradable` raises the new `PackageSourcesUnreadable` (a `ValueError`, so existing `except ValueError` callers such as napalm-proxmox keep working) with apt's errors when apt says "The list of sources could not be read.", and names apt's errors after the exit status for any other failure.
- 4.57.0, CHANGELOG.
Tests: parser cases plus one that runs the real command in `sh` against a conflicting sources dir (`APT_CONFIG`). Full suite 2349 passed; napalm-linux (481) and napalm-proxmox (806) pass against it.
One bad apt source line, two Signed-By for one repository, makes apt refuse
every source. The update read then failed with "exit status 100" and nothing
else, because APT_UPGRADABLE_COMMAND threw stderr away.
The command now passes apt's E: lines on, marked __APT_E:, and still keeps
its warnings out. parse_apt_upgradable raises PackageSourcesUnreadable, a
ValueError, with apt's errors when apt could not read its sources, and names
them after the exit status for any other failure.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
For NetOrk/netork#3087.
One bad apt source line (two
Signed-Byfor one repository) makes apt refuse every source. The update read then failed with only "apt list --upgradable failed with exit status 100", becauseAPT_UPGRADABLE_COMMANDthrew stderr away.APT_UPGRADABLE_COMMANDpasses apt'sE:lines on, marked__APT_E:(stdout goes around the pipe on fd 3, plainsh); apt's warnings stay out as before.parse_apt_upgradableraises the newPackageSourcesUnreadable(aValueError, so existingexcept ValueErrorcallers such as napalm-proxmox keep working) with apt's errors when apt says "The list of sources could not be read.", and names apt's errors after the exit status for any other failure.Tests: parser cases plus one that runs the real command in
shagainst a conflicting sources dir (APT_CONFIG). Full suite 2349 passed; napalm-linux (481) and napalm-proxmox (806) pass against it.