#1145012 python3-towncrier has an undeclared file conflict

#1145012#5
Date:
2026-08-21 13:50:32 UTC
From:
To:
python3-towncrier has an undeclared file conflict.  This may result in
an unpack error from dpkg.

The files
 * /usr/lib/python3/dist-packages/towncrier/__init__.py
 * /usr/lib/python3/dist-packages/towncrier/__main__.py
 * /usr/lib/python3/dist-packages/towncrier/_builder.py
 * /usr/lib/python3/dist-packages/towncrier/_git.py
 * /usr/lib/python3/dist-packages/towncrier/_project.py
 * /usr/lib/python3/dist-packages/towncrier/_settings/__init__.py
 * /usr/lib/python3/dist-packages/towncrier/_settings/fragment_types.py
 * /usr/lib/python3/dist-packages/towncrier/_settings/load.py
 * /usr/lib/python3/dist-packages/towncrier/_shell.py
 * /usr/lib/python3/dist-packages/towncrier/_writer.py
 * /usr/lib/python3/dist-packages/towncrier/build.py
 * /usr/lib/python3/dist-packages/towncrier/check.py
 * /usr/lib/python3/dist-packages/towncrier/click_default_group.py
 * /usr/lib/python3/dist-packages/towncrier/create.py
 * /usr/lib/python3/dist-packages/towncrier/templates/default.md
 * /usr/lib/python3/dist-packages/towncrier/templates/default.rst
 * /usr/lib/python3/dist-packages/towncrier/templates/hr-between-versions.rst
 * /usr/lib/python3/dist-packages/towncrier/templates/single-file-no-bullets.rst
 * /usr/lib/python3/dist-packages/towncrier/test/__init__.py
 * /usr/lib/python3/dist-packages/towncrier/test/helpers.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_build.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_builder.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_check.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_create.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_format.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_git.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_project.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_settings.py
 * /usr/lib/python3/dist-packages/towncrier/test/test_write.py
are contained in the packages
 * python3-towncrier/25.8.0-2 as present in unstable
 * towncrier/24.8.0-2 as present in trixie|forky

These packages can be unpacked concurrently, because there is no
relevant Replaces or Conflicts relation.  Attempting to unpack these
packages concurrently results in an unpack error from dpkg, because none
of the packages installs a diversion for the affected files.

Kind regards

Helmut Grohne

#1145012#12
Date:
2026-08-22 01:59:19 UTC
From:
To:
Control: retitle -1 python3-towncrier: Undeclared file conflict with earlier 'towncrier' versions
Control: tags -1 + confirmed pending

This is because ‘python3-towncrier’ currently declares only a “Breaks”
relationship, which allows unpacking over the older ‘towncrier’ versions.
This relationship is incorrect.

The correction is to tighten the relationship to “Conflicts”, that signals
to ‘dpkg’ it must not unpack over the existing package. (As described in
Policy §7.4, “Conflicting binary packages - "Conflicts"”.)

That correction is now implemented, and will be part of the next package
release.

#1145012#21
Date:
2026-08-25 09:24:26 UTC
From:
To:
Please make sure that upload will be a source only upload, so the
fix for #1143428 can actually migrate.

Thanks,
Chris

#1145012#26
Date:
2026-08-22 05:46:20 UTC
From:
To:
Note that Conflicts rarely is the right solution. It imposes
restrictions on upgrades that cause trouble to dist-upgrades and should
best be avoided. In simple cases such as file moves (as is happening
here), the weaker form of a combination of Breaks and Replaces should be
used.

I observe that more and more people resort to declaring Conflicts in
response to my bug reports. Do you have an idea how I could improve the
reports or how we could improve the documentation (e.g. policy) to
better direct people towards Breaks+Replaces? My mail explicitly
mentions Replaces already.

Helmut

#1145012#31
Date:
2026-08-27 22:53:34 UTC
From:
To:
Thanks for asking how to improve this.

I think, if you want a better solution to become the norm, then we need to
make that better solution the *one obvious* solution that is found.

When a maintainer learns (through a bug report, or otherwise) that a
“Breaks: package (<= older-version)” is insufficient? That maintainer will
go looking in places like the Policy document.

That IMO means that the desired solution must be found right there, or
anywhere the maintainer is likely to go looking for a solution.

Currently, my quick reading of the Policy document led to the comparison of
“Breaks” versus “Conflicts”; that was apparently the most salient
difference, so that's what I reached for.

#1145012#36
Date:
2026-08-28 22:26:27 UTC
From:
To:
So, to more precisely answer your query (how you might more successfully
ask people to correct the binary package dependencies): the Policy section
to read is §7.6 “Overwriting files and replacing packages - "Replaces"”.

That section did not show up immediately when I went looking for the most
obvious fix. I think, if you want people to read it, you'll need to direct
them to Policy §7.6, specifically.

Thanks again, for giving attention to this and for seeking how to improve
effectiveness.

