[PATCH 1 of 5 STABLE V2] dockerdeb: elimate 'cd' in export command
Sean Farley
sean at farley.io
Mon Apr 18 13:35:31 EDT 2016
Sean Farley <sean at farley.io> writes:
> Yuya Nishihara <yuya at tcha.org> writes:
>
>> On Sun, 17 Apr 2016 11:14:15 -0700, Sean Farley wrote:
>>> # HG changeset patch
>>> # User Sean Farley <sean at farley.io>
>>> # Date 1460914600 25200
>>> # Sun Apr 17 10:36:40 2016 -0700
>>> # Branch stable
>>> # Node ID b7fb0360f172f06477a07bf510aca176109c0cba
>>> # Parent e442b628bfe6485d57ab4f10f941b89e96f04b05
>>> # EXP-Topic ppa
>>> dockerdeb: elimate 'cd' in export command
>>>
>>> This had the unfortunate side effect of causing the environment to have a
>>> newline due to the fact that some 'cd' outputs the result of the directory
>>> change.
>>>
>>> diff --git a/contrib/dockerdeb b/contrib/dockerdeb
>>> --- a/contrib/dockerdeb
>>> +++ b/contrib/dockerdeb
>>> @@ -2,11 +2,11 @@
>>>
>>> . $(dirname $0)/dockerlib.sh
>>> . $(dirname $0)/packagelib.sh
>>>
>>> BUILDDIR=$(dirname $0)
>>> -export ROOTDIR=$(cd $BUILDDIR/..; pwd)
>>> +export ROOTDIR=$(dirname $BUILDDIR)
>>
>> It won't work if you do
>>
>> $ cd contrib
>> $ ./dockerdeb
>
> Drats. Should I use readlink or something else?
Actually, running './dockerdeb' doesn't work even if this is fixed:
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM debian:jessie
---> 47af6ca8a14a
Step 2 : RUN apt-get update && apt-get install -y build-essential debhelper dh-python devscripts python python-all-dev python-docutils zip unzip
---> Using cache
---> dcf0bd200ff5
Step 3 : RUN groupadd build -g 20 -o
---> Using cache
---> 2732bd966929
Step 4 : RUN useradd build -u 501 -g build -o
---> Using cache
---> ca7708e15727
Successfully built ca7708e15727
sh: 1: contrib/builddeb: not found
More information about the Mercurial-devel
mailing list