On Sat, 2008-09-06 at 21:06 +0200, Thomas Weber wrote:
> On Sat, Sep 06, 2008 at 07:59:24PM +0100, Adam D. Barratt wrote:
> > On Sat, 2008-09-06 at 20:13 +0200, Thomas Weber wrote:
> > > I give all options I'm using, in case it matters:
> > > ================================================================================
> > > $ uscan --no-conf --download --no-symlink --upstream-version=3.0.1
> > > --watchfile=/tmp/watchfile --package=octave
> >
> > The options do indeed matter - the exit status is correct if you let
> > uscan search for debian/watch rather than specifying the watchfile
> > yourself.
>
> Well, I want to (ab)use uscan for non-Debian stuff, so there's no
> debian/ directory.
Makes perfect sense. I've checked that I now get the correct exit status
with --watchfile as well as without.
> > > I attach a patch that fixes this thing for me, but you'd better check
> > > this carefully. Watchfile attached.
> >
> > Thanks for the patch, it was nearly perfect :) It should be "exit
> > ($found ? 0 : 1);" as $found contains the number of new upstream
> > versions found, which can be more than one.
>
> Sorry about that, but I found uscan's exit points to be non-trivial :)
Much of uscan is non-trivial. :-)
In this case the code effectively does:
if (--watchfile) {
process it
exit
}
look for watchfiles
process them
exit
where the second exit statement took $found in to account but the first
didn't. I'm not quite sure why it's not simply
if (--watchfile) {
process it
} else {
look for watchfiles
for each watchfile {
process it
}
}
exit
but would need to spend a while longer looking at the code before
changing that.
Adam
--
To unsubscribe, send mail to [EMAIL PROTECTED]