After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 482560 - totem-like plugin installer for file-roller
totem-like plugin installer for file-roller
Status: RESOLVED FIXED
Product: file-roller
Classification: Applications
Component: general
2.20.x
Other All
: Normal enhancement
: ---
Assigned To: Paolo Bacchilega
file-roller-maint
: 478235 562859 605393 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2007-10-02 12:40 UTC by Jonathan Ernst
Modified: 2010-04-12 07:56 UTC
See Also:
GNOME target: ---
GNOME version: 2.19/2.20


Attachments
Patch that offers you to install the package needed (9.28 KB, patch)
2008-10-10 19:59 UTC, Pablo Castellano (IRC: pablog)
none Details | Review

Description Jonathan Ernst 2007-10-02 12:40:50 UTC
When opening an unsupported archive type using file roller, it would be better to tell the user that the archive type is not supported by his system and to provide him a list of package to be downloaded and installed automatically if he chooses to.

Each distribution could provide it's own way to install missing (un)archivers or choose to don't provide any mechanism to do it (in this case the current error message would be shown).

This would help users who are trying to open rar, 7zip and so on archives.

This could be implemented in the same manner as the new totem releases.

Other information:
Comment 1 Pedro Villavicencio 2008-06-10 13:55:39 UTC
an ubuntu user submitted a patch to our report:

http://launchpadlibrarian.net/15170678/50_installhook.patch
Comment 2 Paolo Bacchilega 2008-06-11 07:58:11 UTC
*** Bug 478235 has been marked as a duplicate of this bug. ***
Comment 3 John Pye 2008-07-03 12:00:52 UTC
+1 for this.

Even if you can't modify the system to suggest a certain user action, it should at least be changed so that File Roller says something clearer like "The required program 'xxxxx' was not found, so this file format can not be opened at present. If you can install this program, File Roller will then work as expected".

Comment 4 Pablo Castellano (IRC: pablog) 2008-10-10 19:59:23 UTC
Created attachment 120359 [details] [review]
Patch that offers you to install the package needed 

