crashdb: make _duplicate_db_sync_status more readable
Coverity 2023.9.2 rule COV_PY_COPY_PASTE_ERROR_PYTHON complains about
`real_fixed_version` in `CrashDatabase.duplicate_db_fixed` looks like a
copy-paste error.
For the "crash got reopened" case, `real_fixed_version` is `None` and
therefore the call to `duplicate_db_fixed` sets the fixed version back
to 'still unfixed'. Make that code more readable by explicitly passing
`None` to `duplicate_db_fixed`.
Signed-off-by: Benjamin Drung <email address hidden>
Coverity 2023.9.2 rule COV_PY_FORWARD_NULL_PYTHON complains about
accessing a property of null-like value "cmd". Refactor the code to
satisfy Coverity.
Signed-off-by: Benjamin Drung <email address hidden>
The chunk size in `HTTPSProgressConnection.send` starts with 1024. The
chunk size is checked for being bigger than 1024 before increasing or
decreasing it. Therefore this condition will never met and the chunk
size will stay at 1024.
Only check for the chunk size to be bigger than 1024 before decreasing
it (not before increasing it).
I ran the integration tests locally, but `HTTPSProgressConnection` is
not covered by it:
apport: Ignore container crash reports from systemd-coredump
systemd-coredump stores crashes that happen inside a container on the
host in case it cannot forward the crash to the container. Apport cannot
do anything useful with these crash reports, because the information
about the crashed process does not contain the process number seen from
inside the container and because the crashed process is already gone
when Apport gets the crash from systemd-coredump.
So let Apport just ignore crash reports from systemd-coredump if the
crashes happened inside containers.
Importing `requests` uses about 10 MB of additional memory and costs
about 100 milliseconds. My personal motivation is more to push backwards
against the increasing size and complexity of the Ubuntu base system, or
alternatively, to reduce the number of projects that constitute critical
infrastructure for Linux.
`urllib.request` raises an exception for anything other than a 20x
by default (this is `urllib.request.HTTPErrorHandler`).
On /usr merged systems like Ubuntu 24.04 the udev rules are placed into
`/usr/lib/udev/rules.d` instead of `/lib/udev/rules.d`.
Determine the location of the udev directory from the pkg-config file
and fallback to the old location on failure. Install `pkg-config` in the
`system-installed` test.
Signed-off-by: Benjamin Drung <email address hidden>