[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH 1/2] tools/python: Fix install-wrap
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. > > 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 <anthony.perard@xxxxxxxxxx> > > --- > > 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) -- Anthony PERARD
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |