[Bug 680328] Re: Many postinst scripts fail using either AptDaemon, PackageKit, or QApt

Colin Watson cjwatson at canonical.com
Mon Jan 24 13:41:21 UTC 2011


As shown by strace, the failure is along the lines of this:

  write(1, "Rebuilding /usr/share/applications/bamf.index...\n", 49) =
-1 EBADF (Bad file descriptor)

Not having a controlling terminal is one thing.  Not even having a
standard output file descriptor is quite another!

Looking earlier in the strace, apt is creating a pipe whose read end
happens to land on fd 1 (it's later marked as FD_CLOEXEC, which causes
dpkg to have no stdout at all, but the fact that the read end of the
pipe is on fd 1 is an obvious red flag).  This is probably mere chance:
it's just the first available fd.

The fundamental bugs here are in PackageKit and QApt, so I'm going to
reassign this bug.  They should have some kind of stdout fd open when
running apt functions, even if it's only a duplicate of /dev/null.

Incidentally, why does QApt have an obvious copy of code from PackageKit
(compare WorkerInstallProgress::start in
qapt/src/worker/workerinstallprogress.cpp with aptcc::installPackages in
packagekit/backends/aptcc/apt.cpp), with no common copyright holders in
the file headers?  Aside from the general problems with copying code
around - in this case, one of you has copied a bug from the other, so
it's going to have to be fixed in both places - it seems rather naughty
to copy code without preserving the required copyright notices.

** Package changed: apt (Ubuntu Natty) => qapt (Ubuntu Natty)

** Changed in: qapt (Ubuntu Natty)
     Assignee: Colin Watson (cjwatson) => Jonathan Thomas (echidnaman)

** Package changed: dpkg (Ubuntu Natty) => packagekit (Ubuntu Natty)

** Changed in: packagekit (Ubuntu Natty)
     Assignee: Colin Watson (cjwatson) => (unassigned)

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to qapt in ubuntu.
https://bugs.launchpad.net/bugs/680328

Title:
  Many postinst scripts fail using either AptDaemon, PackageKit, or QApt




More information about the kubuntu-bugs mailing list