qapt-deb-installer fails to detect and report some installation errors

Bug #1205523 reported by Francois Gouget
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QApt
Unknown
Medium
qapt (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Here is how to reproduce this bug:
 * Download http://fgouget.free.fr/bugs/testdep.tar.bz2
   This is a small archive that contains a set of test, empty, Debian
   package files along with their source.
   (run ./build to rebuild them)

 * Install the testdep-allsarch_1.0-1_all.deb package.

 * Then run the following command and install the package:
   qapt-deb-installer testdep-allsarch-default_1.0-1_i386.deb

The command will appear to succeed but in fact it leaves the testdep-allsarch-default broken:

$ dpkg -l testdep-allsarch-default
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-===============-===============-=============================================
iU testdep-allsarch-def 1.0-1 i386 Package with testdep-allsarch dependency

Now it's normal for the package to fail to install: it has a dependency that cannot be resolved. But there are still two bugs here:

* The most important one is that qapt-deb-installer seems to fail to detect and report unexpected installation errors. This is the bug that really needs to be fixed. Note that in the same situation gdebi-gtk and software-center detect and report the issue and also suggest a command to run to fix it.

* The second, less important bug, is that qapt-deb-installer thought the package could be installed in the first place.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: qapt-deb-installer 2.0.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
Uname: Linux 3.8.0-26-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Fri Jul 26 18:58:24 2013
InstallationDate: Installed on 2013-04-29 (88 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: qapt
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Francois Gouget (fgouget) wrote :
Revision history for this message
Harald Sitter (apachelogger) wrote :

Hi there!

Thanks for reporting this bug! Your bug seems to be a problem with the KDE program itself, and not with our KDE packages. While we appreciate your issue, it would be better if it was tracked at https://bugs.kde.org, so that the KDE developers can deal with this speedily and have direct communication with you as the reporter for more effective debugging.

Thanks!

Changed in qapt (Ubuntu):
status: New → Invalid
Revision history for this message
In , Francois Gouget (fgouget) wrote :

Here is how to reproduce this bug:
 * Download http://fgouget.free.fr/bugs/testdep.tar.bz2
   This is a small archive that contains a set of test, empty, Debian
   package files along with their source.
   (run ./build to rebuild them)

 * Install the testdep-allsarch_1.0-1_all.deb package.

 * Then run the following command and install the package:
   qapt-deb-installer testdep-allsarch-default_1.0-1_i386.deb

The command will appear to succeed but in fact it leaves the testdep-allsarch-default broken:

$ dpkg -l testdep-allsarch-default
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-====================-===============-===============-=============================================
iU testdep-allsarch-def 1.0-1 i386 Package with testdep-allsarch dependency

Now it's normal for the package to fail to install: it has a dependency that cannot be resolved. But there are still two bugs here:

* The most important one is that qapt-deb-installer seems to fail to detect and report unexpected installation errors. This is the bug that really needs to be fixed. Note that in the same situation gdebi-gtk and software-center detect and report the issue and also suggest a command to run to fix it.

* The second, less important bug, is that qapt-deb-installer thought the package could be installed in the first place.

ProblemType: Bug
DistroRelease: Ubuntu 13.04
Package: qapt-deb-installer 2.0.0-0ubuntu1
ProcVersionSignature: Ubuntu 3.8.0-26.38-generic 3.8.13.2
Uname: Linux 3.8.0-26-generic x86_64
ApportVersion: 2.9.2-0ubuntu8.1
Architecture: amd64
Date: Fri Jul 26 18:58:24 2013
InstallationDate: Installed on 2013-04-29 (88 days ago)
InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
MarkForUpload: True
SourcePackage: qapt
UpgradeStatus: No upgrade log present (probably fresh install)

Reproducible: Always

Changed in qapt:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Are you sure dpkg's behavior makes sense here?

if I install a package that is arch:i386 on arch:amd64, arch:all really shouldn't mean arch:amd64. granted it's a bit of a corner case to begin with but it sounds somewhat weird.

Revision history for this message
In , Harald Sitter (apachelogger) wrote :

Git commit 06daa82d426009f283b2cd4f15ed6bcef66a22b0 by Harald Sitter.
Committed on 28/12/2014 at 19:16.
Pushed by sitter into branch 'master'.

do not discard the exitcode when installing a deb through dpkg

exitstatus only has baring when dpkg segfaults etc, exitcode is the real
deal when dpkg exits in a controlled manner but with error

raising errors on exitcode!=0 is a requirement for allowing deb-installer
to give consistent UI feedback

M +1 -3 src/worker/aptworker.cpp

http://commits.kde.org/libqapt/06daa82d426009f283b2cd4f15ed6bcef66a22b0

Revision history for this message
Francois Gouget (fgouget) wrote :

"qapt-deb-installer testdep-allsarch-default_1.0-1_i386.deb" now has an exit code of 1. However it seems to use the same exit code when an installation succeeds so this is meaningless. And there is no still GUI feedback indicating that something went wrong.

Furthermore qapt-deb-installer still incorrectly thinks it can install this package (when dpkg and apt both point out it cannot be installed).

So despite the 2014 commit this bug is still present in qapt-deb-installer 3.0.4-0ubuntu1.

Revision history for this message
In , Francois Gouget (fgouget) wrote :

"qapt-deb-installer testdep-allsarch-default_1.0-1_i386.deb" now has an exit code of 1. However it seems to use the same exit code when an installation succeeds so this is meaningless. And there is no still GUI feedback indicating that something went wrong.

Furthermore qapt-deb-installer still incorrectly thinks it can install this package (when dpkg and apt both point out it cannot be installed).

So despite the 2014 commit this bug is still present in qapt-deb-installer 3.0.4-0ubuntu1.

Changed in qapt:
status: New → Unknown
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.