install-package incorrectly displays package installed successfully

Bug #490353 reported by Michael Tsang
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
qapt (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

Binary package hint: install-package

1. pin a package (e.g. flashplugin-installer) in /etc/apt/preferences to -1 to prevent it from being installed
2. Run 'install-package $package_name' where $package_name is the package pinned

Expected result:
it shows message saying install failed.

Actual result:
A dialogue box pop up:
$package successfully installed

ProblemType: Bug
Architecture: amd64
Date: Mon Nov 30 22:36:41 2009
DistroRelease: Ubuntu 9.10
Package: install-package 0.4.2
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_HK.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-15.50-generic
SourcePackage: install-package
Uname: Linux 2.6.31-15-generic x86_64

Revision history for this message
Michael Tsang (miklcct) wrote :
Changed in install-package (Ubuntu):
importance: Undecided → Low
Revision history for this message
Jonathan Thomas (echidnaman) wrote :

It seems that no matter how the install worked out, install-package seems to think it succeeded. The install-package program has been scrapped for 10.10, but its replacement qapt-batch makes the same assumptions. (The good news is that it'll give an error dialog for most any type of error in addition)

affects: install-package (Ubuntu) → qapt (Ubuntu)
Changed in qapt (Ubuntu):
status: New → Triaged
Revision history for this message
Jonathan Thomas (echidnaman) wrote : extragear/sysadmin/libqapt/utils/qapt-batch

SVN commit 1188596 by jmthomas:

Don't say we were successful if there were errors. That looks a bit silly, especially when we have error dialogs to contradict ourselves.

CCMAIL:<email address hidden>

 M +19 -1 qaptbatch.cpp

--- trunk/extragear/sysadmin/libqapt/utils/qapt-batch/qaptbatch.cpp #1188595:1188596
@@ -320,13 +320,19 @@
             show();
             break;
         case QApt::CacheUpdateFinished:
+ setWindowTitle(i18nc("@title:window", "Refresh Complete"));
             if (m_warningStack.size() > 0) {
                 showQueuedWarnings();
             }
             if (m_errorStack.size() > 0) {
                 showQueuedErrors();
             }
- setLabelText(i18nc("@title:window", "Package information successfully refreshed"));
+
+ if (m_errorStack.size() > 0) {
+ setLabelText(i18nc("@info:status", "Refresh completed with errors"));
+ } else {
+ setLabelText(i18nc("@label", "Package information successfully refreshed"));
+ }
             disconnect(this, SIGNAL(cancelClicked()), m_worker, SLOT(cancelDownload()));
             progressBar()->setValue(100);
             m_detailsWidget->hide();
@@ -364,15 +370,27 @@
             }
             if (m_mode == "install") {
                 setWindowTitle(i18nc("@title:window", "Installation Complete"));
+
+ if (m_errorStack.size() > 0) {
+ setLabelText(i18nc("@label",
+ "Package installation finished with errors."));
+ } else {
                 setLabelText(i18ncp("@label",
                                     "Package successfully installed",
                                     "Packages successfully installed", m_packages.size()));
+ }
             } else if (m_mode == "uninstall") {
                 setWindowTitle(i18nc("@title:window", "Removal Complete"));
+
+ if (m_errorStack.size() > 0) {
+ setLabelText(i18nc("@label",
+ "Package removal finished with errors."));
+ } else {
                 setLabelText(i18ncp("@label",
                                     "Package successfully uninstalled",
                                     "Packages successfully uninstalled", m_packages.size()));
             }
+ }
             progressBar()->setValue(100);
             m_done = true;
             // Really a close button, but KProgressDialog use ButtonCode Cancel

Revision history for this message
Rohan Garg (rohangarg) wrote :

Changing to fix committed, since its committed in SVN

Changed in qapt (Ubuntu):
status: Triaged → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package qapt - 1.0.60-0ubuntu1

---------------
qapt (1.0.60-0ubuntu1) natty; urgency=low

  * New upstream release: (LP: #490353, #668297, #670294)
    - Bump build-depend version on libapt-pkg-dev to 0.8.0 or higher
    - Update libqapt1.symbols
  * Bump Standards-Version to 3.9.1, no changes
 -- Jonathan Thomas <email address hidden> Mon, 01 Nov 2010 22:46:18 -0400

Changed in qapt (Ubuntu):
status: Fix Committed → Fix Released
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.