Page MenuHomeSoftware Heritage

tarball: Try to guess archive format from mime type as last resort
ClosedPublic

Authored by anlambert on Sep 17 2021, 5:29 PM.

Details

Summary

Some archive files do not have any extension but we can guess their
format by getting their mime types.

So add a last resort processing step to get archive format from mime
type prior trying to extract it.

This will fix all these opam loader related errors.

Related to T3468

Diff Detail

Repository
rDCORE Foundations and core functionalities
Branch
tarball-format-from-mime-type
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 23814
Build 37133: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 37132: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D6301 (id=22880)

Rebasing onto 0ef57a4dd3...

Current branch diff-target is up to date.
Changes applied before test
commit 65472c6de6957b2953af05b6ce036374483a2f66
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 17 17:19:24 2021 +0200

    tarball: Try to guess archive format from mimetype as last resort
    
    Some archive files do not have any extension but we can guess their
    format by getting their mime types.
    
    So add a last resort processing step to get archive format from mime
    type prior trying to extract it.
    
    Related to T3468

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/246/ for more details.

anlambert retitled this revision from tarball: Try to guess archive format from mimetype as last resort to tarball: Try to guess archive format from mime type as last resort.Sep 17 2021, 5:33 PM
This revision is now accepted and ready to land.Sep 17 2021, 5:36 PM

Update test docstring and remove no longer needed comment

Build is green

Patch application report for D6301 (id=22883)

Rebasing onto 0ef57a4dd3...

Current branch diff-target is up to date.
Changes applied before test
commit 93a1ba1c1797eaaf2f703504d466a2af312df7c8
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 17 17:19:24 2021 +0200

    tarball: Try to guess archive format from mimetype as last resort
    
    Some archive files do not have any extension but we can guess their
    format by getting their mime types.
    
    So add a last resort processing step to get archive format from mime
    type prior trying to extract it.
    
    Related to T3468

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/247/ for more details.

Fix test when building debian package

Build is green

Patch application report for D6301 (id=22885)

Rebasing onto 0ef57a4dd3...

Current branch diff-target is up to date.
Changes applied before test
commit 9ee026a97e37bcb29d667fa30efab2001cc7e52f
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 17 17:19:24 2021 +0200

    tarball: Try to guess archive format from mimetype as last resort
    
    Some archive files do not have any extension but we can guess their
    format by getting their mime types.
    
    So add a last resort processing step to get archive format from mime
    type prior trying to extract it.
    
    Related to T3468

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/248/ for more details.

Remove debian files added by mistake

Build is green

Patch application report for D6301 (id=22886)

Rebasing onto 0ef57a4dd3...

Current branch diff-target is up to date.
Changes applied before test
commit e268896d7652c7d9ccb83b702b151eb1ef88bd97
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 17 17:19:24 2021 +0200

    tarball: Try to guess archive format from mimetype as last resort
    
    Some archive files do not have any extension but we can guess their
    format by getting their mime types.
    
    So add a last resort processing step to get archive format from mime
    type prior trying to extract it.
    
    Related to T3468

See https://jenkins.softwareheritage.org/job/DCORE/job/tests-on-diff/249/ for more details.