Skip site navigation (1)Skip section navigation (2)
Date:      02 Aug 2000 12:21:41 -0700
From:      asami@FreeBSD.org (Satoshi - Ports Wraith - Asami)
To:        Kelly Yancey <kbyanc@FreeBSD.org>
Cc:        cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/gnu/usr.bin/patch patch.c pch.c
Message-ID:  <vqcpunr5v0a.fsf@silvia.hip.berkeley.edu>
In-Reply-To: Kelly Yancey's message of "Tue, 1 Aug 2000 23:54:22 -0700 (PDT)"
References:  <200008020654.XAA40228@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
 * kbyanc      2000/08/01 23:54:22 PDT
 * 
 *   Modified files:
 *     gnu/usr.bin/patch    patch.c pch.c 
 *   Log:
 *   Fix patch such that skipping files does not count as a failure.
 *   Previously, using -S/--skip, -f/--force, or -t/--batch to skip a patch in
 *   a patchset still registers a failure which causes patch to return a
 *   non-zero exit code. This is particularly undesirable with regards to
 *   ports as there is no way to ignore the non-zero code. (Luckily, we don't
 *   currently have any ports that make use of any of these options.)
 *   
 *   The PR (yes, my own) is slightly incorrect: It states that -f does indeed
 *   properly skip patches. It does, but it still sets the failure flag causing
 *   patch to return non-zero.

I'm not sure if this is the right way to go.  You have just made the
ports lose the ability to check for missing files automatically (since
BATCH implies --batch).

I agree that skipping files when --skip is specified should not count
as an error, but I'm less sure about --force and --batch.  What do you
think about putting those two errors back?

Another thing you could do is to add another option that will cause
questions to not being asked but make patch exit with an error when
there is a need to ask a question.  This is what we really want
instead of --batch, since the whole purpose is to avoid getting into
an infinite loop when patch is called without a terminal.

Or maybe we can just fix patch so it won't go into an infinite loop
when stdin is closed.

Satoshi


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?vqcpunr5v0a.fsf>