fix(packages): read install_package's success from the exit status
install_package searched the output of `... || true` for words such as "failed", the pattern uninstall_package left behind for netork#267: a postinst that only mentions a failure read as a failed install, and a failure phrased without those words read as success. It now runs through _sudo_status like the removal and falls back to the keywords only when the channel gave no exit status. The ruff findings named in the issue are gone since the driver adopted the standard; strict mypy for linux.py is held by the quality ratchet, and the None-vs-dict package contract is NAPALM/napalm-device-types#36. Closes #4
This commit is contained in:
1 parent
a729b35d8b
commit
eaa08ae7e3
4 files changed
+70
-26
No files matched your search
@@ -48,6 +48,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
- `get_arp_table()` reports an unknown age as `-1.0` (napalm-device-types'
|
||||
`ARP_AGE_UNKNOWN`) instead of `0.0`, which means "confirmed just now": `ip neigh`
|
||||
has no age, and a STALE entry may be hours old (NetOrk/netork#1327).
|
||||
- `install_package()` reports success by the package manager's exit status, as
|
||||
`uninstall_package()` already does (#4). It used to search the output for words like
|
||||
"failed": an install whose postinst merely mentioned a failure read as failed, and a
|
||||
failure that used none of the words read as success.
|
||||
|
||||
## [0.15.1] - 2026-10-23
|
||||
|
||||
|
||||
Reference in new issue
Block a user