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

Bug 596912

Summary: git-r3.eclass: _git-r3_env_setup(): Bad substitution for packages with PN starting with digit
Product: Gentoo Linux Reporter: Vadim A. Misbakh-Soloviov (mva) <mva>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: major    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log of 389-ds-base

Description Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2016-10-11 21:56:18 UTC
I've found that git-r3 causes fail in unpack phase if PN starts with digit.
See `emerge '=389-ds-base-9999'` for example. And the same for any 9999 packages of PN starting with digit.


Reproducible: Always
Comment 1 Vadim A. Misbakh-Soloviov (mva) gentoo-dev 2016-10-11 22:00:15 UTC
Created attachment 449926 [details]
build.log of 389-ds-base
Comment 2 Felix Janda 2016-10-11 22:28:31 UTC
The "bad substitution" in the eclass is "${!livevar}" if livevar starts
with a digit. Actually, it seems that bash (and other shells) do not
allow variables starting with digits at all.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-10-22 21:05:25 UTC
commit 3d3b76c457908962929f3c636cee8c5b6579b578
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Sat Oct 22 23:03:08 2016
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Sat Oct 22 23:05:08 2016

    git-r3.eclass: Fix var names for packages starting with digits, #596912
    
    Fix live variable names for packages whose names start with digits.
    Since variable names can not start with digits in bash, just prepend
    an underscore to them.