From owner-freebsd-current@freebsd.org Sun May 14 07:41:33 2017 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7496DD6CD4B for ; Sun, 14 May 2017 07:41:33 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from dec.sakura.ne.jp (dec.sakura.ne.jp [210.188.226.8]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 144A31E55; Sun, 14 May 2017 07:41:32 +0000 (UTC) (envelope-from junchoon@dec.sakura.ne.jp) Received: from fortune.joker.local (124-18-21-125.dz.commufa.jp [124.18.21.125]) (authenticated bits=0) by dec.sakura.ne.jp (8.15.2/8.15.2/[SAKURA-WEB]/20080708) with ESMTPA id v4E73tfC081724; Sun, 14 May 2017 16:03:55 +0900 (JST) (envelope-from junchoon@dec.sakura.ne.jp) Date: Sun, 14 May 2017 16:03:55 +0900 From: Tomoaki AOKI To: freebsd-current@freebsd.org Cc: bapt@FreeBSD.org, alexander@wittig.name Subject: ports-mgmt/pkg_rmleaves stops working properly on -head after bsdiff became default diff (r317209) Message-Id: <20170514160355.5da31fb2f3c8a163e024acdf@dec.sakura.ne.jp> Organization: Junchoon corps X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; amd64-portbld-freebsd11.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Sun__14_May_2017_16_03_55_+0900_4PmVibRYbPkIk1b_" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 May 2017 07:41:33 -0000 This is a multi-part message in MIME format. --Multipart=_Sun__14_May_2017_16_03_55_+0900_4PmVibRYbPkIk1b_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Hi. Posting on freebsd-current as this only affects -head. I recently noticed ports-mgmt/pkg_rmleaves failes to process new leaf ports after removal of leaf ports on -head with error messages below. > diff: unrecognized option `--unchanged-line-format=' > usage: diff [-abdilpTtw] [-c | -e | -f | -n | -q | -u] [--ignore-case] > [--no-ignore-case] [--normal] [--strip-trailing-cr] > [--tabsize] [-I pattern] [-L label] file1 file2 > diff [-abdilpTtw] [-I pattern] [-L label] [--ignore-case] > [--no-ignore-case] [--normal] [--strip-trailing-cr] > [--tabsize] -C number file1 file2 > diff [-abdiltw] [-I pattern] [--ignore-case] [--no-ignore-case] > [--normal] [--strip-trailing-cr] [--tabsize] -D string > file1 file2 diff [-abdilpTtw] [-I pattern] [-L label] [--ignore-case] > [--no-ignore-case] [--normal] [--tabsize] > [--strip-trailing-cr] -U number file1 file2 > diff [-abdilNPprsTtw] [-c | -e | -f | -n | -q | -u] > [--ignore-case] [--no-ignore-case] [--normal] [--tabsize] [-I pattern] > [-L label] [-S name] [-X file] [-x pattern] dir1 dir2 stable/11 was OK, and the difference is that stable/11 has gnu diff as diff, while -head has bsdiff as diff. There's 2 (or possibly 3) options. a) Let pkg_rmleaves use gnu diff via textprocs/diffutils. This is easiest (Minimal diff is attached), but doesn't help any other ports affected. Just change diff to gdiff and RUN_DEPENDS on textproc/diffutils. b) Update bsdiff to support missing options below. This is over my hand, but if possible, would help others. c) If the missing options below are implemented as different (non-documented) options on bsdiff, use them for bsdiff instead. Will need OSVERSION check in ports Makefile. Please note that attached diff is really MINIMAL to work on -head. No OSVERSION switching is implemented and no bumps so forcibly installs textproc/diffutils on revisions with gnu diff is /usr/bin/diff. And patch wouldn't work properly as files directory doesn't exist in pkg-mgmt/pkg_rmleaves. (At least system patch.) I wonder which option should be taken, so not yet filed PR on bugzilla. It should be filed differently with which option is taken. -- Tomoaki AOKI --Multipart=_Sun__14_May_2017_16_03_55_+0900_4PmVibRYbPkIk1b_ Content-Type: text/x-diff; name="pkg_rmleaves.diff" Content-Disposition: attachment; filename="pkg_rmleaves.diff" Content-Transfer-Encoding: 7bit diff -u -r -P -p ports-mgmt/pkg_rmleaves/Makefile.orig ports-mgmt/pkg_rmleaves/Makefile --- ports-mgmt/pkg_rmleaves/Makefile.orig 2015-09-09 02:00:03.629555000 +0900 +++ ports-mgmt/pkg_rmleaves/Makefile 2017-05-14 02:20:31.547549000 +0900 @@ -13,6 +13,8 @@ LICENSE= BSD2CLAUSE NO_BUILD= yes +RUN_DEPENDS= gdiff:textproc/diffutils + WRKSRC= ${WRKDIR} PLIST_FILES= sbin/pkg_rmleaves man/man1/pkg_rmleaves.1.gz diff -u -r -P -p ports-mgmt/pkg_rmleaves/files/patch-pkg_rmleaves.orig ports-mgmt/pkg_rmleaves/files/patch-pkg_rmleaves --- ports-mgmt/pkg_rmleaves/files/patch-pkg_rmleaves.orig 1970-01-01 09:00:00.000000000 +0900 +++ ports-mgmt/pkg_rmleaves/files/patch-pkg_rmleaves 2017-05-14 02:22:57.050609000 +0900 @@ -0,0 +1,11 @@ +--- pkg_rmleaves.orig 2014-02-22 21:21:47.000000000 +0900 ++++ pkg_rmleaves 2017-05-14 02:16:55.751443000 +0900 +@@ -74,7 +74,7 @@ checkLeafs() { + fi | sort | sed -e "y/\"/'/" -e 's/#"#/"/g' > "$PKGFILE" + + if [ -f "$PREV" ]; then +- diff --unchanged-line-format='' --old-line-format='' --new-line-format='%L' "$PREV" "$PKGFILE" > "$TMPFILE" ++ gdiff --unchanged-line-format='' --old-line-format='' --new-line-format='%L' "$PREV" "$PKGFILE" > "$TMPFILE" + else + cp "$PKGFILE" "$TMPFILE" + fi --Multipart=_Sun__14_May_2017_16_03_55_+0900_4PmVibRYbPkIk1b_--