Bug 330448 - qapt-deb-installer fails to detect and report some installation errors
Summary: qapt-deb-installer fails to detect and report some installation errors
Status: CONFIRMED
Alias: None
Product: muon
Classification: Applications
Component: qapt-deb-installer (show other bugs)
Version: 2.0.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jonathan Thomas
URL: http://fgouget.free.fr/bugs/testdep.t...
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-27 00:05 UTC by Francois Gouget
Modified: 2019-01-16 11:14 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Francois Gouget 2014-01-27 00:05:33 UTC
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
Comment 1 Harald Sitter 2014-12-28 18:59:37 UTC
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.
Comment 2 Harald Sitter 2014-12-28 23:06:57 UTC
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
Comment 3 Francois Gouget 2019-01-16 11:14:59 UTC

"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.