From nobody Sat Feb 7 05:01:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1629382569; cv=none; d=zohomail.com; s=zohoarc; b=bsKVlG1VmTNBq+9+FkoEUn/v5Ipbxt59ARhTtoWRx7YIF5Do2+CUYOeda4fWvQVC9KLlQnMZTrST2LgOZPllAvwy6srLUg1uauj389k2GkWPVyHxrpnGa1aA0Hr9T93YEBTdnBJuvLat0r9bEDufsQH5lzeIf1LK7MlDZIVnw/g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1629382569; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=puheaX63FdslVqMt3hz8z0TFINaGzr1Rr+JxQICQqKw=; b=YCnVHLEOdGlsItBq7w8Cbhq2IO5IC3GYv2US3bveRpqaZ/BJQmu1VeSBf069DhJZM9enSYeF5BHcAY81HLKeziUxWsmRslafigZzR0NZy91whoU/NgfBFmZNASTjqdFO1TqGS29JBUsbCDkKLAj/1QgQ4R1Sb0tyZiMIvDboq+M= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 16293825690441004.0353669024362; Thu, 19 Aug 2021 07:16:09 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-537-s4y6tf0jOTaHp633XIRabA-1; Thu, 19 Aug 2021 10:16:02 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0526A100A609; Thu, 19 Aug 2021 14:15:57 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D84D75D9D5; Thu, 19 Aug 2021 14:15:56 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id A67404A7C9; Thu, 19 Aug 2021 14:15:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 17JECeGT015684 for ; Thu, 19 Aug 2021 10:12:40 -0400 Received: by smtp.corp.redhat.com (Postfix) id B6AA51A26A; Thu, 19 Aug 2021 14:12:40 +0000 (UTC) Received: from hjs.redhat.com (unknown [10.43.2.53]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DC8F1970F for ; Thu, 19 Aug 2021 14:12:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1629382567; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=puheaX63FdslVqMt3hz8z0TFINaGzr1Rr+JxQICQqKw=; b=FvudBkjWYCTq9aM82FuctY5V3uxgG2f2tJPgvfZns/oO54nF3OzKwHYCgWgZC5wQ1nC/ER vavAsCpKxs7FCb/jGIUCaPqjs6gqEK3Zgebf/ZZ8B3A0VKJsfNqRdQUoG3ajyzJJZqp/FR yMn4DtWfniE0FHAB55n1oPD/jTpYy74= X-MC-Unique: s4y6tf0jOTaHp633XIRabA-1 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Subject: [libvirt PATCH 3/5] syntax-check: replace vc-list-files Date: Thu, 19 Aug 2021 16:12:30 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1629382570719100002 Directly invoke git ls-tree instead of the wrapper file which also: * checks for other versioning systems * prepends the source directory to all output lines Since there is no srcdir prefix in the output anymore, also drop the extra 'sed' invocation that removes it. Signed-off-by: J=C3=A1n Tomko --- build-aux/syntax-check.mk | 6 +- build-aux/vc-list-files | 113 -------------------------------------- 2 files changed, 3 insertions(+), 116 deletions(-) delete mode 100755 build-aux/vc-list-files diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk index 307255c300..f493d19dae 100644 --- a/build-aux/syntax-check.mk +++ b/build-aux/syntax-check.mk @@ -37,7 +37,8 @@ _sp =3D $(_empty) $(_empty) # If S1 =3D=3D S2, return S1, otherwise the empty string. _equal =3D $(and $(findstring $(1),$(2)),$(findstring $(2),$(1))) =20 -VC_LIST =3D $(top_srcdir)/build-aux/vc-list-files -C $(top_srcdir) +VC_LIST =3D (cd $(top_srcdir); git ls-tree -r 'HEAD:' | \ + sed -n "s|^100[^ ]*.||p") =20 # You can override this variable in syntax-check.mk to set your own regexp # matching files to ignore. @@ -63,8 +64,7 @@ endif _sc_excl =3D \ $(or $(exclude_file_name_regexp--$@),^$$) VC_LIST_EXCEPT =3D \ - $(VC_LIST) | $(SED) 's|^$(_dot_escaped_srcdir)/||' \ - | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl))' \ + $(VC_LIST) | $(GREP) -Ev -e '($(VC_LIST_ALWAYS_EXCLUDE_REGEX)|$(_sc_excl= ))' \ $(_prepend_srcdir_prefix) =20 # Prevent programs like 'sort' from considering distinct strings to be equ= al. diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files deleted file mode 100755 index af6b1c0f8a..0000000000 --- a/build-aux/vc-list-files +++ /dev/null @@ -1,113 +0,0 @@ -#!/bin/sh -# List version-controlled file names. - -# Print a version string. -scriptversion=3D2018-03-07.03; # UTC - -# Copyright (C) 2006-2019 Free Software Foundation, Inc. - -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation, either version 3 of the License, or -# (at your option) any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - - -# List the specified version-controlled files. -# With no argument, list them all. With a single DIRECTORY argument, -# list the version-controlled files in that directory. - -# If there's an argument, it must be a single, "."-relative directory name. -# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/ - -postprocess=3D -case $1 in - --help) cat <. -EOF - exit ;; - - --version) - year=3D`echo "$scriptversion" | sed 's/[^0-9].*//'` - cat < -This is free software: you are free to change and redistribute it. -There is NO WARRANTY, to the extent permitted by law. -EOF - exit ;; - - -C) - test "$2" =3D . || postprocess=3D"| sed 's|^|$2/|'" - cd "$2" || exit 1 - shift; shift ;; -esac - -test $# =3D 0 && set . - -for dir -do - if test -d .git || test -f .git; then - test "x$dir" =3D x. \ - && dir=3D sed_esc=3D \ - || { dir=3D"$dir/"; sed_esc=3D`echo "$dir"|env sed 's,\([\\/]\),\\\\= \1,g'`; } - # Ignore git symlinks - either they point into the tree, in which case - # we don't need to visit the target twice, or they point somewhere - # else (often into a submodule), in which case the content does not - # belong to this package. - eval exec git ls-tree -r 'HEAD:"$dir"' \ - \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess - elif test -d .hg; then - eval exec hg locate '"$dir/*"' $postprocess - elif test -d .bzr; then - test "$postprocess" =3D '' && postprocess=3D"| sed 's|^\./||'" - eval exec bzr ls -R --versioned '"$dir"' $postprocess - elif test -d CVS; then - test "$postprocess" =3D '' && postprocess=3D"| sed 's|^\./||'" - if test -x build-aux/cvsu; then - eval build-aux/cvsu --find --types=3DAFGM '"$dir"' $postprocess - elif (cvsu --help) >/dev/null 2>&1; then - eval cvsu --find --types=3DAFGM '"$dir"' $postprocess - else - eval awk -F/ \''{ \ - if (!$1 && $3 !~ /^-/) { \ - f=3DFILENAME; \ - if (f ~ /CVS\/Entries$/) \ - f =3D substr(f, 1, length(f)-11); \ - print f $2; \ - }}'\'' \ - `find "$dir" -name Entries -print` /dev/null' $postprocess - fi - elif test -d .svn; then - eval exec svn list -R '"$dir"' $postprocess - else - echo "$0: Failed to determine type of version control used in `pwd`" 1= >&2 - exit 1 - fi -done - -# Local variables: -# eval: (add-hook 'before-save-hook 'time-stamp) -# time-stamp-start: "scriptversion=3D" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC0" -# time-stamp-end: "; # UTC" -# End: --=20 2.31.1