Unlisted dependency

Bug #1936697 reported by computerworm
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-dev-tools (Ubuntu)
Fix Released
Undecided
Mattia Rizzolo

Bug Description

I am using pbuilder 0.231build1 on Ubuntu 21.04 Hirsute. I tried to run "pbuilder-dist hirsute create" and received this error:

Traceback (most recent call last):
  File "/usr/bin/pbuilder-dist", line 32, in <module>
    import distutils.spawn
ModuleNotFoundError: No module named 'distutils.spawn'

I tried it three more times and the same thing kept happening, so then I took a closer look at the error message, and decided to "apt search" for a Python distutils package in the repos. I found python3-distutils, and installed it, then I tried running pbuilder-dist again and it succeeded.

Therefore, the fix for this bug is to add python3-distutils as a dependency of pbuilder.

Thank you and have a good day!

Signed,
Computerworm01001

ProblemType: Bug
DistroRelease: Ubuntu 21.04
Package: pbuilder 0.231build1
ProcVersionSignature: Ubuntu 5.11.0-22.23-generic 5.11.21
Uname: Linux 5.11.0-22-generic x86_64
ApportVersion: 2.20.11-0ubuntu65.1
Architecture: amd64
CasperMD5CheckResult: unknown
CurrentDesktop: ubuntu:GNOME
Date: Fri Jul 16 15:36:23 2021
InstallationDate: Installed on 2021-07-15 (1 days ago)
InstallationMedia: Ubuntu 18.04.5 LTS "Bionic Beaver" - Release amd64 (20200806.1)
PackageArchitecture: all
ProcEnviron:
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: pbuilder
UpgradeStatus: Upgraded to hirsute on 2021-07-16 (0 days ago)

Revision history for this message
computerworm (computerworm) wrote :
Revision history for this message
Jessica Clarke (jrtc27) wrote (last edit ):

pbuilder-dist is a wrapper provided by ubuntu-dev-tools, not pbuilder itself. Moreover, ubuntu-dev-tools only Suggests: pbuilder, though at the same time python3-distutils is a pretty tiny package (that's also fairly useful) so adding that dependency as Recommends: rather than just Suggests: (to be clear, there isn't even a Suggests: currently) to try and ensure the wrapper works if you happen to have pbuilder installed might make sense.

affects: pbuilder (Ubuntu) → ubuntu-dev-tools (Ubuntu)
Revision history for this message
computerworm (computerworm) wrote :

Hello Jessica, and thank you for your rapid response. Your explanation of the dependency situation with pbuilder and ubuntu-dev-tools is helpful. However, I don't understand why pbuilder itself is only suggested and not required by ubuntu-dev-tools. According to the Ubuntu Packaging Manual(https://packaging.ubuntu.com/html/getting-set-up.html#set-up-pbuilder), pbuilder is a necessary tool for the packaging process. I think that pbuilder, and by extension python3-distutils should both be required by ubuntu-dev-tools.

Kind regards,
Computerworm01001

Revision history for this message
Mattia Rizzolo (mapreri) wrote :

because pbuilder is not "a necessary tool": there are several other alternatives to it.

Mattia Rizzolo (mapreri)
Changed in ubuntu-dev-tools (Ubuntu):
status: New → In Progress
assignee: nobody → Mattia Rizzolo (mapreri)
Revision history for this message
computerworm (computerworm) wrote :

Hello Mattia, and thank you for clarifying the role pbuilder plays in ubuntu-dev-tools. The page I linked above does not mention alternatives to pbuilder; that is why I thought it was necessary.

Given that pbuilder is, in fact, optional, I think the solution Jessica proposed (adding python3-distutils as a Recommends:) is a reasonable one.

Kind regards,
Computerworm01001

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubuntu-dev-tools - 0.184

---------------
ubuntu-dev-tools (0.184) experimental; urgency=medium

  [ Dan Streetman ]
  * Drop never packaged ubuntu-archive-assistant.
  * Add support for downloading from private PPAs:
    + ubuntutools/misc:
      - Refactor to use Pathlib and f-strings.
      - Refactor to use requests instead of urllib (for the earier auth)
    + ubuntutools/archive:
      - Refactor to use Pathlib.
      - Add support for the special URLs of private PPAs.
  * Don't use existing file without verifying their checksum.
  * tests: recreate the test package files on demand.
  * Remove no longer used dependencies on python3-termcolor and python3-yaml

  [ Mattia Rizzolo ]
  * pbuilder-dist: use shutil.which instead of
    distutils.spawn.find_executable() to save a dependency. LP: #1936697
  * d/control:
    + Drop redundant Recommends that are already in Depends.
    + Bump debhelper compat level to 13.

  [ Marco Trevisan (Treviño) ]
  * mk-sbuild:
    + Enable debugging in the finish.sh script if --debug is used.
    + Add support to configure ccache for each schroot.

 -- Mattia Rizzolo <email address hidden> Sat, 17 Jul 2021 17:31:19 +0200

Changed in ubuntu-dev-tools (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.