Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
mc: update to 4.8.29, cleanup, adopt.
Also convert scripts from python2 to python3.
- Loading branch information
1 parent
3197ebf
commit c41fdb5
Showing
3 changed files
with
137 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
MC has a number of "extfs" backend scripts to extend its functionality. | ||
They depend on various programs to work, which are not marked as dependencies of | ||
the mc package and must be installed manually for the backends to work properly. | ||
|
||
| Backend | Dependencies | | ||
| ------------------------------------------- | ---------------------------------------------------- | | ||
| `a+` DOS filesystem access | `perl mtools` | | ||
| `apt+` APT frontend (repository browser?) | `perl apt dpkg` | | ||
| `audio` browse audio cdroms+CDDB | `cdparanoia wget` | | ||
| `changesetfs` list git revs of curr. file | `git` | | ||
| `deb` .deb package viewer | `perl dpkg` | | ||
| `deba` APT frontend (deb browser/installer) | `perl apt dpkg` | | ||
| `debd` DPKG frontend (also deb browser) | `perl dpkg` | | ||
| `dpkg+` DPKG frontend | `perl dpkg` | | ||
| `gitfs+` git repo browser | `git` | | ||
| `iso9660` ISO9660 image browser | `xorriso cdrtools [common_archivers]` | | ||
| `lslR` "For browsing lslR listings" | `[common_archivers]` | | ||
| `mailfs` Mailbox browser | `[common_archivers] file perl-{TimeDate,Date-Manip}` | | ||
| `patchfs` patchfile explorer | `[common_archivers] file perl-TimeDate` | | ||
| `patchsetfs` list git patches of curr. file | `git` | | ||
| `rpm` RPM package viewer | `rpm` | | ||
| `rpms+` RPM frontend | `perl rpm` | | ||
| `trpm` RPM frontend | `rpm` | | ||
| `u7z` 7zip archive support | `7zip` | | ||
| `uar` AR archive support | `binutils` | | ||
| `uc1541` C64/128 disk image support | `python3 vice` | | ||
| `ucab` Microsoft CAB archive support | `cabextract` | | ||
| `ulib` gputils archive support | `perl gputils` | | ||
| `unar` unar wrapper | `unar` | | ||
| `urar` RAR archive support | `unrar` | | ||
| `uwim` Windows WIM archive support | `wimlib` | | ||
| `uzip` ZIP archive support | `perl zip unzip` | | ||
|
||
`[common_archivers]` refers to the following archivers/compressors: `bzip2 gzip lz4 lzip xz zstd`. | ||
|
||
Additionally, the following extfs plugins require programs that are not packaged on void. | ||
|
||
| Backend | Dependencies | | ||
| ----------------------------------------- | ----------------------------------- | | ||
| `bpp` "Bad Penguin" package management | Unknown executable: `package-setup` | | ||
| `hp48+` file manager for HP48 calculators | Unknown executable: `kermit` | | ||
| `s3+` AWS S3 client | Missing python pkg: `python3-boto` | | ||
| `uace` ACE archive support | Unknown executable: `unace` | | ||
| `ualz` ALZ archive support | Unknown executable: `unalz` | | ||
| `uarc` ARC archive support | Unknown executable: `arc` | | ||
| `uarj` ARJ archive support | Unknown executable: `arj` | | ||
| `uha` HA archive support | Unknown executable: `ha` | | ||
| `ulha` LHa archive support | Unknown executable: `lha` | | ||
| `uzoo` ZOO archive support | Unknown executable: `zoo` | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
Taken from https://src.fedoraproject.org/rpms/mc/blob/rawhide/f/mc-python3.patch | ||
Also see https://github.com/MidnightCommander/mc/pull/149 | ||
|
||
-- | ||
|
||
--- a/src/vfs/extfs/helpers/uc1541 | ||
+++ b/src/vfs/extfs/helpers/uc1541 | ||
@@ -1,4 +1,4 @@ | ||
-#!/usr/bin/env python | ||
+#!/usr/bin/env python3 | ||
""" | ||
UC1541 Virtual filesystem | ||
|
||
--- a/src/vfs/extfs/helpers/s3+.in | ||
+++ b/src/vfs/extfs/helpers/s3+.in | ||
@@ -1,4 +1,4 @@ | ||
-#! @PYTHON@ | ||
+#! /usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# | ||
@@ -153,16 +153,16 @@ | ||
Propagates exception safely. | ||
""" | ||
from threading import Thread | ||
- import Queue | ||
+ import queue | ||
|
||
items = list(iterable) | ||
nitems = len(items) | ||
if nitems < 2: | ||
- return map(fun, items) | ||
+ return list(map(fun, items)) | ||
|
||
# Create and fill input queue | ||
- input = Queue.Queue() | ||
- output = Queue.Queue() | ||
+ input = queue.Queue() | ||
+ output = queue.Queue() | ||
|
||
for i,item in enumerate(items): | ||
input.put( (i,item) ) | ||
@@ -181,7 +181,7 @@ | ||
output.put( (i,result) ) | ||
except: | ||
output.put( (None,sys.exc_info()) ) | ||
- except Queue.Empty: | ||
+ except queue.Empty: | ||
return | ||
|
||
# Start threads | ||
@@ -196,8 +196,8 @@ | ||
try: | ||
i,res = output.get() | ||
if i == None: | ||
- raise res[0],res[1],res[2] | ||
- except Queue.Empty: | ||
+ raise res[0](res[1]).with_traceback(res[2]) | ||
+ except queue.Empty: | ||
break | ||
ret.append(res) | ||
|
||
@@ -241,7 +241,7 @@ | ||
b = s3.get_bucket(name, validate=False) | ||
b.get_location() # just to raise an exception on error | ||
return b | ||
- except boto.exception.S3ResponseError, e: | ||
+ except boto.exception.S3ResponseError as e: | ||
# Seems this is the only proper way to switch to the bucket's region. | ||
# Requesting of the default region for "?location" does not work unfortunately. | ||
m = re.search(r'<Region>(.*?)</Region>', e.body) | ||
@@ -340,7 +340,7 @@ | ||
expr = re.compile(r'^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.\d{3}Z$') | ||
def convDate(awsdatetime): | ||
m = expr.match(awsdatetime) | ||
- ye,mo,da,ho,mi,se = map(int,m.groups()) | ||
+ ye,mo,da,ho,mi,se = list(map(int,m.groups())) | ||
|
||
dt = datetime.datetime(ye,mo,da,ho,mi,se, tzinfo=pytz.utc) | ||
return dt.astimezone(tz).strftime('%m-%d-%Y %H:%M') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters