driver manager does not handle qapt transaction prompts

Bug #1315670 reported by Lastique
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kubuntu-driver-manager (Ubuntu)
Fix Released
Low
Harald Sitter
Trusty
Fix Released
Low
Harald Sitter
Utopic
Fix Released
Low
Harald Sitter

Bug Description

[Impact]
Driver manager did not have GUI handling for corner case dpkg/apt issues blocking installation progress (such as choosing what to do with a changed config file). The necessary GUI logic was imported from muon/libmuon and wried up accordingly. Additionally to reduce the likelyhood of ending up with untranslated strings the manager will try to load libmuon's translations (this relationship is not reflected in the packaging as the availability of these strings is incredibly limited because the prompts in question are very hard to trigger for most people).

[Test Case]
- download a suitable driver deb file
  e.g. nvidia-331-updates_331.38-0ubuntu7_amd64.deb
- create a directory and place the file inside
- in the directory do:
  dpkg-deb -x *deb data/
  dpkg-deb -e *deb data/DEBIAN
- in data/DEBIAN/conffiles is a list of suitable files
- choose any file listed, find it in data/ and edit it
- add an additional newline or change a string etc.
  i.e. the md5sum of the file needs to change, any change in the file
  will cause that
- edit data/DEBIAN/control
- change the Version field by appending '~bug1315670' (do note the ~)
- go into the parent directory and run
  dpkg-deb -b data bug1315670.deb
- there's now a modified deb file in the parent dir, install it:
  sudo dpkg -i bug1315670.deb
- your driver package should now be installed/downgraded to the modified version
- now remove the previously modified conffile
  sudo rm /random/example/path
- make sure it is gone with:
  file /random/example/path
- make sure the package is listed in muon-updater or another package manager as upgradable, but DO NOT upgrade it yet
- remove the package (DO NOT purge it!)
  sudo apt-get remove $packagename
- run driver manager
- it should not have the driver/package in question marked as active
- switch to the driver/package and click apply
- wait
- during the installation process a conflict dialog should up
- make sure the cache is not broken
  sudo apt-get check
  sudo apt-get dist-upgrade

[Regression Potential]
none

[Other Info]
n/a

---

Just upgraded to Kubuntu 14.04. KDE Driver manager suggested to install proprietary drivers for Nvidia video card. I selected the recommended driver (331.38) and accepted. The driver manager started the installation process but hung on 81%, all I could do is to close it. After that dpkg database was left locked and inconsistent.

The process actually was waiting for a user's input. I figured that out when I later executed "sudo dpkg --configure -a". The driver installer showed the following prompt:

Configuration file '/etc/init/nvidia-persistenced.conf'
 ==> Deleted (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ? Your options are:
    Y or I : install the package maintainer's version
    N or O : keep your currently-installed version
      D : show the differences between the versions
      Z : start a shell to examine the situation
 The default action is to keep your current version.
*** nvidia-persistenced.conf (Y/I/N/O/D/Z) [default=N] ? y

I don't remember removing that file, but in any case the driver manager must handle such user input requests properly and not hang.

PS: Moved from https://bugs.kde.org/show_bug.cgi?id=334232.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: kubuntu-driver-manager 14.04ubuntu9
ProcVersionSignature: Ubuntu 3.13.0-24.46-generic 3.13.9
Uname: Linux 3.13.0-24-generic x86_64
ApportVersion: 2.14.1-0ubuntu3
Architecture: amd64
CurrentDesktop: KDE
Date: Sat May 3 17:10:02 2014
InstallationDate: Installed on 2013-10-11 (203 days ago)
InstallationMedia: Kubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424)
SourcePackage: kubuntu-driver-manager
UpgradeStatus: Upgraded to trusty on 2014-05-02 (0 days ago)

Revision history for this message
Lastique (andysem) wrote :
summary: - KDE driver manager hangs on 81% when installing nvidia drivers
+ driver manager does not handle qapt transaction prompts
Changed in kubuntu-driver-manager (Ubuntu Trusty):
status: New → Confirmed
Changed in kubuntu-driver-manager (Ubuntu Utopic):
status: New → In Progress
importance: Undecided → Medium
Changed in kubuntu-driver-manager (Ubuntu Trusty):
importance: Undecided → Medium
Changed in kubuntu-driver-manager (Ubuntu Utopic):
importance: Medium → Low
Changed in kubuntu-driver-manager (Ubuntu Trusty):
importance: Medium → Low
assignee: nobody → Harald Sitter (apachelogger)
Changed in kubuntu-driver-manager (Ubuntu Utopic):
assignee: nobody → Harald Sitter (apachelogger)
Changed in kubuntu-driver-manager (Ubuntu Trusty):
status: Confirmed → In Progress
Revision history for this message
Harald Sitter (apachelogger) wrote :

utopic fix commited in git repo

description: updated
Changed in kubuntu-driver-manager (Ubuntu Utopic):
status: In Progress → Fix Committed
assignee: Harald Sitter (apachelogger) → nobody
assignee: nobody → Harald Sitter (apachelogger)
Revision history for this message
Scott Kitterman (kitterman) wrote : Please test proposed package

Hello Lastique, or anyone else affected,

Accepted kubuntu-driver-manager into trusty-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/kubuntu-driver-manager/14.04ubuntu10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in kubuntu-driver-manager (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Rohan Garg (rohangarg) wrote :

I can confirm that the fix works for me.

tags: added: verification-done
removed: verification-needed
Changed in kubuntu-driver-manager (Ubuntu Utopic):
milestone: none → ubuntu-14.10
tags: added: kubuntu
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kubuntu-driver-manager - 14.04ubuntu10

---------------
kubuntu-driver-manager (14.04ubuntu10) trusty; urgency=medium

  * Fix debug output typo s/beause/because/
  * Implement QApt transaction prompt signals
   + This adds three new qslots to drivermanager:
     - provideMedium
     - untrustedPrompt
     - configFileConflict
    + All three are copied from libmuon's ApplicationBackend and
      adjusted in the least invasive manner
    + All three trigger a KMessageBox to query the user for a decision on
      the respective apt/dpkg-level issues
    + The KMessageBoxes anchor to qApp::activeWindow as DriverManager is
      supposed to not contain UI logic and as such has no explicit method
      to get the master window id
    + These slots add new strings that were previously not available for
      translations, but should eventually get picked up by launchpad.
    + Module.cpp manually adds 'libmuon' as a translation catalog to draw
      translations from, while we have no translations of our own. This is
      to prevent the newly introduced strings from going untranslated.
      This relationship is not refelected on a packaging level since in due
      time our own language-packages should contain translation, plus the
      prompts are incredibly hard to trigger so even in an untranslated state
      99.9% of users will not ever see them. If we can get the translations
      from libmuon it's nice, if not we'll likely not care given the impact.
    LP: #1315670
 -- Harald Sitter <email address hidden> Mon, 12 May 2014 13:16:26 +0200

Changed in kubuntu-driver-manager (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Scott Kitterman (kitterman) wrote : Update Released

The verification of the Stable Release Update for kubuntu-driver-manager has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regresssions.

Jonathan Riddell (jr)
Changed in kubuntu-driver-manager (Ubuntu Utopic):
status: Fix Committed → Fix Released
Changed in kubuntu-driver-manager (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.