Move getting the Debian package version into a separate function and
fail in case it cannot find it or fails parsing it.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Commit ae74f71a1e9d4be043162b19d23f2d44c964c771 removed the flake8
unittest and commit 3428a65b1cd644445f55ad8ae65ece5f73d7acb5 added
running flake8 again, but only for files named `*.py`.
Check also all Python scripts with a Python shebang.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Versions like `0.176ubuntu20.04.1` in Ubuntu are clearly not compliant
with https://peps.python.org/pep-0440/. With setuptools 66, the versions
of all packages visible in the Python environment *must* obey PEP440.
Bug: https://launchpad.net/bugs/1991606
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
If I run "apt-get update" in the bullseye chroot, I get the following error:
Err:4 http://security.debian.org bullseye-updates Release
404 Not Found [IP: 2a04:4e42:600::644 80]
It looks like the directory path was changed since bullseye.
buster:
deb https://security.debian.org/debian-security buster/updates main
bullseye:
deb https://security.debian.org/debian-security bullseye-security main
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
Add debian_dist_ge(), which will be used by the next commit.
To avoid code duplication, move the common part to dist_ge().
Signed-off-by: Masahiro Yamada <masahiro.yamada@canonical.com>
As of lunar, Ubuntu sets NotAutomatic: yes for its -proposed pockets. For
sbuild chroots, we want to continue to explicitly install from -proposed by
default; so override with apt preferences to get the correct behavior.
Nowadays git is used nearly everywhere. Therefore demoting bzr/brz to
Suggest is the right thing to do.
Bug-Debian: https://bugs.debian.org/940531
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Use `--skip-patches` when extract source packages with `dpkg-source`.
`--no-preparation` is a source package build option and `--skip-patches`
is the correct extract option.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
sponsor-patch calls `debdiff` which exits with 1 if there are
differences. So accept exit codes 0 and 1 as expected.
Signed-off-by: Benjamin Drung <benjamin.drung@canonical.com>
Fix operation of SourcePackage._source_urls() (as used, for example, in
SourcePackage.pull() called by backportpackage) to also work when the
class is instantiated with a URL as .dsc.
This is a regression caused by 1b12d8b4e3315de3bf417b40a3c66279f309d72c
(first in v0.184) that moved from os.path.join() to Pathlib, but
os.path.join() was also used to join URLs.
Thanks: Unit 193 for the initial patch.
Signed-off-by: Mattia Rizzolo <mattia@debian.org>