Patchwork [4,of,5,STABLE,V2] builddeb: ignore errors about find not finding files

login
register
mail settings
Submitter Sean Farley
Date April 20, 2016, 6:01 p.m.
Message ID <cc3a1eb82ade4b2d2250.1461175317@laptop.office.atlassian.com>
Download mbox | patch
Permalink /patch/14740/
State Accepted
Headers show

Comments

Sean Farley - April 20, 2016, 6:01 p.m.
# HG changeset patch
# User Sean Farley <sean@farley.io>
# Date 1460755662 25200
#      Fri Apr 15 14:27:42 2016 -0700
# Branch stable
# Node ID cc3a1eb82ade4b2d2250ce7dd569f1283dce4503
# Parent  304ccbe48d748b0879590dbb553e92d1acb307a7
# EXP-Topic ppa
builddeb: ignore errors about find not finding files

The debuild command may output less files than we explicitly list so let's not
error out if none exist.

Patch

diff --git a/contrib/builddeb b/contrib/builddeb
--- a/contrib/builddeb
+++ b/contrib/builddeb
@@ -82,10 +82,10 @@  fi
 if [ "$CLEANUP" ] ; then
     echo
     OUTPUTDIR=${OUTPUTDIR:=packages/$DISTID-$CODENAME}
     mkdir -p "$OUTPUTDIR"
     find ../mercurial*.deb ../mercurial_*.build ../mercurial_*.changes \
-          -type f -newer $control -print0 | \
+          -type f -newer $control -print0 2>/dev/null | \
       xargs -Inarf -0 mv narf "$OUTPUTDIR"
     echo "Built packages for $debver:"
     find "$OUTPUTDIR" -type f -newer $control -name '*.deb'
 fi