Patchwork [1,of,6] packaging: print more specific error messages when builddeb fails

login
register
mail settings
Submitter via Mercurial-devel
Date Oct. 9, 2018, 9:29 p.m.
Message ID <42d6233230fb917da7f5.1539120563@cuben.lan>
Download mbox | patch
Permalink /patch/35589/
State Accepted
Headers show

Comments

via Mercurial-devel - Oct. 9, 2018, 9:29 p.m.
# HG changeset patch
# User muxator <a.mux@inwind.it>
# Date 1539113979 -7200
#      Tue Oct 09 21:39:39 2018 +0200
# Node ID 42d6233230fb917da7f53f181f29b4c4c209b65e
# Parent  a66594c5fad422499bfaf669d182e02fe3c0be32
packaging: print more specific error messages when builddeb fails
Gregory Szorc - Oct. 11, 2018, 11:06 a.m.
On Tue, Oct 9, 2018 at 11:42 PM Antonio Muci via Mercurial-devel <
mercurial-devel@mercurial-scm.org> wrote:

> # HG changeset patch
> # User muxator <a.mux@inwind.it>
> # Date 1539113979 -7200
> #      Tue Oct 09 21:39:39 2018 +0200
> # Node ID 42d6233230fb917da7f53f181f29b4c4c209b65e
> # Parent  a66594c5fad422499bfaf669d182e02fe3c0be32
> packaging: print more specific error messages when builddeb fails
>

These patches are queued [by someone other than me - I just saw them when
accepting].

Thanks for improving our Debian packaging!


>
> diff --git a/contrib/packaging/builddeb b/contrib/packaging/builddeb
> --- a/contrib/packaging/builddeb
> +++ b/contrib/packaging/builddeb
> @@ -49,7 +49,7 @@ trap "if [ '$CLEANUP' ] ; then rm -r '$P
>  set -u
>
>  if [ ! -d .hg ]; then
> -    echo 'You are not inside a Mercurial repository!' 1>&2
> +    printf "You are inside %s, which is not the root of a Mercurial
> repository\n" $(pwd) 1>&2
>      exit 1
>  fi
>
> @@ -71,7 +71,7 @@ changelog=debian/changelog
>
>  if [ "$BUILD" ]; then
>      if [ -d debian ] ; then
> -        echo "Error! debian control directory already exists!"
> +        printf "Error! debian control directory already exists at
> %s/debian\n" $(pwd)
>          exit 1
>      fi
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

diff --git a/contrib/packaging/builddeb b/contrib/packaging/builddeb
--- a/contrib/packaging/builddeb
+++ b/contrib/packaging/builddeb
@@ -49,7 +49,7 @@  trap "if [ '$CLEANUP' ] ; then rm -r '$P
 set -u
 
 if [ ! -d .hg ]; then
-    echo 'You are not inside a Mercurial repository!' 1>&2
+    printf "You are inside %s, which is not the root of a Mercurial repository\n" $(pwd) 1>&2
     exit 1
 fi
 
@@ -71,7 +71,7 @@  changelog=debian/changelog
 
 if [ "$BUILD" ]; then
     if [ -d debian ] ; then
-        echo "Error! debian control directory already exists!"
+        printf "Error! debian control directory already exists at %s/debian\n" $(pwd)
         exit 1
     fi