On Mon, Jul 31, 2006 at 01:56:30PM +0200, Martin Quinson wrote: > On Mon, Jul 31, 2006 at 01:36:37PM +0200, Marc Haber wrote: > > On Mon, Jul 31, 2006 at 01:35:40PM +0200, Martin Quinson wrote: > > > Thanks. Got it. I do some more checks, and I upload a fixed version. The > > > new > > > behaviour is to fail with an informative message when it happens. Does it > > > fit your expectations ? > > > > Absolutely. I do not have a problem to mount /proc in a new chroot, I > > only hate to debug for hours if I forget ;) > > [patch-wrapper.test] > Use of uninitialized value in undef operator at ./run line 39. > Use of uninitialized value in undef operator at ./run line 39. > Use of uninitialized value in undef operator at ./run line 39. > [1] $ rm -rf d -- ok > [2] $ mkdir -p d/somewhere -- ok > [3] $ cd d -- ok > [5] $ cat > foo.orig -- ok > [11] $ sed -e 's/3/3a/' foo.orig > foo -- ok > [12] $ diff -u foo.orig foo > foo.diff -- ok > [13] $ mv foo.orig foo -- ok > [15] $ patch-wrapper -s -p0 < foo.diff -- failed > patch-wrapper: /proc not mounted! != ~ > [16] $ quilt pop -q -- failed > No patch removed != Removing patch patches/foo.diff > ~ != No patches applied > [19] $ rm -rf ${QUILT_PATCHES:-patches} ${QUILT_PC:-.pc} -- ok > [21] $ patch-wrapper --backup -B xxx/ -s -p0 < foo.diff -- failed > patch-wrapper: /proc not mounted! != ~ > [22] $ find xxx -type f -- failed > find: xxx: No such file or directory != xxx/foo > [...] > > Rah. It works (ie, the first error message is informative). I upload it.
How about having the build not even start if it is clear that it cannot be successful? I mean, check /proc _first_ and fail if not ok. # if /proc is not mounted, check_nagios and check_procs are # silently omitted from build. @if ! [ -d /proc/1 ]; then \ echo "nagios-plugins needs a mounted /proc to correctly build"; \ exit 1; \ fi (this is taken from nagios-plugins debian/rules configure target) Greetings Marc -- ----------------------------------------------------------------------------- Marc Haber | "I don't trust Computers. They | Mailadresse im Header Mannheim, Germany | lose things." Winona Ryder | Fon: *49 621 72739834 Nordisch by Nature | How to make an American Quilt | Fax: *49 621 72739835 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]