Page MenuHomeSoftware Heritage

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

Authored by anlambert on Fri, Sep 17, 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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

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.Fri, Sep 17, 5:33 PM
This revision is now accepted and ready to land.Fri, Sep 17, 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.