Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 789669 - [Future EAPI] Make unpack fail when passed an unsupported file
Summary: [Future EAPI] Make unpack fail when passed an unsupported file
Status: CONFIRMED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Package Manager Specification
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2021-05-12 12:16 UTC by Michał Górny
Modified: 2021-05-20 07:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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