Control: tags -1 + patch

On Thu, 05 Mar 2026 23:48:16 +0000 Santiago Vila <[email protected]> wrote:
> Package: src:devscripts
> Version: 2.26.5
> Severity: serious
> Tags: ftbfs forky sid
>
> Dear maintainer:
>
> During a rebuild of all packages in unstable, this package failed to build.
...
> testRepackZST2XZRepackOpt
>  [1;31mASSERT: [0mstandard output of LC_ALL=C debuild --no-conf --no-lintian 
> --preserve-envvar=PATH --preserve-envvar=PERL5LIB 
> --preserve-envvar=DEBFULLNAME --preserve-envvar=DEBEMAIL 
> --preserve-envvar=GNUPGHOME --set-envvar=NO_PKG_MANGLE=1 -k'uscan test key 
> (no secret) <[email protected]>' matches 
> /<<PKGBUILDDIR>>/test/package_lifecycle/debuild.txt
> expected:<0> but was:<1>
> 12,14c12,14

Hi,

This particular problem may have been a temporary issue with the build
system, but seems we have another problem causing FTBFS. Last Friday I
tried to reproce this and got the same failure in a just upgraded
cowbuilder box, Tried a couple of days later in a newly just upgraded
cowbuilder box and got a different error, after also upgrading
devscripts from salsa (I had an intermediate error about french
translations which was fixed in upstream git repo).

python3.14 -m unittest discover devscripts
F......................
======================================================================
FAIL: test_black (test.test_black.BlackTestCase.test_black)
Test: Run black code formatter on Python source code.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/devscripts-2.26.6/scripts/devscripts/test/test_black.py",
line 43, in test_black
    self.fail(
    ~~~~~~~~~^
        f"black found code that needs reformatting:\n{process.stdout.strip()}"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: black found code that needs reformatting:

+ some detailed diffs about what is expected to change (see attached
file python-black.txt for more details).

I have applied those changes and with attached patch package builds
and passes tests.

Hope this helps,

-- 
Agustin
python3.14 -m unittest discover devscripts
F......................
======================================================================
FAIL: test_black (test.test_black.BlackTestCase.test_black)
Test: Run black code formatter on Python source code.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/build/devscripts-2.26.6/scripts/devscripts/test/test_black.py", line 
43, in test_black
    self.fail(
    ~~~~~~~~~^
        f"black found code that needs reformatting:\n{process.stdout.strip()}"
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    )
    ^
AssertionError: black found code that needs reformatting:
--- /build/devscripts-2.26.6/scripts/devscripts/test/test_control.py    
2026-01-18 11:54:35+00:00
+++ /build/devscripts-2.26.6/scripts/devscripts/test/test_control.py    
2026-03-08 23:02:44.320102+00:00
@@ -11,10 +11,11 @@
 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 """test_control.py - Run unit tests for the Control module"""
+
 import textwrap
 
 try:
     from debian._deb822_repro.formatter import (
         COMMA_SEPARATOR_FT,
@@ -56,12 +57,11 @@
 
 
 class ControlTestCase(unittest.TestCase):
     @unittest.skipIf(not HAS_RTS_PARSER, "Requires a newer version of 
python-debian")
     def test_rts_parsing(self):
-        orig_content = _dedent(
-            """\
+        orig_content = _dedent("""\
             Source: devscripts   ¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:  ¶
             Build-Depends: foo, ¶
             # We need bar (>= 1.2~) because of reason ¶
@@ -86,17 +86,15 @@
             # This should be the second one with -kb and the first with -b¶
             Package: a-pkg¶
             Architecture: any¶
             ¶
             ¶
-            """
-        )
+            """)
 
         # "No change" here being just immediately dumping the content again.  
This will
         # only prune empty lines (we do not preserve these in wrap-and-sort).
-        no_change_dump_content = _dedent(
-            """\
+        no_change_dump_content = _dedent("""\
             Source: devscripts   ¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:  ¶
             Build-Depends: foo, ¶
             # We need bar (>= 1.2~) because of reason ¶
@@ -115,15 +113,13 @@
             # Random comment here¶
             ¶
             # This should be the second one with -kb and the first with -b¶
             Package: a-pkg¶
             Architecture: any¶
-            """
-        )
-
-        last_paragraph_swap_no_trailing_space = _dedent(
-            """\
+            """)
+
+        last_paragraph_swap_no_trailing_space = _dedent("""\
             Source: devscripts¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:¶
             Build-Depends: foo,¶
             # We need bar (>= 1.2~) because of reason¶
@@ -142,12 +138,11 @@
             # Random comment here¶
             ¶
             # This should be the "last" package after sorting¶
             Package: z-pkg¶
             Architecture: any¶
-            """
-        )
+            """)
 
         control = Control(
             "debian/control", fd=orig_content.splitlines(True), 
use_rts_parser=True
         )
         self.assertEqual(control.dump(), no_change_dump_content)
@@ -213,68 +208,58 @@
         )
         actual = format_field(
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, 
tokens_without_comment
         )
         # Without comments, format this as one line
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends: foo, bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # With comments, we degenerate into "wrap_always" mode (for simplicity)
         actual = format_field(
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, tokens_with_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
              foo,
             # some comment about bar
              bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Starting with a comment should also work
         actual = format_field(
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, 
tokens_starting_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
             # some comment about foo
              foo,
              bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Without trailing comma
         actual = format_field(
             formatter_sl, "Depends", COMMA_SEPARATOR_FT, tokens_without_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends: foo, bar
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Triggering a wrap
         actual = format_field(
             formatter_sl, "Depends", COMMA_SEPARATOR_FT, 
tokens_very_long_content
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
              foo,
              bar,
              some-very-long-token,
              this-should-trigger-a-wrap,
              with line length 20,
              and (also) show we do not mash up spaces,
              inside value tokens
-            """
-        )
-        self.assertEqual(actual, expected)
+            """)
+        self.assertEqual(actual, expected)
--- /build/devscripts-2.26.6/scripts/devscripts/control.py      2026-01-18 
11:54:35+00:00
+++ /build/devscripts-2.26.6/scripts/devscripts/control.py      2026-03-08 
23:02:44.330998+00:00
@@ -13,10 +13,11 @@
 # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
 # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 """This module implements facilities to deal with Debian control."""
+
 import contextlib
 import os
 import sys
 
 from devscripts.logger import Logger
--- deb-janitor 2026-01-18 11:54:35+00:00
+++ deb-janitor 2026-03-08 23:02:44.464501+00:00
@@ -273,11 +273,11 @@
 
     if args.subcommand == "schedule":
         if args.source is None:
             args.source = _get_local_source()
         try:
-            (est_duration, pos, wait_time) = schedule(
+            est_duration, pos, wait_time = schedule(
                 args.source, args.campaign, api_url=args.api_url
             )
         except NoSuchSource as err:
             logging.fatal("%s", err.args[0])
             return 1

----------------------------------------------------------------------
Ran 23 tests in 8.179s

FAILED (failures=1)
make[3]: *** [Makefile:118: test_py] Error 1
make[3]: Leaving directory '/build/devscripts-2.26.6/scripts'
From 91176e87a665adb86ac491d4c6a779eb9ee5fa6d Mon Sep 17 00:00:00 2001
From: Agustin Martin Domingo <[email protected]>
Date: Mon, 9 Mar 2026 10:38:44 +0100
Subject: [PATCH] Fix some formatting errors pointed out by python black code
 formatter.

Closes: #1129869
---
 scripts/deb-janitor                     |  2 +-
 scripts/devscripts/control.py           |  1 +
 scripts/devscripts/test/test_control.py | 49 +++++++++----------------
 3 files changed, 19 insertions(+), 33 deletions(-)

diff --git a/scripts/deb-janitor b/scripts/deb-janitor
index 77a9c6a8..cdaacea2 100755
--- a/scripts/deb-janitor
+++ b/scripts/deb-janitor
@@ -275,7 +275,7 @@ def main(argv):  # pylint: disable=R0911,R0912,R0915
         if args.source is None:
             args.source = _get_local_source()
         try:
-            (est_duration, pos, wait_time) = schedule(
+            est_duration, pos, wait_time = schedule(
                 args.source, args.campaign, api_url=args.api_url
             )
         except NoSuchSource as err:
diff --git a/scripts/devscripts/control.py b/scripts/devscripts/control.py
index 56c8c0cc..9b91cad0 100644
--- a/scripts/devscripts/control.py
+++ b/scripts/devscripts/control.py
@@ -15,6 +15,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 """This module implements facilities to deal with Debian control."""
+
 import contextlib
 import os
 import sys
diff --git a/scripts/devscripts/test/test_control.py b/scripts/devscripts/test/test_control.py
index cb6aa0b6..e7c30c9f 100644
--- a/scripts/devscripts/test/test_control.py
+++ b/scripts/devscripts/test/test_control.py
@@ -13,6 +13,7 @@
 # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 """test_control.py - Run unit tests for the Control module"""
+
 import textwrap
 
 try:
@@ -58,8 +59,7 @@ def _prune_trailing_whitespace(text):
 class ControlTestCase(unittest.TestCase):
     @unittest.skipIf(not HAS_RTS_PARSER, "Requires a newer version of python-debian")
     def test_rts_parsing(self):
-        orig_content = _dedent(
-            """\
+        orig_content = _dedent("""\
             Source: devscripts   ¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:  ¶
@@ -88,13 +88,11 @@ class ControlTestCase(unittest.TestCase):
             Architecture: any¶
             ¶
             ¶
-            """
-        )
+            """)
 
         # "No change" here being just immediately dumping the content again.  This will
         # only prune empty lines (we do not preserve these in wrap-and-sort).
-        no_change_dump_content = _dedent(
-            """\
+        no_change_dump_content = _dedent("""\
             Source: devscripts   ¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:  ¶
@@ -117,11 +115,9 @@ class ControlTestCase(unittest.TestCase):
             # This should be the second one with -kb and the first with -b¶
             Package: a-pkg¶
             Architecture: any¶
-            """
-        )
+            """)
 
-        last_paragraph_swap_no_trailing_space = _dedent(
-            """\
+        last_paragraph_swap_no_trailing_space = _dedent("""\
             Source: devscripts¶
             Maintainer: Jane Doe <[email protected]>¶
             # Some comment about Build-Depends:¶
@@ -144,8 +140,7 @@ class ControlTestCase(unittest.TestCase):
             # This should be the "last" package after sorting¶
             Package: z-pkg¶
             Architecture: any¶
-            """
-        )
+            """)
 
         control = Control(
             "debian/control", fd=orig_content.splitlines(True), use_rts_parser=True
@@ -215,58 +210,49 @@ class ControlTestCase(unittest.TestCase):
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, tokens_without_comment
         )
         # Without comments, format this as one line
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends: foo, bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # With comments, we degenerate into "wrap_always" mode (for simplicity)
         actual = format_field(
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, tokens_with_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
              foo,
             # some comment about bar
              bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Starting with a comment should also work
         actual = format_field(
             formatter_stl, "Depends", COMMA_SEPARATOR_FT, tokens_starting_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
             # some comment about foo
              foo,
              bar,
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Without trailing comma
         actual = format_field(
             formatter_sl, "Depends", COMMA_SEPARATOR_FT, tokens_without_comment
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends: foo, bar
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
 
         # Triggering a wrap
         actual = format_field(
             formatter_sl, "Depends", COMMA_SEPARATOR_FT, tokens_very_long_content
         )
-        expected = textwrap.dedent(
-            """\
+        expected = textwrap.dedent("""\
             Depends:
              foo,
              bar,
@@ -275,6 +261,5 @@ class ControlTestCase(unittest.TestCase):
              with line length 20,
              and (also) show we do not mash up spaces,
              inside value tokens
-            """
-        )
+            """)
         self.assertEqual(actual, expected)
-- 
2.47.3

Reply via email to