** Description changed:

  [ Impact ]
  
  python3-oops-datedir-repo fails to configure on every supported release.
  Its postinst byte-compiles oops_datedir_repo/bsondump.py, which still uses
  Python 2 syntax (print __doc__ and file()), so compilation fails and dpkg
  leaves the package half-configured. Upstream fixed bsondump.py after 0.0.24,
  in "use py3-style print." and "Use open() in bsondump, not file().", and the
  fix backports those two changes.
  
  [ Test Plan ]
  
  On each target release:
  
      sudo apt install python3-oops-datedir-repo
      dpkg-query -W -f='${Status} ${Version}\n' python3-oops-datedir-repo
  
  With the current package, apt reports a SyntaxError from bsondump.py and the
  second command prints:
  
      install ok half-configured 0.0.24-0ubuntu2
  
- With the fix, it prints "install ok installed" and the fixed version.
+ Then upgrade the half-configured package from -proposed and check again:
+ 
+     sudo apt install python3-oops-datedir-repo/<series>-proposed
+     dpkg-query -W -f='${Status} ${Version}\n' python3-oops-datedir-repo
+     dpkg --audit
+ 
+ With the fix, the second command prints "install ok installed" and the fixed
+ version, and dpkg --audit prints nothing.
  
  [ Where problems could occur ]
  
- The change only touches bsondump.py, a small command-line tool that cannot
+ The change to bsondump.py only touches a small command-line tool that cannot
  run on Python 3 today. A problem would show up as the tool failing to dump a
  report file, or as the package still failing to configure.
  
+ The same upload also changes how the package is built. setup.py imports
+ distutils, which Python 3.12 removed, so the package no longer builds from
+ source on noble and later. setup.py now imports setuptools instead, with a
+ new build dependency on python3-setuptools. This has three side effects.
+ 
+ - The oops_datedir_repo-0.0.24.egg-info metadata changes from a single file
+   to a directory with the same name, so dpkg replaces a file with a
+   directory on upgrade. The test plan upgrades from the half-configured
+   package to cover this.
+ - dh_python3 now also generates dependencies from the package's
+   requirements. On tenacious this adds python3-pytz, the same library as the
+   python3-tz the package already depends on.
+ - setuptools installs bsondump and prune console scripts into /usr/bin.
+   debian/rules removes them, so the package still ships nothing in /usr/bin.
+   /usr/bin/prune would otherwise clash with the file of the same name in
+   graphviz.
+ 
  [ Other Info ]
  
- focal is not targeted, as it is past standard support.
+ The setuptools change is upstream commit f656389. focal is not targeted, as
+ it is past standard support.
  
  [ Original report ]
  
  Setting up python3-oops-datedir-repo (0.0.24-0ubuntu2) ...
-   File "/usr/lib/python3/dist-packages/oops_datedir_repo/bsondump.py", line 37
-     print __doc__
-     ^^^^^^^^^^^^^
+   File "/usr/lib/python3/dist-packages/oops_datedir_repo/bsondump.py", line 37
+     print __doc__
+     ^^^^^^^^^^^^^
  SyntaxError: Missing parentheses in call to 'print'. Did you mean print(...)?
  dpkg: error processing package python3-oops-datedir-repo (--configure):
-  installed python3-oops-datedir-repo package post-installation script 
subprocess returned error exit status 1
+  installed python3-oops-datedir-repo package post-installation script 
subprocess returned error exit status 1
  Errors were encountered while processing:
-  python3-oops-datedir-repo
+  python3-oops-datedir-repo
  E: Sub-process /usr/bin/dpkg returned an error code (1)

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2061901

Title:
  [SRU] python3-oops-datedir-repo fails to install

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/oops-datedir-repo/+bug/2061901/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to