crashes when installing packages from non ascii folders

Bug #347327 reported by Laur Mõtus
30
This bug affects 3 people
Affects Status Importance Assigned to Milestone
packagekit (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

UPDATE:
Affects both kpackagekit and packagekit-gnome

Kpackagekit crashes when installing packages from folders with non ascii names:

kpackagekit /home/kasutaja/Töö/knemo_0.5.1-0~getdeb1_i386.deb
isFIle
kasutaja@ARLA32:~$ New transaction with tid "/27_badbbbac_data"
KPackageKit(5091) KpkIcons::actionIcon: action unrecognised: 9
enumFromString ( State ) : converted "" to "" , enum value -1
KPackageKit(5091) KpkTransaction::errorCode: errorCode: 3 "Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/packagekit/daemonBackend.py", line 109, in run
    threading.Thread.run(self)
  File "/usr/lib/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/packagekit/aptDBUSBackend.py", line 168, in wrapper
    func(*args, **kwargs)
  File "/usr/lib/packagekit/aptDBUSBackend.py", line 1261, in doInstallFiles
    deb = debfile.DebPackage(path, self._cache)
  File "/usr/lib/packagekit/debfile.py", line 53, in __init__
    self.open(filename)
  File "/usr/lib/packagekit/debfile.py", line 58, in open
    if not apt_inst.arCheckMember(open(self.filename), "debian-binary"):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 16-17: ordinal not in range(128)
"
KPackageKit(5091) KpkTransaction::finished: Failed.
KPackageKit(5091) KpkTransaction::finished: Yep, we failed.
KPackageKit(5091) KpkInstallFiles::installFilesFinished: Finished.
removing transaction from pool : "/27_badbbbac_data"

This occurs with letters such as ö, ä, ü, õ and it is important since for example "Desktop" is "Töölaud" in Estonian and "Työpöytä" in Finnish.

Related branches

Revision history for this message
Savvas Radevic (medigeek) wrote :

Same with:
gpk-install-local-file töölaud/themonospot_0.7.1.1-1~getdeb2_all.deb

Traceback (most recent call last):
  File "/usr/lib/python2.6/dist-packages/packagekit/daemonBackend.py", line 109, in run
    threading.Thread.run(self)
  File "/usr/lib/python2.6/threading.py", line 477, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/packagekit/aptDBUSBackend.py", line 168, in wrapper
    func(*args, **kwargs)
  File "/usr/lib/packagekit/aptDBUSBackend.py", line 1261, in doInstallFiles
    deb = debfile.DebPackage(path, self._cache)
  File "/usr/lib/packagekit/debfile.py", line 53, in __init__
    self.open(filename)
  File "/usr/lib/packagekit/debfile.py", line 58, in open
    if not apt_inst.arCheckMember(open(self.filename), "debian-binary"):
UnicodeEncodeError: 'ascii' codec can't encode characters in position 22-23: ordinal not in range(128)

Revision history for this message
Savvas Radevic (medigeek) wrote :

$ dpkg -S /usr/lib/packagekit/debfile.py
packagekit-backend-apt: /usr/lib/packagekit/debfile.py

$ apt-cache show packagekit-backend-apt
Package: packagekit-backend-apt
Source: packagekit

$ apt-cache policy packagekit-backend-apt
packagekit-backend-apt:
  Installed: 0.3.14-0ubuntu4
  Candidate: 0.3.14-0ubuntu4
  Version table:
 *** 0.3.14-0ubuntu4 0
        500 http://archive.ubuntu.com jaunty/main Packages
        100 /var/lib/dpkg/status

Changed in packagekit (Ubuntu):
status: New → Confirmed
Changed in packagekit (Ubuntu):
importance: Undecided → Medium
description: updated
summary: - kpackagekit crashes when installing packages from non ascii folders
+ crashes when installing packages from non ascii folders
Revision history for this message
Jimhu (huyiwei) wrote :

I can confirm this. But on my system, when i install a package from a Chinese folder, Kpackagekit just says that it can't find the package. The error output is misleading.

Revision history for this message
Lauri Võsandi (lauri-vosandi) wrote :

Hi,

Estobuntu team fixed the problem!

Lauri Võsandi

Revision history for this message
Laur Mõtus (vprints) wrote :

Could Savvas Radevic and Jimhu or others who have had the same problem please confirm whether this patch works or not?
Thankyou!

Revision history for this message
Savvas Radevic (medigeek) wrote :

I tried it and it works. It's quite trivial (for a developer) to test it. :)
These are the steps for gnome:

sudo apt-get -y install packagekit-gnome
cd
wget http://launchpadlibrarian.net/26683813/packagekit-utf8-fix.patch -O packagekit-utf8-fix.patch
cd /usr/lib
sudo patch -p0 < $HOME/packagekit-utf8-fix.patch

cd
mkdir -p "töölaud"
wget http://http.us.debian.org/debian/pool/main/t/themonospot/themonospot_0.7.1.1-2_all.deb -O "töölaud/themonospot_0.7.1.1-2_all.deb"
gpk-install-local-file "töölaud/themonospot_0.7.1.1-2_all.deb"

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

This bug was fixed in the package packagekit - 0.4.9+20090825-0ubuntu1

---------------
packagekit (0.4.9+20090825-0ubuntu1) karmic; urgency=low

  * New upstream snapshot provding a lot of APT backend improvements:
    - Allow to install updates which require the installation of additional
      packages. Updates depending on the removal of a package are still
      blocked (LP: #342671, LP: #374011, LP: #374011)
    - Warn about the installation of untrusted package (LP: #256245)
    - Don't crash in APT post update hook if system D-Bus daemon isn't
      running (LP: #388623)
    - Don't try to estimate a download progress during cache updating, since
      APT reports only a forth- and backwards running progress. (LP: #348053)
    - Support for python-apt 0.7.12 (LP: #415993)
    - Translated package descriptions
  * debian/patches:
    - Remove ignore_packages_in_conffile (Merged upstream)
    - Remove fix_typo (Merged upstream)
    - Add fix_unicode: Handle the encoding messages via stdin/stdout correctly
      (LP: #396513)
    - Add fix_unicode_debfile: Convert the path of the local file which
      should be installed to the correct encoding (LP: #347327)
  * debian/libpackagekit-qt-dev.install: Fix install location of CMake module.
    Thanks to Sveinung Kvilhaugsvik (LP: #345706)
  * debian/control: Fix spelling of Qt. Thanks to Sveinung Kvilhaugsvik
    (LP: #378419)

 -- Sebastian Heinlein <email address hidden> Tue, 25 Aug 2009 13:03:26 +0200

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

Remote bug watches

Bug watches keep track of this bug in other bug trackers.