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

Bug 606950

Summary: git-r3 unpack fails with some submodule names (e.g. submodules with names that include spaces)
Product: Gentoo Linux Reporter: Elliot Chandler <elliot>
Component: EclassesAssignee: Michał Górny <mgorny>
Status: RESOLVED FIXED    
Severity: normal CC: elliot
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Elliot Chandler 2017-01-23 18:57:38 UTC
It gives a message like this:

git update-ref --no-deref refs/git-r3/app-misc/ember-dev-environment/0/Ember satellite projects/__main__ 0081b8ad2a9ef0872cad934eabefa4734f75d443
fatal: update_ref failed for ref 'refs/git-r3/app-misc/ember-dev-environment/0/Ember satellite projects/__main__': refusing to update ref with bad name 'refs/git-r3/app-misc/ember-dev-environment/0/Ember satellite projects/__main__'

While #572312 fixed some of these situations, there are other possible conditions that trigger this problem listed in https://bugs.gentoo.org/show_bug.cgi?id=572312#c3. Those other problematic situations (spaces, ASCII control characters, etc.) in submodule names should be dealt with when choosing a reference name as well.

Reproducible: Always

Steps to Reproduce:
1.Try to emerge a package using git-r3 that includes such a submodule.
2.
3.
Actual Results:  
It blows up with the above error message

Expected Results:  
It unpacks successfully
Comment 1 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2017-01-25 13:26:07 UTC
commit eb4c42b20e78f3577ea26a028ff92393e2c4a2ff
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: Wed Jan 25 14:22:17 2017
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: Wed Jan 25 14:24:04 2017

    git-r3.eclass: Escape all weird chars in submodule names, #606950


Please try now. I've just went full forward, and escaped all weird characters.
Comment 2 Elliot Chandler 2017-01-25 19:53:31 UTC
Brilliant, thanks :D