mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Jon Ringle <jon@ringle.org>
To: ptxdist@pengutronix.de
Cc: Michael Olbrich <m.olbrich@pengutronix.de>
Subject: Re: [ptxdist] [PATCH] more pkg_xpkg_version sanitizing
Date: Mon, 12 Dec 2011 11:51:30 -0500	[thread overview]
Message-ID: <CAMwGMjyPp2SHYOeQ3jqX72MZ3rAxhrfUkVrTkdvD16Q14aC_sw@mail.gmail.com> (raw)
In-Reply-To: <1323440400-29704-1-git-send-email-m.olbrich@pengutronix.de>


[-- Attachment #1.1: Type: text/plain, Size: 1156 bytes --]

On Fri, Dec 9, 2011 at 9:20 AM, Michael Olbrich <m.olbrich@pengutronix.de>wrote:

> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
> ---
>
> Does this look right? I'm also checking for '~' before alpha etc. otherwise
> it will be duplicated if it's already there.
>
> Michael
>
>  scripts/lib/ptxd_make_xpkg_common.sh |    4 +++-
>  1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/scripts/lib/ptxd_make_xpkg_common.sh
> b/scripts/lib/ptxd_make_xpkg_common.sh
> index deccd12..e1b7013 100644
> --- a/scripts/lib/ptxd_make_xpkg_common.sh
> +++ b/scripts/lib/ptxd_make_xpkg_common.sh
> @@ -70,9 +70,11 @@ ptxd_make_xpkg_init() {
>     #
>     # sanitize pkg_version
>     #
> +    # separate (alpha|beta|gamma|rc) with "~"
>     # replace "_" by "."
> +    # replace "-" by "+"
>     #
> -    pkg_xpkg_version="${pkg_version//_/.}"
> +    pkg_xpkg_version="$(sed -r 's/[~-]?(alpha|beta|gamma|rc)/~\1/g' <<<
> ${pkg_version} | tr '_-' '.+')"
>     if [ -z ${pkg_xpkg_version} ]; then
>        ptxd_bailout "${FUNCNAME}: please define <PKG>_VERSION"
>     fi
>

I tested this with the dialog package and it worked as expected.

Jon

[-- Attachment #1.2: Type: text/html, Size: 1707 bytes --]

[-- Attachment #2: Type: text/plain, Size: 48 bytes --]

-- 
ptxdist mailing list
ptxdist@pengutronix.de

      reply	other threads:[~2011-12-12 16:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-29 15:59 [ptxdist] [PATCH] ptxdist-2011.01.0 bug in make ipkg-push Benoît BURNICHON
2011-12-02 15:26 ` Michael Olbrich
2011-12-03  4:46   ` [ptxdist] [PATCH] ptxd_ipkg_rev_smaller: fix compare Jon Ringle
2011-12-05 10:35   ` [ptxdist] [PATCH] ptxdist-2011.01.0 bug in make ipkg-push Benoît BURNICHON
2011-12-08 15:37 ` Michael Olbrich
2011-12-08 15:41   ` Michael Olbrich
2011-12-08 15:45   ` Jon Ringle
2011-12-08 15:55     ` Michael Olbrich
2011-12-08 17:38       ` Benoît BURNICHON
2011-12-09 10:09         ` Michael Olbrich
2011-12-09 14:20         ` [ptxdist] [PATCH] more pkg_xpkg_version sanitizing Michael Olbrich
2011-12-12 16:51           ` Jon Ringle [this message]

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=CAMwGMjyPp2SHYOeQ3jqX72MZ3rAxhrfUkVrTkdvD16Q14aC_sw@mail.gmail.com \
    --to=jon@ringle.org \
    --cc=m.olbrich@pengutronix.de \
    --cc=ptxdist@pengutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox