Accepting request 128775 from home:subchaser

use uar extfs helper as fall-back for deb

OBS-URL: https://build.opensuse.org/request/show/128775
OBS-URL: https://build.opensuse.org/package/show/Base:System/mc?expand=0&rev=53
This commit is contained in:
OBS User mrdocs 2012-07-24 00:04:41 +00:00 committed by Git OBS Bridge
parent 8c889281f6
commit 9aec29ef3d
3 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,39 @@
--- src/vfs/extfs/helpers/deb.in.orig 2012-04-20 11:21:37.000000000 +0400
+++ src/vfs/extfs/helpers/deb.in 2012-07-23 17:21:47.000000000 +0400
@@ -176,6 +176,15 @@
}
}
+sub _which
+{
+ my $app = shift;
+ foreach my $dir (split/:/, $ENV{'PATH'}) {
+ return "$dir/$app" if -x "$dir/$app";
+ }
+ return undef;
+}
+
$pressinstall=<<EOInstall;
WARNING
@@ -192,6 +201,20 @@
umask 077;
+
+# check for required dpkg utilities
+my $dpkg_deb = _which('dpkg-deb');
+my $dpkg = _which('dpkg');
+
+# use uar extfs-heper if not exists
+if (not defined $dpkg_deb or not defined $dpkg)
+{
+ if ($0 =~ /^(.*)\/deb$/) {
+ my $uar = "$1/uar" ;
+ exec $uar, @ARGV;
+ }
+}
+
if($ARGV[0] eq "list") { shift; &mcdebfs_list(@ARGV); exit 0; }
elsif($ARGV[0] eq "copyout") { shift; &mcdebfs_copyout(@ARGV); exit 0; }
elsif($ARGV[0] eq "run") { shift; &mcdebfs_run(@ARGV); exit 0; }

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Mon Jul 23 13:35:04 UTC 2012 - subchaser1@gmail.com
- extfs deb helper: execute uar helper as fall-back if deb utilities is not installed
------------------------------------------------------------------- -------------------------------------------------------------------
Sat Jul 21 10:54:16 UTC 2012 - subchaser1@gmail.com Sat Jul 21 10:54:16 UTC 2012 - subchaser1@gmail.com

View File

@ -41,6 +41,7 @@ Patch12: mc-wrapper.patch
Patch16: mc-esc-seq.patch Patch16: mc-esc-seq.patch
Patch17: mc-rpm.patch Patch17: mc-rpm.patch
Patch20: mc-f-keys.patch Patch20: mc-f-keys.patch
Patch21: mc-extfs-helpers-deb.patch
#debian fixes for vfs #debian fixes for vfs
Patch24: 02_ignore_ftp_chmod_error.patch Patch24: 02_ignore_ftp_chmod_error.patch
#Debian fixes #Debian fixes
@ -115,6 +116,7 @@ target directory.
%patch17 %patch17
%patch18 %patch18
%patch20 %patch20
%patch21
%patch24 %patch24
%patch31 %patch31
%patch32 %patch32