GNOME Bugzilla – Bug 482560
totem-like plugin installer for file-roller
Last modified: 2010-04-12 07:56:57 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:
an ubuntu user submitted a patch to our report: http://launchpadlibrarian.net/15170678/50_installhook.patch
*** Bug 478235 has been marked as a duplicate of this bug. ***
+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".
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.
Does this patch work on every distribution ? If not, a better solution would be to use PackageKit.
Yes, it should work without any problem.
i was about to fill a similar bug report it would be great to have this
It should definitely use gnome-packagekit for that.
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
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.
*** Bug 562859 has been marked as a duplicate of this bug. ***
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.
(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?
(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)
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?
(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
*** Bug 605393 has been marked as a duplicate of this bug. ***
2.30 was released with File Roller supporting PackageKit for installing missing archives. I believe this bug can be closed now.
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?
(In reply to comment #19) It's likely that the Ubuntu package is not compiled with package-kit support.