Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.1 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDBF5C433DF for ; Tue, 19 May 2020 10:06:55 +0000 (UTC) Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 95E3F206D4 for ; Tue, 19 May 2020 10:06:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=xen.org header.i=@xen.org header.b="qA/0Cxx+" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 95E3F206D4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=xen.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jaz8u-0005km-2c; Tue, 19 May 2020 10:06:36 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jaz8s-0005kh-T8 for xen-devel@lists.xenproject.org; Tue, 19 May 2020 10:06:34 +0000 X-Inumbo-ID: 6ac97018-99b8-11ea-a8eb-12813bfff9fa Received: from mail.xenproject.org (unknown [104.130.215.37]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 6ac97018-99b8-11ea-a8eb-12813bfff9fa; Tue, 19 May 2020 10:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=xen.org; s=20200302mail; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID :Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID :Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To: Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe :List-Post:List-Owner:List-Archive; bh=MFa7Bhv3NLCsM2M0nsBmdqB1BOouQkXDgO8AR5eNfW8=; b=qA/0Cxx+XE4L+I84iKZuGtIi2K Z1ADjqWXkHyh4bXaSjzsH5bm/ugaWaorY0u0FiBCCfv9bbqKjzRXpkvEAJ3uWGzduOZYOsBzUFU3X 1Gpyqx1Sm4UUBT+Whjs5xUSA84b+F3De5NnCuF2/dZV+0Rzqm2a5dqqGLW/g+JElAGTM=; Received: from xenbits.xenproject.org ([104.239.192.120]) by mail.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jaz8q-0005OI-Ch; Tue, 19 May 2020 10:06:32 +0000 Received: from 96.142.6.51.dyn.plus.net ([51.6.142.96] helo=debian) by xenbits.xenproject.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1jaz8q-0000lc-39; Tue, 19 May 2020 10:06:32 +0000 Date: Tue, 19 May 2020 11:06:29 +0100 From: Wei Liu To: Anthony PERARD Subject: Re: [XEN PATCH 1/2] tools/python: Fix install-wrap Message-ID: <20200519100629.pnozlsd5ozc6gfvl@debian> References: <20200311175933.1362235-1-anthony.perard@citrix.com> <20200311175933.1362235-2-anthony.perard@citrix.com> <20200519085815.nswits7owiutn3nc@debian> <20200519094222.GB2105@perard.uk.xensource.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200519094222.GB2105@perard.uk.xensource.com> User-Agent: NeoMutt/20180716 X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: xen-devel@lists.xenproject.org, Ian Jackson , Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= , Wei Liu Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" On Tue, May 19, 2020 at 10:42:22AM +0100, Anthony PERARD wrote: > On Tue, May 19, 2020 at 09:58:15AM +0100, Wei Liu wrote: > > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. > > Haha :-) > > On Wed, Mar 11, 2020 at 05:59:32PM +0000, Anthony PERARD wrote: > > > This allows to use install-wrap when the source scripts is in a > > > subdirectory. > > > > > > Signed-off-by: Anthony PERARD > > > --- > > > tools/python/install-wrap | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > > > diff --git a/tools/python/install-wrap b/tools/python/install-wrap > > > index 00e2014016f9..fef24e01708d 100755 > > > --- a/tools/python/install-wrap > > > +++ b/tools/python/install-wrap > > > @@ -44,7 +44,7 @@ shift > > > destf="$dest" > > > for srcf in ${srcs}; do > > > if test -d "$dest"; then > > > - destf="$dest/${srcf%%*/}" > > > + destf="$dest/${srcf##*/}" > > > > This seems to have changed the pattern from "Remove Largest Suffix" to > > "Remove Largest Prefix". > > > > What does it do in practice? > > > > For POSIX sh > > > > x=posix/src/std > > echo ${x%%*/} -> posix/src/std > > echo ${x##*/} -> std > > > > I would think the former is what you want. But I could be missing > > something obvious. > > The former is a noop. It's the same as not doing anything. > > Unless x="dir/dir/" and in that case, the %% would remove everything, > resulting in an empty string. > > $srcf contains the path to where the script which we want to install is, > which is a relative path from where the ./install-wrap is executed from. > $destf is the final destination of the script, but if $dest is a > directory, then ./install-wrap wants to install the script in $dest, not > in some sub-directory of it. ./install-wrap doesn't handle this > sub-directory it fails to execute when there is one. (It's probably the > $install that failed to copy $srcf in a non-existing directory.) > > This from the next patch is probably where things fails > $(INSTALL_PYTHON_PROG) scripts/convert-legacy-stream $(DESTDIR)$(LIBEXEC_BIN) I see. Thanks for explaining. Acked-by: Wei Liu > > -- > Anthony PERARD