I have adapted the patch of Sergey (see comment #1) to the latest intrepid version of file-roller (2.24.0-0ubuntu1) :).
This is my first patch (well and it's not mine...), so someone with experience should revise it.
The only thing that is missing in this patch2.0 is the part of the translation to russian. I have not added it because gedit doesn't display the characters :? By the moment, it works.

I hope it's useful.
Good bye.
Comment 5 Paolo Bacchilega 2008-10-11 08:25:06 UTC
Does this patch work on every distribution ?  If not, a better solution would be to use PackageKit.
Comment 6 Pablo Castellano (IRC: pablog) 2008-10-11 09:18:33 UTC
Yes, it should work without any problem.
Comment 7 antistress 2008-11-23 12:03:40 UTC
i was about to fill a similar bug report

it would be great to have this
Comment 8 Bastien Nocera 2009-10-21 23:26:49 UTC
It should definitely use gnome-packagekit for that.
Comment 9 Richard Hughes 2009-10-22 07:55:03 UTC
Sure, there are basically two ways of using PackageKit. The system way, where you handle all interaction yourself, and have to get involved with GPG signing and that sort of thing, or just use the session interface, which is simple and gets the job done. See http://www.packagekit.org/pk-faq.html#session-methods and grab me on irc or send mail to the PackageKit mailing list if you get stuck. The full list of session methods is here: http://git.gnome.org/cgit/gnome-packagekit/plain/src/org.freedesktop.PackageKit.xml
Comment 10 Paolo Bacchilega 2009-10-23 17:36:25 UTC
The master branch contains the code to install the missing packages with packagekit, however on my system (ubuntu 9.10) packagekit gives an error and doesn't install the required packages.  I'd appreciate if someone could do some test to see how it works.
Comment 11 Paolo Bacchilega 2009-10-25 08:10:51 UTC
*** Bug 562859 has been marked as a duplicate of this bug. ***
Comment 12 Stéphane Démurget 2009-11-19 09:40:43 UTC
Maybe I did not understand the patch, but it seems to rely on the package names, wouldn't it make more sense to ask package kit installation through mime types, since you already have them? It's easier and will not break on distribution naming differences.
Comment 13 Bastien Nocera 2009-11-19 11:16:43 UTC
(In reply to comment #12)
> Maybe I did not understand the patch, but it seems to rely on the package
> names, wouldn't it make more sense to ask package kit installation through mime
> types, since you already have them? It's easier and will not break on
> distribution naming differences.

That would just install file-roller :)

Giving out the command itself would work for some distributions as well, as they could say "install the package providing /usr/bin/<binary name>".

A better idea, IMO, would be to move this configuration to a file that could be modified by distributions to tell which packages contains which binary.

Furthermore, the unstuff name is "unstaff" in those patches:
http://git.gnome.org/cgit/file-roller/commit/?id=389f251cfdd273bec4de61ec858e4f52e3aa04d8

Paolo, what error does PackageKit give you? Where is it your code fails?
Comment 14 Paolo Bacchilega 2009-11-19 19:32:21 UTC
(In reply to comment #13)
> Paolo, what error does PackageKit give you? Where is it your code fails?

it's a dbus error with the following message:
Message did not receive a reply (timeout by message bus)
Comment 15 Bastien Nocera 2009-11-19 19:44:32 UTC
Is gpk-update-icon running? Does poking it through its D-Bus interface using d-feet work? Can you see your messages being sent through dbus-monitor?
Comment 16 Paolo Bacchilega 2009-11-20 10:31:20 UTC
(In reply to comment #15)

note that an error occurs even if I try to install a package using gpk-application.

> Is gpk-update-icon running? 

yes

>Does poking it through its D-Bus interface using d-feet work? 

no it gives this error:

'org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.'


>Can you see your messages being sent through dbus-monitor?

this is the dbus-monitor output:

method call sender=:1.84 -> dest=:1.27 serial=116 path=/org/freedesktop/PackageKit; interface=org.freedesktop.PackageKit.Modify; member=InstallPackageNames
   uint32 0
   array [
      string "rar"
      string "unrar"
   ]
   string ""
method call sender=:1.27 -> dest=org.freedesktop.DBus serial=41 path=/org/freedesktop/DBus/Bus; interface=org.freedesktop.DBus; member=GetConnectionUnixProcessID
   string ":1.84"
method call sender=:1.27 -> dest=:1.3 serial=42 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "gpk-update-icon"
   uint32 0
   string "È in esecuzione una transazione che non può essere interrotta"
   uint32 4
signal sender=:1.3 -> dest=(null destination) serial=73 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor1"
method return sender=:1.3 -> dest=:1.27 reply_serial=42
   uint32 1741076566
method call sender=:1.40 -> dest=:1.3 serial=33 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.3 -> dest=:1.40 reply_serial=33
   boolean false
method call sender=:1.27 -> dest=:1.3 serial=43 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.3 -> dest=:1.27 reply_serial=43
   boolean false
method call sender=:1.27 -> dest=:1.3 serial=44 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Uninhibit
   uint32 1741076566
signal sender=:1.3 -> dest=(null destination) serial=77 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorRemoved
   object path "/org/gnome/SessionManager/Inhibitor1"
method return sender=:1.3 -> dest=:1.27 reply_serial=44
method call sender=:1.40 -> dest=:1.3 serial=34 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method call sender=:1.27 -> dest=:1.3 serial=45 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.3 -> dest=:1.40 reply_serial=34
   boolean false
method return sender=:1.3 -> dest=:1.27 reply_serial=45
   boolean false
method call sender=:1.27 -> dest=:1.3 serial=46 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Inhibit
   string "gpk-update-icon"
   uint32 0
   string "È in esecuzione una transazione che non può essere interrotta"
   uint32 4
signal sender=:1.3 -> dest=(null destination) serial=81 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorAdded
   object path "/org/gnome/SessionManager/Inhibitor2"
method return sender=:1.3 -> dest=:1.27 reply_serial=46
   uint32 155113796
method call sender=:1.27 -> dest=:1.3 serial=47 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method call sender=:1.40 -> dest=:1.3 serial=35 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.3 -> dest=:1.27 reply_serial=47
   boolean false
method return sender=:1.3 -> dest=:1.40 reply_serial=35
   boolean false
method call sender=:1.27 -> dest=:1.3 serial=48 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=Uninhibit
   uint32 155113796
signal sender=:1.3 -> dest=(null destination) serial=85 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=InhibitorRemoved
   object path "/org/gnome/SessionManager/Inhibitor2"
method return sender=:1.3 -> dest=:1.27 reply_serial=48
method call sender=:1.27 -> dest=:1.3 serial=49 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method call sender=:1.40 -> dest=:1.3 serial=36 path=/org/gnome/SessionManager; 
interface=org.gnome.SessionManager; member=IsInhibited
   uint32 8
method return sender=:1.3 -> dest=:1.27 reply_serial=49
   boolean false
method return sender=:1.3 -> dest=:1.40 reply_serial=36
   boolean false
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=10 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string "org.freedesktop.PackageKit"
   string ":1.27"
   string ""
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=11 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.27"
   string ":1.27"
   string ""
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=12 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.48"
   string ":1.48"
   string ""
method call sender=:1.73 -> dest=org.freedesktop.DBus serial=389 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=RemoveMatch
   string "type='signal',sender=':1.48',path='/org/freedesktop/indicate',interface='org.freedesktop.indicator'"
signal sender=:1.3 -> dest=(null destination) serial=89 path=/org/gnome/SessionManager; interface=org.gnome.SessionManager; member=ClientAdded
   object path "/org/gnome/SessionManager/Client12"
signal sender=org.freedesktop.DBus -> dest=(null destination) serial=13 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameOwnerChanged
   string ":1.89"
   string ""
   string ":1.89"
method call sender=:1.89 -> dest=org.freedesktop.DBus serial=1 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=Hello
method call sender=:1.84 -> dest=org.freedesktop.DBus serial=117 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=GetConnectionUnixProcessID
   string ":1.89"
method call sender=:1.73 -> dest=org.freedesktop.DBus serial=390 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=AddMatch
Comment 17 Paolo Bacchilega 2009-12-24 23:25:38 UTC
*** Bug 605393 has been marked as a duplicate of this bug. ***
Comment 18 Tomasz Torcz 2010-04-10 13:42:49 UTC
2.30 was released with File Roller supporting PackageKit for installing missing archives. I believe this bug can be closed now.
Comment 19 Martin Mai 2010-04-11 13:10:06 UTC
I tried it with an up-to-date Ubuntu 10.04, which includes

file-roller 2.30
packagekit-gnome 2.29.2
packagekit 0.5.7

but I was not able to open .rar or .7z archives, without having to install "unrar" or "p7zip" manually. file-roller always gave me "Archive type not supported", but no offer to automatically install archive support for that types.

Any idea?
Comment 20 Paolo Bacchilega 2010-04-12 07:56:57 UTC
(In reply to comment #19)

It's likely that the Ubuntu package is not compiled with package-kit support.