Public bug reported:

[If you're facing this issue, please use bug 1290228 , so that we can
use this bug for the implementation of the fix - thanks!]

Steps to reproduce:
- run trusty (updated sometime in the last ~month)
- open ?any? deb file with an aptdaemon client (software-center, appgrid, etc)
- installation will fail (bug 1290228 etc)

After trailing through aptdaemon and python-apt code it seems that there might 
be multiple manifestations of this bug
python-apt: progress/base.py: InstallProgress.run()
>>> os._exit(os.spawnlp(os.P_WAIT, "dpkg", "dpkg", "--status-fd", 
>>> str(self.write_stream.fileno()), "-i", obj))
aptdaemon: progress.py: DaemonDpkgInstallProgress._child()
>>> args = [apt_pkg.config["Dir::Bin::DPkg"], "--status-fd", 
>>> str(self.status_child_fd)] #(...)
>>> os.execlp(apt_pkg.config["Dir::Bin::DPkg"], *args)
I think there are likely to be other points of failure too.

Noteworthy is the following:
pgg@four:~$ sudo python3.4 -c "import os; (statusfd, writefd) = os.pipe(); 
write_stream = os.fdopen(writefd, 'w'); print(write_stream.fileno()); r = 
os.execlp('/usr/bin/dpkg', '/usr/bin/dpkg', '--status-fd', 
str(write_stream.fileno()), '-i', 
'/home/pgg/Downloads/appgrid_0.1.100~trusty_all.deb'); print(r)"
4
dpkg: error: unable to read filedescriptor flags for <package status and 
progress file descriptor>: Bad file descriptor

pgg@four:~$ sudo python3.3 -c "import os; (statusfd, writefd) = os.pipe(); 
write_stream = os.fdopen(writefd, 'w'); print(write_stream.fileno()); r = 
os.execlp('/usr/bin/dpkg', '/usr/bin/dpkg', '--status-fd', 
str(write_stream.fileno()), '-i', 
'/home/pgg/Downloads/appgrid_0.1.100~trusty_all.deb'); print(r)"
4
(Reading database ... 227994 files and directories currently installed.)
Preparing to unpack .../appgrid_0.1.100~trusty_all.deb (etc, installs properly)

This lead me to http://legacy.python.org/dev/peps/pep-0446/ which means
that file descriptors can't be inherited in python 3.4.

My knowledge of python-apt and aptdaemon isn't really good enough to
know what the best way forward is to resolve this in the least
disruptive and safest way, but it would be nice if people could install
deb files in 14.04. I've subscribed a few people who might have ideas.

** Affects: appgrid
     Importance: Undecided
         Status: New

** Affects: aptdaemon
     Importance: Undecided
         Status: New

** Affects: python-apt (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: software-center (Ubuntu)
     Importance: Critical
         Status: Triaged

** Also affects: appgrid
   Importance: Undecided
       Status: New

** Also affects: aptdaemon
   Importance: Undecided
       Status: New

** Also affects: python-apt (Ubuntu)
   Importance: Undecided
       Status: New

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

Title:
  python3.4 breaks installing deb files

To manage notifications about this bug go to:
https://bugs.launchpad.net/appgrid/+bug/1306543/+subscriptions

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

Reply via email to