From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Cc: bitbake-devel@lists.openembedded.org
Subject: Re: [PATCH 1/3] fetcher: quote filenames given in commands
Date: Sat, 14 Apr 2012 11:21:38 +0100 [thread overview]
Message-ID: <1334398898.7309.97.camel@ted> (raw)
In-Reply-To: <1334325973-15760-1-git-send-email-enrico.scholz@informatik.tu-chemnitz.de>
On Fri, 2012-04-13 at 16:06 +0200, Enrico Scholz wrote:
> Filenames were given as-is to shell commands. This causes problems
> when names contain characters which have a special meaning. E.g. when
> having a local systemd unit
>
> | SRC_URI = "file://etc-machine\20id.mount"
>
> the fetcher failed with
>
> | NOTE: Unpacking .../etc-machine\20id.mount to ...
> | cp: cannot stat `.../etc-machine20id.mount': No such file or directory
>
> Patch uses the pipes.quote() function to apply shell escaping. These
> changes are not really complete; they are modifying __init__.py only
> but most fetchers need similar adaptations too.
>
> Signed-off-by: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
> ---
> lib/bb/fetch2/__init__.py | 38 +++++++++++++++++++++-----------------
> 1 files changed, 21 insertions(+), 17 deletions(-)
Whilst I understand what you're trying to fix, I'm afraid I don't like
the patch. I'd prefer to have one way of building these commands, rather
than two different ones with the shell=isinstance(cmd, basestring)
check.
We're stabilising for release at the moment and I don't have enough
confidence in these patches at this point in the cycle, particularly
since you change runfetchcmd but not other users in other fetch methods
other than git. I'm planning to hold off these until after that and even
then, I'd like to find a cleaner approach that doesn't involve
runfetchcmd2.
Cheers,
Richard
next prev parent reply other threads:[~2012-04-14 10:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-13 14:06 [PATCH 1/3] fetcher: quote filenames given in commands Enrico Scholz
2012-04-13 14:06 ` [PATCH 2/3] runfetchcmd(): allow to use a sequence as cmd Enrico Scholz
2012-04-13 14:06 ` [PATCH 3/3] fetch2/git: quote arguments Enrico Scholz
2012-04-14 10:21 ` Richard Purdie [this message]
2012-04-14 13:20 ` [PATCH 1/3] fetcher: quote filenames given in commands Enrico Scholz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1334398898.7309.97.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=bitbake-devel@lists.openembedded.org \
--cc=enrico.scholz@informatik.tu-chemnitz.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.