Bug#830729: [pkg-go] Bug#830729: Bug#830729: golang-github-mitchellh-go-homedir: FTBFS: homedir_test.go:44: "/home/lamby" != "~"

2016-07-31 Thread Chris Lamb
> I've tracked this down to lack of a $USER environment variable

Ah, good catch :)


Regards,

-- 
  ,''`.
 : :'  : Chris Lamb
 `. `'`  la...@debian.org / chris-lamb.co.uk
   `-



Bug#830729: [pkg-go] Bug#830729: Bug#830729: golang-github-mitchellh-go-homedir: FTBFS: homedir_test.go:44: "/home/lamby" != "~"

2016-07-31 Thread Potter, Tim (HPE Linux Support)
On 20 Jul 2016, at 6:35 PM, Chris Lamb  wrote:
> 
>> My _hunch_ is that whatever you're using to build (pbuilder perhaps?)
>> is running as your user ("lamby") but not including "/etc/passwd" from
>> your host
> 
> It is running as my user and /etc/passwd includes:
> 
>  lamby:x:1000:1000:,,,:/home/lamby:/bin/bash
> 
> .. so, alas, that's not the problem.
> 
> (am using Docker, not pbuilder)

I've tracked this down to lack of a $USER environment variable, either in a 
Docker container, or
by some other means.

> cmd := exec.Command("sh", "-c", "eval echo ~$USER")

Patch attached to fix this, but it's a bit icky (and has been replaced by a 
shell out to call
getent in a later version.


Tim.


830729-golang-github-mitchellh-go-homedir.patch
Description: Binary data


signature.asc
Description: Message signed with OpenPGP using GPGMail