Re: [BUG] urar extfs in mc-4.6.0-pre2

* Dmitry Semyonov <Dmitry Semyonov oktet ru> [Mon, 30 Dec 2002]:
> I have only unrar installed. This shall be enough to brouse rar
> archives and to extract files from them.  I'll try to upgrade to
> unrar 3.x (after Jan,9), and see how it works.  But even if it
> will work, do you think it is OK to use such unrar detection
> code that can't properly detect old versions of unrar inside
> urar extfs script?

The problem is not that mc can't find the unrar executable.

There is a bug in the new urar script.

The pre1 version of the script goes like:

UNRAR=$DRAR/unrar # Prefer unrar (freeware)

The pre2 version goes like:

UNRAR=unrar # Prefer unrar (freeware)
if ! unrar >/dev/null 2>&1; then

Therefore it fails if the rar executable is not present in the
system, because the "if ! unrar" test always fails. It always
fails, because unrar exits with code "7" if it is called with no

Both the rar and unrar executables are installed by default if you
use the above mentioned version 3 of the rar package. It's
probably the easiest solution for you now. But the urar script of
course should be fixed.

The bugfix patch is attached to this message.

Tomas Styblo <tripie cpan org>
diff -purN mc-4.6.0-pre2/vfs/extfs/
--- mc-4.6.0-pre2/vfs/extfs/	Thu Dec 12 15:08:25 2002
+++	Mon Dec 30 00:57:01 2002
@@ -6,17 +6,22 @@
 #            Andrew V. Samoilov <sav bcs zp ua> 2000
 # beta version 2.0
-UNRAR=unrar # Prefer unrar (freeware)
+RAR=`which rar 2>/dev/null`
+UNRAR=`which unrar 2>/dev/null` # Prefer unrar (freeware)
 # NOTE: rar ver 2.0 by Eugene Roshal
-if ! unrar >/dev/null 2>&1; then
+if test -z "$UNRAR"; then
+if test -z "$UNRAR"; then
+    echo "Cannot find unrar or rar executable in PATH" >&2 
+    exit 1
 mcrarfs_list ()
      $UNRAR v -c- "$1" | @AWK@ -v uid=${UID-0} '

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]