summaryrefslogtreecommitdiffstats
path: root/perl-install/scanner.pm
diff options
context:
space:
mode:
authorTill Kamppeter <tkamppeter@mandriva.com>2004-03-01 14:47:19 +0000
committerTill Kamppeter <tkamppeter@mandriva.com>2004-03-01 14:47:19 +0000
commit4bd0efc9df913ed36e7c4d489638e5e9f549ea16 (patch)
treea8e0bae133472a62663273337c1951290452dc08 /perl-install/scanner.pm
parente30a9a7df53233d466e1ed5ff9f98a7644828909 (diff)
downloaddrakx-4bd0efc9df913ed36e7c4d489638e5e9f549ea16.tar
drakx-4bd0efc9df913ed36e7c4d489638e5e9f549ea16.tar.gz
drakx-4bd0efc9df913ed36e7c4d489638e5e9f549ea16.tar.bz2
drakx-4bd0efc9df913ed36e7c4d489638e5e9f549ea16.tar.xz
drakx-4bd0efc9df913ed36e7c4d489638e5e9f549ea16.zip
Fixed bug #7242: Firmware was not found by "gt68xx" SANE backend.
Diffstat (limited to 'perl-install/scanner.pm')
-rwxr-xr-xperl-install/scanner.pm14
1 files changed, 13 insertions, 1 deletions
diff --git a/perl-install/scanner.pm b/perl-install/scanner.pm
index c73057d91..819ae84e2 100755
--- a/perl-install/scanner.pm
+++ b/perl-install/scanner.pm
@@ -87,7 +87,7 @@ sub setfirmware {
sub installfirmware {
# Install the firmware file in /usr/share/sane/firmware
- my ($firmware) = @_;
+ my ($firmware, $backend) = @_;
return "" if !$firmware;
# Install firmware
run_program::rooted($::prefix, "mkdir", "-p",
@@ -96,6 +96,18 @@ sub installfirmware {
N("Could not create directory /usr/share/sane/firmware!"));
return "";
};
+ # Link /usr/share/sane/firmware to /usr/share/sane/<backend name> as
+ # some backends ignore the supplied absolute path to the firmware file
+ # and always search their own directory
+ if ($backend) {
+ run_program::rooted($::prefix, "ln", "-sf",
+ "/usr/share/sane/firmware",
+ "/usr/share/sane/$backend") || do {
+ $in->ask_warn('Scannerdrake',
+ N("Could not create link /usr/share/sane/%s!", $backend));
+ return "";
+ };
+ }
run_program::rooted($::prefix, "cp", "-f", "$firmware",
"/usr/share/sane/firmware") || do {
$in->ask_warn('Scannerdrake',