Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Luca Ceresoli <luca.ceresoli@bootlin.com>
To: "Alexander Kanavin" <alex.kanavin@gmail.com>
Cc: openembedded-core@lists.openembedded.org,
	Alexander Kanavin <alex@linutronix.de>
Subject: Re: [OE-core] [PATCH] apt: fix upstream version check
Date: Wed, 25 May 2022 10:29:04 +0200	[thread overview]
Message-ID: <20220525102904.016e5c61@melee> (raw)
In-Reply-To: <20220524173622.4033177-1-alex@linutronix.de>

Hi Alex,

Il giorno Tue, 24 May 2022 19:36:22 +0200
"Alexander Kanavin" <alex.kanavin@gmail.com> ha scritto:

> Signed-off-by: Alexander Kanavin <alex@linutronix.de>
> ---
>  meta/recipes-devtools/apt/apt_2.4.5.bb | 10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-devtools/apt/apt_2.4.5.bb b/meta/recipes-devtools/apt/apt_2.4.5.bb
> index 95c25e3036..1d94dd118c 100644
> --- a/meta/recipes-devtools/apt/apt_2.4.5.bb
> +++ b/meta/recipes-devtools/apt/apt_2.4.5.bb
> @@ -31,8 +31,14 @@ LIC_FILES_CHKSUM = "file://COPYING.GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263"
>  # the package is taken from snapshots.debian.org; that source is static and goes stale
>  # so we check the latest upstream from a directory that does get updated
>  UPSTREAM_CHECK_URI = "${DEBIAN_MIRROR}/main/a/apt/"
> -
> -inherit cmake perlnative bash-completion upstream-version-is-even useradd
> +# apt seems to follow a peculiar version policy, where every *other* even version
> +# is considered stable, e.g. 1.0, 1.4, 1.8, 2.2, 2.6, etc. As there is no way
> +# to express 'divisible by 4 plus 2' in regex (that I know of), let's hardcode a few.

Or, "how to reinvent the wheel in order to uselessly complicate other
people's lives".

I'm taking your patch for testing, but I have a question.

Is this  policy documented? If so, IMO a URL here would be nice.
Otherwise, is it wise to encode future stable releases here without
really knowing whether the practice seen so far will go on in the
future?

> +UPSTREAM_CHECK_REGEX = "[^\d\.](?P<pver>((2\.2)|(2\.6)|(3\.0)|(3\.4)|(3\.8)|(4\.2))(\.\d+)+)\.tar"

Maybe this would be more generic (untested):

  (([2468\.[26])|([3579]\.[048]))

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


  reply	other threads:[~2022-05-25  8:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-24 17:36 [PATCH] apt: fix upstream version check Alexander Kanavin
2022-05-25  8:29 ` Luca Ceresoli [this message]
2022-05-25 11:01   ` [OE-core] " Alexander Kanavin
2022-05-26  7:44     ` Luca Ceresoli

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=20220525102904.016e5c61@melee \
    --to=luca.ceresoli@bootlin.com \
    --cc=alex.kanavin@gmail.com \
    --cc=alex@linutronix.de \
    --cc=openembedded-core@lists.openembedded.org \
    /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