Date: Thu, 07 May 2026 12:08:16 +0000 From: Andrey V. Elsukov <ae@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Boris Lytochkin <lytboris@gmail.com> Subject: git: 4e57c937999d - stable/15 - etcupdate: fix arguments order of diff command Message-ID: <69fc80b0.39d61.3bdd9662@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/15 has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=4e57c937999df5b186ccf827542aee717baab07c commit 4e57c937999df5b186ccf827542aee717baab07c Author: Boris Lytochkin <lytboris@gmail.com> AuthorDate: 2026-04-30 11:31:34 +0000 Commit: Andrey V. Elsukov <ae@FreeBSD.org> CommitDate: 2026-05-07 12:06:54 +0000 etcupdate: fix arguments order of diff command Due to misplacement of the second -L argument of diff command, it is treated by getopt_long as an error. Also add -l option for a diff command that alters the way it shows differences. Instead of printing full diff, it reports changed file the same way as added/removed files are reported. Reviewed by: imp Obtained from: Yandex LLC Differential Revision: https://reviews.freebsd.org/D56708 (cherry picked from commit 6d65c91b9a4743bbffc3508bf754e68b65bbd494) --- usr.sbin/etcupdate/etcupdate.8 | 7 ++++++- usr.sbin/etcupdate/etcupdate.sh | 14 ++++++++++++-- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/usr.sbin/etcupdate/etcupdate.8 b/usr.sbin/etcupdate/etcupdate.8 index bf7ddb792907..6216722fc81f 100644 --- a/usr.sbin/etcupdate/etcupdate.8 +++ b/usr.sbin/etcupdate/etcupdate.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 15, 2024 +.Dd April 30, 2026 .Dt ETCUPDATE 8 .Os .Sh NAME @@ -51,6 +51,7 @@ .Ar tarball .Nm .Cm diff +.Op Fl l .Op Fl d Ar workdir .Op Fl D Ar destdir .Op Fl I Ar patterns @@ -468,6 +469,10 @@ shell pattern. This option may be specified multiple times to specify multiple patterns. Multiple space-separated patterns may also be specified in a single option. +.It Fl l +In +.Cm diff +mode list files that are changed locally, omit printing content difference. .It Fl L Ar logfile Specify an alternate path for the log file. The diff --git a/usr.sbin/etcupdate/etcupdate.sh b/usr.sbin/etcupdate/etcupdate.sh index 7bddd6593b56..f62343a24eee 100755 --- a/usr.sbin/etcupdate/etcupdate.sh +++ b/usr.sbin/etcupdate/etcupdate.sh @@ -531,9 +531,15 @@ diffnode() echo ;; $COMPARE_DIFFFILES) + if [ -n "$difflistonly" ]; then + echo + echo "Changed: $3" + echo + break; + fi echo "Index: $3" rule "=" - diff -u $diffargs -L "$3 ($4)" $1/$3 -L "$3 ($5)" $2/$3 + diff -u $diffargs -L "$3 ($4)" -L "$3 ($5)" $1/$3 $2/$3 ;; esac } @@ -1791,11 +1797,15 @@ ignore= nobuild= preworld= noroot= -while getopts "d:m:nprs:t:A:BD:FI:L:M:N" option; do +difflistonly= +while getopts "d:lm:nprs:t:A:BD:FI:L:M:N" option; do case "$option" in d) WORKDIR=$OPTARG ;; + l) + difflistonly=YES + ;; m) MAKE_CMD=$OPTARG ;;home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69fc80b0.39d61.3bdd9662>
