Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mc does not support autodetection for extfs - problem with different formats of .ipk files (now with patch) #2997

Open
mc-butler opened this issue Apr 6, 2013 · 4 comments
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress ver: 4.7.0 Reproducible in version 4.7.0

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/2997
Reporter cracket (cracket@….sourceforge.net)
Keywords ipk, ar, tar, vfs

There is a problem with .ipk files support in mc, mainly because one extension .ipk can have two different formats. First format is tar.gz archive which is currently supported by mc. However second format is based on ar, and archives in this format are provided by some openembedded distributions. Unfortunatelly ar does not support tar archives and vice versa.

To support both formats with same extension mc should have sort of "autodetection" or fallback if first extension returned with error code, because currently trying to browse or "enter" ipk archive triggers error:

tar: To nie wygląda jak archiwum tar
tar: Przeskoczenie do następnego nagłówka
tar: Zakończenie w stanie błędu z powodu uprzednich błędów

or without my polish locale:

tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Short workaround for supporting ar ipk files is to put in mc.ext section:

regex/\.ipk$
        Open=%cd %p#uar
        View=%view{ascii} ar t %f

and remove ipk from other sections

I attach "ar" ipk example file, the examples of "tar" ipk files are attached here: #2925

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by cracket (cracket@….sourceforge.net) on Apr 6, 2013 at 18:44 UTC

ar format of ipk installation package

@mc-butler
Copy link
Author

Changed by chown (chris@….co.uk) on Aug 12, 2014 at 8:40 UTC (comment 1)

Attaching a patch for a more complete fix, adding handler for both types of ipk. If the ipk is a gzip file we handle as tar.gz, otherwise we handle as deb file. Tested with open and view operations. One side effect is that corrupt tar.gz format ipk files will give a deb file error.

Patch file: 2997_ipk_extfs_improvements.diff
Files changed:

misc/ext.d/package.sh
misc/mc.ext.in

Files added:

src/vfs/extfs/helpers/ipk

Please be aware if you want to test this that you need to remove your ~/.config/mc/mc.ext file to get the top level changes.

@mc-butler
Copy link
Author

Changed by chown (chris@….co.uk) on Aug 12, 2014 at 8:40 UTC

Patch with more complete fix for #2997

@mc-butler
Copy link
Author

Changed by chown (chris@….co.uk) on Aug 12, 2014 at 8:41 UTC (comment 2)

  • Summary changed from mc does not support autodetection for extfs - problem with different formats of .ipk files to mc does not support autodetection for extfs - problem with different formats of .ipk files (now with patch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: medium Has the potential to affect progress ver: 4.7.0 Reproducible in version 4.7.0
Development

No branches or pull requests

1 participant