Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 789669

Summary: [Future EAPI] Make unpack fail when passed an unsupported file
Product: Gentoo Hosted Projects Reporter: Michał Górny <mgorny>
Component: PMS/EAPIAssignee: PMS/EAPI <pms>
Status: CONFIRMED ---    
Severity: normal CC: esigra, gentoo, sam
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 174380    

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-12 12:16:50 UTC
Right now, unpack silently ignores unsupported files, e.g.:

  unpack simutrans_coalwagonfix.rar: file format not recognized. Ignoring.

This makes sense in default_src_unpack() but I dare say passing an unsupported file explicitly to 'unpack' should be an error.
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-05-12 13:37:16 UTC
I suppose the simplest way of doing that would be to modify the spec to say something like 'does the equivalent of calling unpack with filenames from ${A} that are recognized as supported archives'.
Comment 2 Ulrich Müller gentoo-dev 2021-05-12 14:28:11 UTC
From #gentoo-pms:

<@ulm> if it cannot unpack ${A} then it's not a default situation
<@mgorny> ulm: ebuilds quite often fetch auxiliary files like images or         
          uncompressed patches or ..
<@mgorny> maybe a compromise would be having 'unpack' fail if none of the       
          files were recognized
<@mgorny> and succeed if at least one was unpacked
<@ulm> yeah, that would also be possible