Bug 349038 - Ark should offer a solution when some packages are not found
Summary: Ark should offer a solution when some packages are not found
Status: RESOLVED DUPLICATE of bug 232856
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 2.18
Platform: Other Other
: NOR minor
Target Milestone: ---
Assignee: Raphael Kubo da Costa
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-11 18:26 UTC by kono93
Modified: 2015-10-25 22:46 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kono93 2015-06-11 18:26:40 UTC
I wanted to compress some files in dolphin to a rar-files and went to right click -> compress -> "to rar-file". I did not have the package "rar" installed (why then does Dolphin show this? It should be possible to check for that) and Ark opened with the message "Failed to locate program rar in PATH.". When I installed this, it worked fine, but the problem is: I am an advanced user. Normal users would be challenged by this. 

There should be a message like "Failed to locate program rar in PATH. Install it with sudo apt-get install rar" or even better: "Failed to locate program rar in PATH. Do you want the package to be installed?". This would greatly improve a normal user's experience. I believe there should be a normalized way of doing those kinds of installations, though this is the first time I experienced this.

Reproducible: Always

Steps to Reproduce:
1. Use a system without rar installed
2. Try to compress files to rar with the dolphin "compress"-menu

Actual Results:  
A message popped up telling me "Failed to locate program rar in PATH"

Expected Results:  
It should tell me how I install rar or even better ask me if this should be installed for my automatically.
Comment 1 kono93 2015-06-11 18:38:58 UTC
Such an easy script could do the job generally (at least kind of, some improvements are still needed of course).

#!/usr/bin/perl

use strict;
use warnings;

unless (qx(whereis apt-cache)) {
        warn "Cannot use apt-cache\n";
        exit 0;
}

my $this_program = shift;
exit 1 unless $this_program;
$this_program =~ s/[^\w\d-]//g;
my $apt_cache = qx(apt-cache search "^$this_program\$");
if($apt_cache) {
        warn "$this_program found!\n";
        exit 2;
}

warn "$this_program not found.\n";
exit 3;
Comment 2 Elvis Angelaccio 2015-10-20 15:30:14 UTC
How do you suggest to handle all the different package managers that are around? I do agree that the rar service menu should not be displayed if rar is not installed, though. In that case a novice user would just choose tar or zip and would not even notice that rar is not installed.
Comment 3 Elvis Angelaccio 2015-10-25 22:46:52 UTC
BTW, there is already a similar report.

*** This bug has been marked as a duplicate of bug 232856 ***