Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 476730 - [Future EAPI] unpack should match extensions case-insensitively
Summary: [Future EAPI] unpack should match extensions case-insensitively
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: PMS/EAPI (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: PMS/EAPI
URL:
Whiteboard: in-eapi-6
Keywords:
Depends on:
Blocks: future-eapi
  Show dependency tree
 
Reported: 2013-07-13 17:54 UTC by David Leverton
Modified: 2015-11-08 21:55 UTC (History)
1 user (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 David Leverton 2013-07-13 17:54:06 UTC
It's a bit arbitrary which case combinations unpack currently supports, e.g.

* .Z and .z are both recognised for files to be passed to gunzip, but only .tar.Z is for gunzip+tar (a .tar.z would presumably just be decompressed to give a .tar)
* .ZIP, .7Z, .RAR and .LHA are recognised, but not upper-case versions of any other extensions (besides .Z)
* .LHa is allowed as an alternative for .lha

It would make sense to just make it case insensitive.
Comment 1 Ulrich Müller gentoo-dev 2013-09-01 08:53:21 UTC
Portage does this already:

    for x in "$@"; do
        __vecho ">>> Unpacking ${x} to ${PWD}"
        suffix=${x##*.}
        suffix=$(LC_ALL=C tr "[:upper:]" "[:lower:]" <<< "${suffix}")
        # [...]
        case "${suffix}" in
Comment 2 Ciaran McCreesh 2013-09-01 09:37:39 UTC
Unfortunately, Portage added that without EAPI control, and pretty late on. We're already hitting issues in the tree.
Comment 3 Ulrich Müller gentoo-dev 2013-09-01 10:20:35 UTC
(In reply to Ciaran McCreesh from comment #2)
> Unfortunately, Portage added that without EAPI control, and pretty late on.
> We're already hitting issues in the tree.

Yeah, late in 2012:
<http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;f=bin/phase-helpers.sh;h=3dea53c2be83088d05c82a0c3dbbe7e6e1a6edea>

@Portage team: Could this be reverted please? We can do it properly for EAPI 6.
Comment 4 Ulrich Müller gentoo-dev 2013-09-01 11:52:21 UTC
(In reply to Ciaran McCreesh from comment #2)
> We're already hitting issues in the tree.

Are we? I've scanned the tree for uppercase suffixes in SRC_URI, and all I can find are .Z (which is a supported extension, according to PMS) and a few .ZIP which are all properly mapped to .zip by -> arrows.

So the Portage commit could still be reverted without negative impact on users.