Kubuntu Package Installer (GDebiKDE) says "Package File Does Not Exist" when trying to install a deb that's in a directory that has a space in it's name.

Bug #152856 reported by Joe
26
Affects Status Importance Assigned to Milestone
gdebi (Ubuntu)
Fix Released
Medium
Unassigned
Nominated for Hardy by Laur Mõtus
Nominated for Intrepid by Laur Mõtus

Bug Description

As the summary says, the Kubuntu Package Installer (GDebiKDE) says "Package File Does Not Exist" when trying to install a deb that's in a directory that has a space in it's name. However, if there is no space in the folder name, it will work just fine. This should be fixed before the final release (i hope). I'm using Kubuntu 7.10 RC.

Tags: patch

Related branches

Revision history for this message
Daniel Hahler (blueyed) wrote :

Confirmed for gdebi-kde, but not gdebi-gtk.

The bug is triggered when there's a space in the file's path, e.g.
LANG=C gdebi-kde toshutils_2.0.1-19_i386.deb

The error is:
The package file does not exist
A nonexistent file has been selected for installation. Please select an existing .deb package file.

Revision history for this message
jalvan (joseph-alvan) wrote :

also happens if the name of the library is not in ENG (i'm using Hebrew)

Revision history for this message
Roderick B. Greening (roderick-greening) wrote :

The fix is unbelievably simple.

Patch attached and here's the change.. a one liner, simply add the following line immediately after it reads the filename from the command line (args[0]). The line replaces a space with '\ ' which is the proper path expansion for directories with spaces in the filenames. Not sure if there's a more gramatically correct way to do this, but this works.

         afile.replace(' ', '\\ ')

So, with the attached patch, this can be fixed and applied to package.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thanks for your patch.

I rather think, that rather GDebiKDE (where afile gets passed to) should handle it instead. But what do I know? ;)

Daniel Hahler (blueyed)
Changed in gdebi:
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Ulrik Mikaelsson (rawler) wrote :

Just tried this on latest Hardy, and could not reproduce. Guess it would be possible to back-track the changes, but I'm not enough familiar with deb/ubuntu packaging to know where to look.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Ulrik, are you sure you've tried it using gdebi-kde and actually installed the package?
Because I just could reproduce it still.

Revision history for this message
Adam Spain (adamspain) wrote :

Since bug #209831 is now fixed so kdesudo copes with spaces in arguments, I think this can be fixed. The patch above didn't fix it for me on hardy though, so I've made a very minor change to GDebiKDE.py. I don't know how it affects the issue using Hebrew, but I guess that should be filed as a separate bug.

It would be nice to get this in hardy, but with the archive now being frozen I'm not sure if it would get in.

Revision history for this message
Daniel Hahler (blueyed) wrote :

Thanks for your fix, Adam.
I've wrapped it in a debdiff.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gdebi - 0.3.8

---------------
gdebi (0.3.8) hardy; urgency=low

  * GDebi/GDebiKDE.py:
    Fix installation of .deb packages with spaces in the filename;
    Patch from Adam Spain (LP: #152856)

 -- Daniel Hahler <email address hidden> Sat, 19 Apr 2008 19:26:08 +0200

Changed in gdebi:
status: Triaged → Fix Released
Revision history for this message
Laur Mõtus (vprints) wrote :

Confirmed on both up-to-date Hardy and Interpid

Changed in gdebi:
status: Fix Released → Confirmed
Revision history for this message
Laur Mõtus (vprints) wrote :

I am very sorry, I accidently modified a bug in a wrong tab.
Sorry again!

Changed in gdebi:
status: Confirmed → 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.