#1145012#41
Date:
2026-08-28 22:31:30 UTC
From:
To:
Thank you to Helmut G. for directing me to the better solution, described
in Policy §7.6: this should instead be a “Breaks” + “Replaces”
relationship.

    Package: python3-towncrier
    Breaks:
        towncrier (<= 24.8.0-2)
    Replaces:
        towncrier (<= 24.8.0-2)

In commit 6571efa52b54a98bba857689483e03b28c742f0a, this is now implemented
<URL: https://salsa.debian.org/bignose/pkg-towncrier/-/commit/6571efa52b54a98bba857689483e03b28c742f0a>
and will be part of the next release.

#1145012#46
Date:
2026-08-29 17:47:45 UTC
From:
To:
Hi Ben,

* Ben Finney <bignose@debian.org> [2026-08-29 08:31]:

Can you please upload this new release soonish?

Currently towncrier is marked for removal from testing on September 19.
and with it over 2000 other packages as can be seen on:

https://tracker.debian.org/pkg/towncrier

Also please make sure to upload only a source package without binary
packages so the package can migrate to testing.

Thanks!

Jochen

#1145012#51
Date:
2026-08-31 03:18:49 UTC
From:
To:
We believe that the bug you reported is fixed in the latest version of
towncrier, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1145012@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Finney <bignose@debian.org> (supplier of updated towncrier package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)
Format: 1.8
Date: Mon, 31 Aug 2026 10:05:49 +1000
Source: towncrier
Architecture: source
Version: 25.8.0-3
Distribution: unstable
Urgency: medium
Maintainer: Ben Finney <bignose@debian.org>
Changed-By: Ben Finney <bignose@debian.org>
Closes: 1145012
Changes:
 towncrier (25.8.0-3) unstable; urgency=medium
 .
   * debian/control:
     * Declare “Breaks” + “Replaces” relationship to avoid file conflicts.
       Closes: bug#1145012. Thanks to Helmut Grohne for the report.
Checksums-Sha1:
 7590802cddbb08d4800f3af5e75104d16a94456a 3231 towncrier_25.8.0-3.dsc
 454da3c69758d19af3c304c3af1e38e52fb3a6c5 16056 towncrier_25.8.0-3.debian.tar.xz
 aab9c54f9262be37d3c303c3874be2722796df5f 9402 towncrier_25.8.0-3_amd64.buildinfo
Checksums-Sha256:
 6d1e8beb522a4ed8820adfa57c6de34b07bd1182aead69f6d223b5e2625bd788 3231 towncrier_25.8.0-3.dsc
 e0a71e0f8b1d5a5b7abf91e2676f0938c6012be8e59303c306e882922df5f5a8 16056 towncrier_25.8.0-3.debian.tar.xz
 593aa982646fc0446bfd9640b51141de3b1a9aa9304d5eff8d24d28f275c2d95 9402 towncrier_25.8.0-3_amd64.buildinfo
Files:
 a87f7436eb054b6c8f3384e7d8e0cf99 3231 devel optional towncrier_25.8.0-3.dsc
 97aebb94b133fe85cb38720c54242cda 16056 devel optional towncrier_25.8.0-3.debian.tar.xz
 1703e0b56bfa8747d9a0283aaafb9afd 9402 devel optional towncrier_25.8.0-3_amd64.buildinfo
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEXfQ3Ydd+6BMR2Ur+B+hY8vqvVjgFAmqU7KkACgkQB+hY8vqv
Vjiltg/+Pgf/eD4ZY6LFp29rKQ0uRja204HG6gF9W6YOfcJTFg2LL6q0qUZqAPDh
WTL1ywh6pL6HrJmgkaHo+0BMMm1u0D8j68q4e7007V9c8p+FsFeFXWqDWj2wB7jv
OWPTaJhahQih/k0Aq+iOiRcdgMLaF5JRTw6o6mALSAzDrqTnpwY6bT+83CpuAFAs
5P5Ej3HSWGTUbacv2qoX8MsiZ1AShbVsf76CCvoShmGULvDBcUlqlU1MrRTmNt/h
u1pfMxrxeQs/L1fuEJms7zdEraVJNRz8T/LDFqJ3kV+vfZIjelna3vxS9ROKNnNX
wUZvSXH6sMOKRAXB7bLfC9eWDwkUvnmnnf6HDKBh+4qfPYpk6nRVzhWJB3/5wbcA
R7HlLxH0EAQ8G+n9tinOaPpgDubJjoWiGLgD9/iFV1vSEho+YI9TfmO+udyywO15
ChEIe2sNdc2KLE6vX2j2hfOh4OpRjTZj2PP4ogvFBOZAsoAjenCxmy1fnCRIzdjl
VUd4Aqsi6c4FPDLBzTyKtqCRIs2UkMrwp7IFl6/Y3S6m4GltY7LgNk3wT/3xdfUi
ZSACgfiwWtfG8TACi9tQHLh5KicfGYNnxumLZ5b4nkAvG95jXeW49NkA56iuT565
ICEUl4tpTqAfhnIpGDKBnxTnOPaisJIM7nf1ypXvLN7/qx0f9h8=
=rRFe
-----END PGP SIGNATURE-----