dh_python3 mangles shebangs to use Python

Bug #1023474 reported by Michael Terry
172
This bug affects 80 people
Affects Status Importance Assigned to Milestone
python3-defaults (Ubuntu)
Fix Released
Undecided
Unassigned
ubiquity (Ubuntu)
Fix Released
Undecided
Unassigned
update-manager (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

The latest ubiquity and update-manager are accidentally installed as Python 2 apps because dh_python3 is changing the shebang lines to be /usr/bin/python.

It seems to be a bad regular expression that was not updated from dh_python2 days.

affects: python-defaults (Ubuntu) → python3-defaults (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python3-defaults - 3.2.3-1ubuntu1

---------------
python3-defaults (3.2.3-1ubuntu1) quantal; urgency=high

  * Fix SHEBANG_RE in debpython/tools.py to correctly match python3 and not
    python (LP: #1023474)
 -- Scott Kitterman <email address hidden> Wed, 11 Jul 2012 11:36:12 -0400

Changed in python3-defaults (Ubuntu):
status: New → Fix Released
summary: - dh_python3 mangles shebangs to use Python 2
+ dh_python3 mangles shebangs to use Python
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in ubiquity (Ubuntu):
status: New → Confirmed
Changed in update-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package ubiquity - 2.11.12

---------------
ubiquity (2.11.12) quantal; urgency=low

  * Rebuild with fixed dh_python3 (LP: #1023474).
 -- Colin Watson <email address hidden> Wed, 11 Jul 2012 17:56:31 +0100

Changed in ubiquity (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package update-manager - 1:0.167

---------------
update-manager (1:0.167) quantal; urgency=low

  * Rebuild to get python3 wrapper script (LP: #1023474)
 -- Michael Terry <email address hidden> Wed, 11 Jul 2012 09:28:45 -0400

Changed in update-manager (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Ubuntu QA Website (ubuntuqa) wrote :

This bug has been reported on the Ubuntu ISO testing tracker.

A list of all reports related to this bug can be found here:
http://iso.qa.ubuntu.com/qatracker/reports/bugs/1023474

tags: added: iso-testing
tags: added: verification-done
Revision history for this message
Simon Andric (simonandric5) wrote :
Download full text (17.8 KiB)

Current status: 21 updates [+13].
root@avatar:~# sudo aptitude full-upgrade
The following NEW packages will be installed:
  libmagick++5{a}
The following packages will be upgraded:
  cups-filters dvdauthor gdb libcupsfilters1 libpstoedit0c2a linux-firmware
  nvidia-common project-neon-amarok project-neon-amarok-dbg
  project-neon-oxygen-gtk2 project-neon-oxygen-gtk2-dbg pstoedit
  python-pyasn1 python3 python3-dbg scribus-trunk ubuntu-drivers-common vlc
  vlc-nox{b} vlc-plugin-notify vlc-plugin-pulse
The following partially installed packages will be configured:
  python3-aptdaemon.pkcompat python3-software-properties
  software-properties-common software-properties-gtk
  software-properties-kde
21 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 150 MB of archives. After unpacking 812 kB will be used.
The following packages have unmet dependencies:
 vlc-nox : Depends: libupnp3 (>= 1.4.3) which is a virtual package.
The following actions will resolve these dependencies:

     Remove the following packages:
1) vlc
2) vlc-nox
3) vlc-plugin-notify
4) vlc-plugin-pulse

Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:

     Keep the following packages at their current version:
1) vlc [2.0.2-1 (now, quantal)]
2) vlc-nox [2.0.2-1 (now, quantal)]
3) vlc-plugin-notify [2.0.2-1 (now, quantal)]
4) vlc-plugin-pulse [2.0.2-1 (now, quantal)]

     Leave the following dependencies unresolved:
5) vlc recommends vlc-plugin-notify (= 2.0.2-2~ppa1)

Accept this solution? [Y/n/q/?] y
The following NEW packages will be installed:
  libmagick++5{a}
The following packages will be upgraded:
  cups-filters dvdauthor gdb libcupsfilters1 libpstoedit0c2a linux-firmware
  nvidia-common project-neon-amarok project-neon-amarok-dbg
  project-neon-oxygen-gtk2 project-neon-oxygen-gtk2-dbg pstoedit
  python-pyasn1 python3 python3-dbg scribus-trunk ubuntu-drivers-common
The following partially installed packages will be configured:
  python3-aptdaemon.pkcompat python3-software-properties
  software-properties-common software-properties-gtk
  software-properties-kde
