Your message dated Sat, 23 Oct 2021 10:10:45 +0200
with message-id <cbbc00ec-7233-9878-f749-a464ebfbf...@thykier.net>
and subject line Re: lintian-brush changes the ordering of fields within blocks 
of d.control
has caused the Debian Bug report #996966,
regarding RTS parser needlessly re-orders fields
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
996966: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=996966
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Source: lintian-brush
Version: 0.114
Severity: important
X-Debbugs-Cc: codeh...@debian.org

Dear Maintainer,

Debian Janitor proposed this change to python-envparse:

https://salsa.debian.org/python-team/packages/python-envparse/-/commit/9e543cc28d054301040e211033857f2a5e5d3265

When applied, Salsa CI failed and, thanfully, prevented the modified
package being uploaded. The change of ordering triggered a bug in
dh-python (filed separately) which caused an error in the maintainer
scripts such that the built package not only would not install but also
prevented installation of the previous version of that package or any
other package.

Setting up python3-envparse (0.2.0-3+salsaci) ...
dpkg-query: package 'python3-envparse' is not installed
Use dpkg --contents (= dpkg-deb --contents) to list archive files contents.
Traceback (most recent call last):
  File "/usr/bin/py3compile", line 319, in <module>
    main()
  File "/usr/bin/py3compile", line 298, in main
    compile(files, versions,
  File "/usr/bin/py3compile", line 183, in compile
    for fn, versions_to_compile in filter_files(files, e_patterns, versions):
  File "/usr/bin/py3compile", line 128, in filter_files
    for fpath in files:
  File "/usr/share/python3/debpython/files.py", line 71, in filter_public
    for fn in files:
  File "/usr/share/python3/debpython/files.py", line 53, in from_package
    raise Exception("cannot get content of %s" % package_name)
Exception: cannot get content of python3-envparse:amd64


The problem is that lintian-brush writes out the d.control block using
an *arbitary* ordering of fields within the block. Policy states that
the ordering of the *blocks* is significant but does not require any
specific ordering within the blocks. Convention, however, is that Source
is the first line in the first block and Package is the first line of
the subsequent blocks.

dh-python might not be the only tool in the archive which implements
code based on this convention.

It looks like lintian-brush is storing the fields of d.control in an
unordered type and then writing out the fields without respecting the
original order. Right or wrong, this is causing errors elsewhere.

The change itself happens as part of the cute-field support to fix the
case of field keys. This is a "pedantic" lintian flag, any fix for such
a flag must not break any package.

Changing the ordering of other fields (like Priority and Section) does
not appear to be a problem. However, most packages in the archive are
using an ordering that is set by the initial dh-make operation and
manual edits of d.control rarely change the ordering of fields.


-- System Information:
Debian Release: bookworm/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.14.0-1-amd64 (SMP w/2 CPU threads)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), 
LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

--- End Message ---
--- Begin Message ---
On Thu, 21 Oct 2021 10:35:25 +0100 Neil Williams <codeh...@debian.org>
wrote:
> Source: lintian-brush
> Version: 0.114
> Severity: important
> X-Debbugs-Cc: codeh...@debian.org
> 
> Dear Maintainer,
> 
> Debian Janitor proposed this change to python-envparse:
> 
> https://salsa.debian.org/python-team/packages/python-envparse/-/commit/9e543cc28d054301040e211033857f2a5e5d3265
> 
> When applied, Salsa CI failed and, thanfully, prevented the modified
> package being uploaded. The change of ordering triggered a bug in
> dh-python (filed separately) which caused an error in the maintainer
> scripts such that the built package not only would not install but also
> prevented installation of the previous version of that package or any
> other package.
> 
> [...]
> 
> The problem is that lintian-brush writes out the d.control block using
> an *arbitary* ordering of fields within the block. Policy states that
> the ordering of the *blocks* is significant but does not require any
> specific ordering within the blocks. Convention, however, is that Source
> is the first line in the first block and Package is the first line of
> the subsequent blocks.
> 
> dh-python might not be the only tool in the archive which implements
> code based on this convention.
> 
> It looks like lintian-brush is storing the fields of d.control in an
> unordered type and then writing out the fields without respecting the
> original order. Right or wrong, this is causing errors elsewhere.
> 
> The change itself happens as part of the cute-field support to fix the
> case of field keys. This is a "pedantic" lintian flag, any fix for such
> a flag must not break any package.
> 
> Changing the ordering of other fields (like Priority and Section) does
> not appear to be a problem. However, most packages in the archive are
> using an ordering that is set by the initial dh-make operation and
> manual edits of d.control rarely change the ordering of fields.
> 

Cloned to see if this problem was (still) visible in python-debian, but
I cannot reproduce it[1].  I presume the bug has been fixed already by
another commit.


@Jelmer: Please reopen this and provide a reproducer if you still see
this behaviour.

Thanks,
~Niels

[1]:
https://salsa.debian.org/python-debian-team/python-debian/-/merge_requests/73

--- End Message ---
-- 
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-python-debian-maint

Reply via email to