system-config-printer.py crashed with FileNotFoundError in _execute_child(): [Errno 2] Datei oder Verzeichnis nicht gefunden: 'gpk-install-package-name'

Bug #1366756 reported by puce
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
system-config-printer (Ubuntu)
Fix Released
High
Till Kamppeter
Utopic
Fix Released
High
Unassigned

Bug Description

Adding an SMB-Printserver, the app crashed.

[Note]

The crash is fixed in Utopic but the installation of smbclient triggered by system-config-printer still does not work.

[Impact]

If a user has the default installation of Ubuntu and sets up a print queue to print on an SMB-shared (usually Windows servers) remote printer, the steps for setting up the queue are correctly done but the queue is not finally created as the SMB CUPS backend is missing.So the user will not be able to print on Windows-shared printers if he does not install the "smbclient" package manually.

[Test Case]

Take an absolutely standard installation of Utopic (or uninstall smbclient) and try to set up a remote printer which is shared by Windows server. As system-config-printer does not install the smbclient package (which contains the SMB CUPS backend) you will not be able to finish the setup of the print queue.

With the proposed package this gets fixed as there the package installation facility is fixed.

[Regression Potential]

Low, as the changes are only in the code which gets used when the presence/absence of the SMB backend is actually checked and the package installation done in case of absence. If the installation fails for some reason, system-config-printer will not crash.

ProblemType: Crash
DistroRelease: Ubuntu 14.10
Package: system-config-printer-gnome 1.5.1+20140906-0ubuntu1
ProcVersionSignature: Ubuntu 3.16.0-14.20-generic 3.16.2
Uname: Linux 3.16.0-14-generic i686
ApportVersion: 2.14.7-0ubuntu2
Architecture: i386
CrashCounter: 1
CupsErrorLog:

CurrentDesktop: GNOME
Date: Mon Sep 8 13:04:48 2014
ExecutablePath: /usr/share/system-config-printer/system-config-printer.py
InstallationDate: Installed on 2014-09-02 (5 days ago)
InstallationMedia: Ubuntu-GNOME 14.10 "Utopic Unicorn" - Alpha i386 (20140826)
InterpreterPath: /usr/bin/python3.4
Lpstat: Error: command ['lpstat', '-v'] failed with exit code 1: lpstat: No destinations added.
MachineType: Hewlett-Packard HP ProBook 6450b
PackageArchitecture: all
Papersize: a4
ProcCmdline: /usr/bin/python3 /usr/share/system-config-printer/system-config-printer.py
ProcEnviron:
 TERM=xterm
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-3.16.0-14-generic root=/dev/mapper/ubuntu--gnome--vg-root ro quiet splash vt.handoff=7
PythonArgs: ['/usr/share/system-config-printer/system-config-printer.py']
SourcePackage: system-config-printer
Title: system-config-printer.py crashed with FileNotFoundError in _execute_child(): [Errno 2] Datei oder Verzeichnis nicht gefunden: 'gpk-install-package-name'
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo
dmi.bios.date: 01/11/2011
dmi.bios.vendor: Hewlett-Packard
dmi.bios.version: 68CDE Ver. F.06
dmi.board.name: 146D
dmi.board.vendor: Hewlett-Packard
dmi.board.version: KBC Version 73.13
dmi.chassis.type: 10
dmi.chassis.vendor: Hewlett-Packard
dmi.modalias: dmi:bvnHewlett-Packard:bvr68CDEVer.F.06:bd01/11/2011:svnHewlett-Packard:pnHPProBook6450b:pvr:rvnHewlett-Packard:rn146D:rvrKBCVersion73.13:cvnHewlett-Packard:ct10:cvr:
dmi.product.name: HP ProBook 6450b
dmi.sys.vendor: Hewlett-Packard

Revision history for this message
puce (schlichtbr) wrote :
tags: removed: need-duplicate-check
Changed in system-config-printer (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Sebastien Bacher (seb128) wrote :

Till, is that a missing depends on packagekit-gnome?

information type: Private → Public
Changed in system-config-printer (Ubuntu):
assignee: nobody → Till Kamppeter (till-kamppeter)
Revision history for this message
Sebastien Bacher (seb128) wrote :

(in fact packagekit-gnome seems an old package in universe, we should perhaps find an alternative command to use)

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, it seems that "gpk-install-package-name" is some tool of packagekit-gnome which got deprecated in Ubuntu. Is there any chace to skip the use of the tool gracefully if it is not present, so that s-c-p in a non-Red-Hat environment will work smoothly?

It is used installpackage.py and newprinter.py.

Changed in system-config-printer (Ubuntu):
importance: Medium → High
Revision history for this message
Anton Skorokhod (kanocz) wrote :

After manualy installing smbclient (sudo apt-get install smbclient) problem is fixed

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Seems that system-config-printer uses "gpk-install-package-name" to install smbclient if it is not already installed.

Tim, am I right? Is there a way to get rid of this? To get a way which works in non-Red-Hat environments (instead of simply make the s-c-p package depend on smbclient)?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Seb, would it be a problem to simply let s-c-p depend on smbclient?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

"gpk-install-package-name" was removed from gnome-packagekit near one year ago:

https://git.gnome.org/browse/gnome-packagekit/commit/?id=bdeaf7f35511fa85d444deb9981d68e015acdea6

Tim, is Red Hat keeping it as a distro patch? Or is Red Hat using an old version of gnome-packagekit? Do you have any fix for the "gpk-install-package-name" calls in newprinter.py and installpackage.py?

Revision history for this message
Tim Waugh (twaugh) wrote :

Till, I've had this on my to-do list since comment #4, but it really is not top-priority for me. Please stop asking. :-)

Revision history for this message
Tim Waugh (twaugh) wrote :

I've pushed changes to 1.4.x to just remove that code (it's now just a stub).

