Bug#1011937: python-debian: Please consider moving deb822 to a standalone distro-independent Python package

Jelmer Vernooij jelmer at debian.org
Fri May 27 11:09:29 BST 2022


On Fri, May 27, 2022 at 12:01:17PM +0200, Stephan Lachnit wrote:
> I'm not an expert on python-debian and I don't use other distros than
> Debian, so I can only forward you some bug reports from
> https://github.com/fsfe/reuse-tool/issues/466:
> - https://github.com/fsfe/reuse-tool/issues/311 (fixed now)
> - https://github.com/fsfe/reuse-tool/issues/425: `apt_pkg.Error:
> W:Unable to read /etc/apt/apt.conf.d/ - DirectoryExists (2: No such
> file or directory), E:Unable to determine a suitable packaging system
> type`
>   This one is probably tricky to solve, maybe python-debian can check
> if it is in a Debian env by checking /etc/os-release?
> 
> Ofc if python-debian would ensure cross-platform operability, that
> would be great, then there would be no need for a package split. I
> guess it depends a bit on the policy: is it tested on non-Debian
> platforms or just an afterthought where bugs get fixed when reported
> in version? If it is the latter, REUSE will probably still try to
> replace it. If it is the former, I think there is little reason to
> move away from python-debian. cc/ Max Mehl?

It looks like reuse doesn't juse use deb822, but the copyright module
as well - so just extracting deb822 would not be sufficient:

https://github.com/fsfe/reuse-tool/issues/454

> Looking quickly at the CI though, it does not seem that this is
> currently the case. Maybe you could add a `unit-tests-alpine` and
> `unit-tests-windows` job based on the official Python Docker images
> [1] (w/ dependencies pulled via pip)? IMHO this should give enough
> confidence in the cross-platform operability of this package (again
> cc/ Max Mehl, I'm not a developer of REUSE).

I'd prefer that avenue; we could potentially disable some of
the functionality on windows (e.g. stuff that relies on python3-apt,
which AFAIK is already optional).

>From what I can tell, the testsuite runs fine on other Linux platforms
- we haven't had many bugreports from packagers on those platforms.

I wouldn't be surprised if people came along in the future that e.g.
needed watch file parsing on Windows or copyright file parsing, and I
wouldn't want to have to split out all of those as separate modules as
well.

Cheers,

Jelmer


> On Fri, May 27, 2022 at 11:15 AM Jelmer Vernooij <jelmer at jelmer.uk> wrote:
> >
> > Hi Stephan,
> >
> > On Fri, May 27, 2022 at 10:05:47AM +0200, Stephan Lachnit wrote:
> > > I'm working on a project that aims to use REUSE [1] to automate the
> > > process of creating and maintaing the d/copyright file.
> > >
> > > tl;dr: REUSE is a specification to annote license and copyright holder
> > > in a machine-readable way in the source files itself. Since Debian has a
> > > similar per-file copyright concept, using information from source
> > > packages that follow this specification can in principle be automated to
> > > reduce the work maintainers have to do.
> > >
> > >
> > > For several reasons it would be nice to have a d/copyright parser at
> > > hand, and since python-debian provides this with the deb822 module, it
> > > would be unneccessary work to write this again. REUSE already uses
> > > python-debian for this, but wants to get rit of it because there are
> > > some issue with this module on non-Debian OSes [2].
> > >
> > >
> > > To come to the topic of this wishlist-bugreport: would it be possible to
> > > factor the deb822 parser out in a completetly separate Python package
> > > (on PyPi), e.g. python3-deb822, that explicitly does not depend on a
> > > Debian environment?
> >
> > What are the portability issues that exist in non-Debian environments? I'd
> > prefer to address those if possible rather than factoring out the deb822
> > module, since that complicates on an ongoing basis in the future.
> >
> > FWIW python-debian is packaged in other Linux distributions, so my guess
> > is that the issue is non-Linux rather than non-Debian environments?
> > https://repology.org/project/python:debian/versions
> >
> > Jelmer
> 
> -- 
> https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint



More information about the pkg-python-debian-maint mailing list