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

Potter, Tim (HPE Linux Support) timothy.potter at hpe.com
Mon Aug 1 03:20:25 UTC 2016


On 20 Jul 2016, at 6:35 PM, Chris Lamb <lamby at debian.org> 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 830729-golang-github-mitchellh-go-homedir.patch
Type: application/octet-stream
Size: 394 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20160801/efc0aa92/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.alioth.debian.org/pipermail/pkg-go-maintainers/attachments/20160801/efc0aa92/attachment.sig>


More information about the Pkg-go-maintainers mailing list