If you'd like to re-implement it using asynchronous D-Bus calls to packagekitd, that would be useful.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Tim, thank you very much. I have applied this change and all of the simple bug fix patches on the GIT from after my last snapshot. This should fix this bug and several other bugs, especially also Python3 transition issues.

Changed in system-config-printer (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.1+20141010-0ubuntu2

---------------
system-config-printer (1.5.1+20141010-0ubuntu2) utopic; urgency=medium

  * debian/patches/35_more-debugging-output.patch,
    debian/patches/37_debugging-tidy-ups.patch: Additional debug output
    in the "--debug" modes of system-config-printer and scp-dbus-service
    (backported from upstream GIT).
  * debian/patches/40_monitor-only-run-one-timer-at-a-time.patch: monitor:
    only run one timer at a a time, avoids 'Source ID ... was not found'
    warnings (backported from upstream GIT).
  * debian/patches/43_dont-ask-packagekit-to-look-for-drivers-for-empty-device-ids.patch:
    Don't ask PackageKit to look for drivers for empty device IDs (backported
    from upstream GIT).
  * debian/patches/45_use-items-instead-of-iteritems-in-groupphysicaldevicesrequests-group.patch:
    Use items() instead of iteritems() with Python 3 dicts, especially use
    items() instead of iteritems() in GroupPhysicalDevicesRequest's _group()
    (backported from upstream GIT).
  * debian/patches/47_fix-for-automatically-adding-bluetooth-printers.patch:
    Fix for automatically adding Bluetooth printers. devpath could have been
    NULL at this point. Found with static analysis (backported from upstream
    GIT).
  * debian/patches/50_dont-run-gpk-install-package-name-directly-use-installpackage-module.patch:
    Don't run gpk-install-package-name directly, use installpackage module
    (backported from upstream GIT).
  * debian/patches/53_make-installpackage-a-stub-only.patch: Make
    installpackage a stub only. gpk-install-* executables no longer exist
    (backported from upstream GIT, LP: #1366756).
 -- Till Kamppeter <email address hidden> Tue, 14 Oct 2014 21:46:36 +0200

Changed in system-config-printer (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

system-config-printer 1.5.3+20141029 on Vivid does not only suppress the error message by taking out PackageKit-based package installation support but actually fixes the PackageKit-based package installation support and several other bugs in installation of missing printing stack packages for this functionality actually work again.

description: updated
Changed in system-config-printer (Ubuntu Utopic):
importance: Undecided → High
status: New → Triaged
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Uploaded a package fixing bug 1366756, bug 1156398, bug 1380514, and bug 1369789 to utopic-proposed. As soon as the package is approved it will be available for download and testing and instructions will get posted here. Please test the package and give your feedback here, otherwise it will not get available as official update.

To the SRU team: debdiff attached.

Changed in system-config-printer (Ubuntu Utopic):
status: Triaged → In Progress
Revision history for this message
Chris J Arges (arges) wrote : Please test proposed package

Hello puce, or anyone else affected,

Accepted system-config-printer into utopic-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/system-config-printer/1.5.1+20141010-0ubuntu2.1 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 system-config-printer (Ubuntu Utopic):
status: In Progress → Fix Committed
tags: added: verification-needed
Revision history for this message
Sebastien Bacher (seb128) wrote :

could somebody verify that this stable update fixes the issue?

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Puce, and anyone else having this problem, can you please test the proposed package? Thanks.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have tested the automatic installation of smbclient if it is missing when creating a queue to an SMB printer ("smb://..." URI) and it works perfectly. I am also using the fixed Utopic package on my Trusty and Utopic machines and they do not show any sign of regression. Marking as verified.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package system-config-printer - 1.5.1+20141010-0ubuntu2.1

---------------
system-config-printer (1.5.1+20141010-0ubuntu2.1) utopic-proposed; urgency=medium

  * debian/patches/60_newprinter-fix-package-installation.patch: Fixed several
    bugs in system-config-printers's facility to install missing packages of
    the printing stack (currently smbclient and libsane-hpaio. LP: #1366756).
  * debian/patches/63_ppdcache-return-exception-rather-than-looping.patch:
    Fixed infinite loop generating millions of links in /tmp when PPD file
    requested from a print queue is not readable (LP: #1156398).
  * debian/patches/65_fix-hp-fax-type-parsing.patch: Fix parsing of the HPLIP
    fax type (LP: #1369789).
  * debian/patches/67_jobviewer-always-fetch-auth-info-required-attribute.patch:
    jobviewer: Always fetch auth-info-required attribute (LP: #1380514).
 -- Till Kamppeter <email address hidden> Thu, 30 Oct 2014 18:21:36 +0100

Changed in system-config-printer (Ubuntu Utopic):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for system-config-printer 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 regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers