summaryrefslogtreecommitdiff
path: root/app-misc/mc/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-08-02 19:14:55 +0100
commitb24bd25253fe093f722ab576d29fdc41d04cb1ee (patch)
tree0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /app-misc/mc/files
parent121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff)
gentoo resync : 02.08.2019
Diffstat (limited to 'app-misc/mc/files')
-rw-r--r--app-misc/mc/files/mc-4.8.23-3933-iso9660-1.patch85
-rw-r--r--app-misc/mc/files/mc-4.8.23-3933-iso9660-2.patch29
2 files changed, 114 insertions, 0 deletions
diff --git a/app-misc/mc/files/mc-4.8.23-3933-iso9660-1.patch b/app-misc/mc/files/mc-4.8.23-3933-iso9660-1.patch
new file mode 100644
index 000000000000..be08e68b296c
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.23-3933-iso9660-1.patch
@@ -0,0 +1,85 @@
+From afdc9719f3e37921b621046f01f23fe6b705f059 Mon Sep 17 00:00:00 2001
+From: Andrew Borodin <aborodin@vmail.ru>
+Date: Sun, 7 Jul 2019 14:44:10 +0300
+Subject: [PATCH 1/2] Ticket #3933: report iso9660 listing errors.
+
+Variation 1:
+
+Steps to reproduce:
+
+ * create empty .iso file (touch foo.iso)
+ * run 'mc' and press enter on empty .iso
+
+Expected result: some error about invalid file format (sililar to what
+F3 view would yield).
+Actual result: mc elters a file as if it would be empty valid file.
+
+Variation 2:
+Steps to reproduce:
+
+ * pick valid .iso file
+ * deinstall all helper tools that handle .sio (isoinfo, xorriso, etc.)
+ * run 'mc' and press enter on empty .iso
+
+Expected result: some error about invalid file format (sililar to what
+F3 view would yield)
+Actual result: mc enters a file as if it would be empty valid file
+
+Variation 2 is especially confusing for users as it does not hint them
+that they should install a tool to get it working. They just observe
+silently broken behaviour.
+
+Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
+---
+ src/vfs/extfs/helpers/iso9660.in | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+diff --git a/src/vfs/extfs/helpers/iso9660.in b/src/vfs/extfs/helpers/iso9660.in
+index 8c2240e8e..76273522e 100644
+--- a/src/vfs/extfs/helpers/iso9660.in
++++ b/src/vfs/extfs/helpers/iso9660.in
+@@ -93,6 +93,8 @@ xorriso_rm() {
+
+ # tested to comply with isoinfo 2.0's output
+ test_iso () {
++ which isoinfo 2>/dev/null || (echo "isoinfo not found" >&2; return 1)
++
+ CHARSET=$(locale charmap 2>/dev/null)
+ if test -z "$CHARSET"; then
+ CHARSET=$(locale 2>/dev/null | @GREP@ LC_CTYPE | sed -n -e 's/.*\.\(.*\)"$/\1/p')
+@@ -119,6 +121,8 @@ test_iso () {
+ }
+
+ mcisofs_list () {
++ local lsl r
++
+ # left as a reminder to implement compressed image support =)
+ case "$1" in
+ *.lz) MYCAT="lzip -dc";;
+@@ -133,7 +137,11 @@ mcisofs_list () {
+ *) MYCAT="cat";;
+ esac
+
+- $ISOINFO -l -i "$1" 2>/dev/null | @AWK@ -v SEMICOLON=$SEMICOLON '
++ lsl=$($ISOINFO -l -i "$1" 2>/dev/null)
++ r=$?
++ test $r -gt 0 && return $r
++
++ echo "$lsl" | @AWK@ -v SEMICOLON=$SEMICOLON '
+ BEGIN {
+ dir="";
+ # Pattern to match 8 first fields.
+@@ -183,8 +191,8 @@ shift
+ case "$cmd" in
+ list)
+ xorriso_list "$@" || {
+- test_iso "$@";
+- mcisofs_list "$@";
++ test_iso "$@" || exit 1
++ mcisofs_list "$@" || exit 1
+ }
+ exit 0
+ ;;
+--
+2.22.0
+
diff --git a/app-misc/mc/files/mc-4.8.23-3933-iso9660-2.patch b/app-misc/mc/files/mc-4.8.23-3933-iso9660-2.patch
new file mode 100644
index 000000000000..173def62eb0b
--- /dev/null
+++ b/app-misc/mc/files/mc-4.8.23-3933-iso9660-2.patch
@@ -0,0 +1,29 @@
+From c1b6d29b95a373108e8d03ac629dcb03fcec854c Mon Sep 17 00:00:00 2001
+From: Andrew Borodin <aborodin@vmail.ru>
+Date: Sun, 7 Jul 2019 15:51:28 +0300
+Subject: [PATCH 2/2] iso9660: report errors in copyout in case of isoinfo
+ usage.
+
+Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
+---
+ src/vfs/extfs/helpers/iso9660.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/vfs/extfs/helpers/iso9660.in b/src/vfs/extfs/helpers/iso9660.in
+index 76273522e..f9c6e50ef 100644
+--- a/src/vfs/extfs/helpers/iso9660.in
++++ b/src/vfs/extfs/helpers/iso9660.in
+@@ -222,8 +222,8 @@ case "$cmd" in
+ ;;
+ copyout)
+ xorriso_copyout "$@" || {
+- test_iso "$@";
+- mcisofs_copyout "$@";
++ test_iso "$@" || exit 1
++ mcisofs_copyout "$@" || exit 1
+ }
+ exit 0
+ ;;
+--
+2.22.0
+