Patchwork [2,of,5,STABLE] dockerdeb: pass the rest of the args to the builder script

login
register
mail settings
Submitter Sean Farley
Date April 24, 2016, 2:27 a.m.
Message ID <cef09634d1054a0b378e.1461464876@laptop.local>
Download mbox | patch
Permalink /patch/14779/
State Accepted
Delegated to: Augie Fackler
Headers show

Comments

Sean Farley - April 24, 2016, 2:27 a.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1461440877 25200
#      Sat Apr 23 12:47:57 2016 -0700
# Branch stable
# Node ID cef09634d1054a0b378e401707d87d819dff9ec7
# Parent  f0bec77f148405825a8c3289823e3981246965dc
# EXP-Topic docker-ppa
dockerdeb: pass the rest of the args to the builder script

It seems this was the original intent of the script so this patch passes the
remanining arguments to builddeb.
Augie Fackler - April 25, 2016, 6:31 p.m.
On Sat, Apr 23, 2016 at 07:27:56PM -0700, Sean Farley wrote:
> # HG changeset patch
> # User Sean Farley <sean@farley.io>
> # Date 1461440877 25200
> #      Sat Apr 23 12:47:57 2016 -0700
> # Branch stable
> # Node ID cef09634d1054a0b378e401707d87d819dff9ec7
> # Parent  f0bec77f148405825a8c3289823e3981246965dc
> # EXP-Topic docker-ppa
> dockerdeb: pass the rest of the args to the builder script

I've queued patches 1 and 2. What would you think about having some
sort of way to generate the right dockerfile using make or similar?

(I don't know if I like that or not.)

>
> It seems this was the original intent of the script so this patch passes the
> remanining arguments to builddeb.
>
> diff --git a/contrib/dockerdeb b/contrib/dockerdeb
> --- a/contrib/dockerdeb
> +++ b/contrib/dockerdeb
> @@ -25,11 +25,11 @@ dn=$(basename $PWD)
>  if [ $(uname) = "Darwin" ] ; then
>      $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
>              sh -c "cd /mnt/$dn && make clean && make local"
>  fi
>  $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
> -  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME"
> +  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME $@"
>  contrib/builddeb --cleanup --distid $DISTID --codename $CODENAME
>  if [ $(uname) = "Darwin" ] ; then
>      $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
>              sh -c "cd /mnt/$dn && make clean"
>  fi
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/contrib/dockerdeb b/contrib/dockerdeb
--- a/contrib/dockerdeb
+++ b/contrib/dockerdeb
@@ -25,11 +25,11 @@  dn=$(basename $PWD)
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean && make local"
 fi
 $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
-  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME"
+  sh -c "cd /mnt/$dn && DEB_BUILD_OPTIONS='${DEB_BUILD_OPTIONS:=}' contrib/builddeb --build --distid $DISTID --codename $CODENAME $@"
 contrib/builddeb --cleanup --distid $DISTID --codename $CODENAME
 if [ $(uname) = "Darwin" ] ; then
     $DOCKER run -u $DBUILDUSER --rm -v $PWD/..:/mnt $CONTAINER \
             sh -c "cd /mnt/$dn && make clean"
 fi