17 packages upgraded, 1 newly installed, 0 to remove and 4 not upgraded.
Need to get 145 MB of archives. After unpacking 770 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://si.archive.ubuntu.com/ubuntu/ quantal/main python3-dbg all 3.2.3-3ubuntu1 [1,178 B]
Get: 2 http://si.archive.ubuntu.com/ubuntu/ quantal/main python3 all 3.2.3-3ubuntu1 [33.0 kB]
Get: 3 http://si.archive.ubuntu.com/ubuntu/ quantal/main ubuntu-drivers-common i386 1:0.2.64 [31.9 kB]
Get: 4 http://si.archive.ubuntu.com/ubuntu/ quantal/main nvidia-common i386 1:0.2.64 [1,276 B]
Get: 5 http://si.archive.ubuntu.com/ubuntu/ quantal/main libcupsfilters1 i386 1.0.18-2build3 [58.7 kB]
Get: 6 http://ppa.launchpad.net/neon/ppa/ubuntu/ precise/main project-neon-amarok-dbg i386 2+git20120713+r30669-28~precise1 [30.8 MB]
Get: 7 http://si.archive.ubuntu.com/ubuntu/ quantal/main lib...

Revision history for this message
Scott Kitterman (kitterman) wrote :

@Simon: It's not clear to me what's going on with your system that you think is related to this bug. Neither libmagick++5 nor VLC are Python packages. You will need to be clearer about the possible relationship. Also, I see you have a mix of quantal and precise sources. That is generally not a good idea (although I did not look at what's in that PPA to see if there is an actual problem).

Revision history for this message
Simon Andric (simonandric5) wrote :

sorry ... i posted that comment not because i have problem with vlc or libmagic but because i have problem with these:

The following partially installed packages will be configured:
  python3-aptdaemon.pkcompat python3-software-properties
  software-properties-common software-properties-gtk
  software-properties-kde

it doesnt want to properly configure them... with them also python3 itself and the python3 debugging symbols...

amm... it also seems the full text which i copy/pasted here is missing (truncated?)... let me try to paste again just the part which is connected to python3.

again maybe this is the wrong bug page for this particulat python3 problem, but it is the only one i am subscribed too, when python first started to have problems.

best regards
simon

Revision history for this message
Simon Andric (simonandric5) wrote :
Download full text (5.3 KiB)

Errors were encountered while processing:
 python3
 python3-dbg
 ubuntu-drivers-common
 python3-distupgrade
 nvidia-common
 python3-software-properties
 software-properties-common
 software-properties-gtk
 python3-pyqt4
 python3-pyqt4-dbg
 software-properties-kde
 ubuntu-release-upgrader-core
 ubuntu-release-upgrader-qt
 python3-aptdaemon.pkcompat
E: Sub-process /usr/bin/dpkg returned an error code (1)
A package failed to install. Trying to recover:
dpkg: dependency problems prevent configuration of python3-pyqt4:
 python3-pyqt4 depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: error processing python3-pyqt4 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-kde:
 software-properties-kde depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.
 software-properties-kde depends on python3-pyqt4; however:
  Package python3-pyqt4 is not configured yet.

dpkg: error processing software-properties-kde (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distupgrade:
 python3-distupgrade depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: error processing python3-distupgrade (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-common:
 software-properties-common depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: error processing software-properties-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-2ubuntu1); however:
  Version of python3-minimal on system is 3.2.3-4.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pyqt4-dbg:
 python3-pyqt4-dbg depends on python3-pyqt4 (= 4.9.3-3); however:
  Package python3-pyqt4 is not configured yet.

dpkg: error processing python3-pyqt4-dbg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-software-properties:
 python3-software-properties depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: error processing python3-software-properties (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuratio...

Read more...

Revision history for this message
Simon Andric (simonandric5) wrote :
Download full text (5.1 KiB)

Processing triggers for doc-base ...
Processing 1 changed doc-base file...
Registering documents with scrollkeeper...
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-2ubuntu1); however:
  Version of python3-minimal on system is 3.2.3-4.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-dbg:
 python3-dbg depends on python3 (= 3.2.3-2ubuntu1); however:
  Package python3 is not configured yet.

dpkg: error processing python3-dbg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distupgrade:
 python3-distupgrade depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: No apport report written because MaxReports is reached already
                                                                    No apport report written because MaxReports is reached already
                                                  No apport report written because MaxReports is reached already
                                No apport report written because MaxReports is reached already
              No apport report written because MaxReports is reached already
                                                                            No apport report written because MaxReports is reached already
                                                          No apport report written because MaxReports is reached already
                                        No apport report written because MaxReports is reached already
                      error processing python3-distupgrade (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of nvidia-common:
 nvidia-common depends on ubuntu-drivers-common; however:
  Package ubuntu-drivers-common is not configured yet.

dpkg: error processing nvidia-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-software-properties:
 python3-software-properties depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: error processing python3-software-properties (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-common:
 software-properties-common depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.
 software-properties-common depends on python3-software-properties; however:
  Package python3-software-properties is not configured yet.

dpkg: error processing software-properties-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-gtk:
 softwa...

Read more...

Revision history for this message
Scott Kitterman (kitterman) wrote : Re: [Bug 1023474] Re: dh_python3 mangles shebangs to use Python

What happens if you do

sudo apt-get -f install

Revision history for this message
Simon Andric (simonandric5) wrote :
Download full text (7.5 KiB)

this:

fani@avatar:~/Documents$ sudo -i
[sudo] password for fani:
root@avatar:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
  python3 python3-dbg
Suggested packages:
  python3-doc python3-tk
The following packages will be upgraded:
  python3 python3-dbg
2 upgraded, 0 newly installed, 0 to remove and 6 not upgraded.
14 not fully installed or removed.
Need to get 0 B/34.4 kB of archives.
After this operation, 1,024 B of additional disk space will be used.
Do you want to continue [Y/n]? y
dpkg: dependency problems prevent configuration of python3:
 python3 depends on python3-minimal (= 3.2.3-2ubuntu1); however:
  Version of python3-minimal on system is 3.2.3-4.

dpkg: error processing python3 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-dbg:
 python3-dbg depends on python3 (= 3.2.3-2ubuntu1); however:
  Package python3 is not configured yet.

dpkg: error processing python3-dbg (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-drivers-common:
 ubuntu-drivers-common depends on python3 (>= 3.2); however:
  Package python3 is not configured yet.

dpkg: error processing ubuntu-drivers-common (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-distupgrade:
 python3-distupgrade depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.

dpkg: No apport report written because MaxReports is reached already
                                                                    No apport report written because MaxReports is reached already
                                                            No apport report written because MaxReports is reached already
                                                    No apport report written because MaxReports is reached already
                                            No apport report written because MaxReports is reached already
                                    No apport report written because MaxReports is reached already
                            No apport report written because MaxReports is reached already
                    No apport report written because MaxReports is reached already
            No apport report written because MaxReports is reached already
    No apport report written because MaxReports is reached already
                                                                  No apport report written because MaxReports is reached already
                                                          No apport report written because MaxReports is reached already
                                                  error processing python3-distupgrade (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python3-pyqt4:
 python3-pyqt4 depends on python3 (>= 3.2.3-3~); however:
  Version of python3 on system is 3.2.3-2ubuntu1.
 python3-pyqt4 depends on...

Read more...

Revision history for this message
Scott Kitterman (kitterman) wrote :

I looks like you'll need to fetch the .deb for python3 manually and install it with dpkg. That should clear up the mess. It can be found here: https://launchpad.net/ubuntu/+source/python3-defaults/3.2.3-4/+build/3655725/+files/python3_3.2.3-4_all.deb

Revision history for this message
Karma Dorje (taaroa) wrote :

#13
sudo apt-get --download-only --reinstall install python3 && sudo dpkg -i /var/cache/apt/archives/python3_3.2.3-4_all.deb && sudo apt-get dist-upgrade

Revision history for this message
Simon Andric (simonandric5) wrote :

fani@avatar:~/Documents$ sudo -i
[sudo] password for fani:
root@avatar:~# sudo apt-get --download-only --reinstall install python3 && sudo dpkg -i /var/cache/apt/archives/python3_3.2.3-4_all.deb && sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
 python3-dbg : Depends: python3 (= 3.2.3-2ubuntu1) but 3.2.3-4 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
root@avatar:~#

:(

but thank you anyway....

nice day
simon

Revision history for this message
Scott Kitterman (kitterman) wrote :

I suspect if you sudo apt-get -f install now it will offer to fix the situation
by removing python3-dbg. I'd let it do that and then reinstall it later if
you need it.

Revision history for this message
Simon Andric (simonandric5) wrote :

@scott -- your suggestion on fortunatelly didnt help - when i did that the result was the same as in comment #13.

But what helped:

your suggestion in comment #14 i manually dl and installed the package via dolphin - right click - open with - qapt package installer

interetingly this way all dependencied were satisfied (resloved) and python3 updated. then i reainstalled python3-dbg which i manually purged b4 via sudo aptitude purge python3-dbg in konsole.

now its ok :)

thank you

simon

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.