diff mbox series

[2/3] icu: Make the version consistent

Message ID 20240125092554.3657475-2-mingli.yu@windriver.com
State Rejected, archived
Headers show
Series [1/3] pkgconfig: Correct the PV | expand

Commit Message

Yu, Mingli Jan. 25, 2024, 9:25 a.m. UTC
From: Mingli Yu <mingli.yu@windriver.com>

Update the version in the bb name to make the version consistent.
Before the patch:
 # rpm -qa | grep icu
 icu-74+1-r0.core2_64
 # rpm -ql icu
 /usr
 /usr/bin
 /usr/bin/derb
 [snip]
 # derb --version
 derb version 1.1 (ICU version 74.1).
  Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html

After the patch:
 # rpm -qa | grep icu
 icu-74.1-r0.core2_64
 # rpm -ql icu
 /usr
 /usr/bin
 /usr/bin/derb
 [snip]
 # derb --version
 derb version 1.1 (ICU version 74.1).
  Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html

Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
---
 meta/recipes-support/icu/{icu_74-1.bb => icu_74.1.bb} | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
 rename meta/recipes-support/icu/{icu_74-1.bb => icu_74.1.bb} (96%)

Comments

Alexander Kanavin Jan. 25, 2024, 9:40 a.m. UTC | #1
This breaks upstream version check and automated updates, I can't accept that:

$ devtool latest-version icu
INFO: Current version: 74.1
INFO: Latest version: 74-2

It also breaks PV monotonically increasing.

Alex

On Thu, 25 Jan 2024 at 10:26, Yu, Mingli <mingli.yu@eng.windriver.com> wrote:
>
> From: Mingli Yu <mingli.yu@windriver.com>
>
> Update the version in the bb name to make the version consistent.
> Before the patch:
>  # rpm -qa | grep icu
>  icu-74+1-r0.core2_64
>  # rpm -ql icu
>  /usr
>  /usr/bin
>  /usr/bin/derb
>  [snip]
>  # derb --version
>  derb version 1.1 (ICU version 74.1).
>   Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html
>
> After the patch:
>  # rpm -qa | grep icu
>  icu-74.1-r0.core2_64
>  # rpm -ql icu
>  /usr
>  /usr/bin
>  /usr/bin/derb
>  [snip]
>  # derb --version
>  derb version 1.1 (ICU version 74.1).
>   Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html
>
> Signed-off-by: Mingli Yu <mingli.yu@windriver.com>
> ---
>  meta/recipes-support/icu/{icu_74-1.bb => icu_74.1.bb} | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>  rename meta/recipes-support/icu/{icu_74-1.bb => icu_74.1.bb} (96%)
>
> diff --git a/meta/recipes-support/icu/icu_74-1.bb b/meta/recipes-support/icu/icu_74.1.bb
> similarity index 96%
> rename from meta/recipes-support/icu/icu_74-1.bb
> rename to meta/recipes-support/icu/icu_74.1.bb
> index 88ded166b5..196b3dc579 100644
> --- a/meta/recipes-support/icu/icu_74-1.bb
> +++ b/meta/recipes-support/icu/icu_74.1.bb
> @@ -14,7 +14,7 @@ S = "${WORKDIR}/icu/source"
>  SPDX_S = "${WORKDIR}/icu"
>  STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
>
> -ICU_MAJOR_VER = "${@d.getVar('PV').split('-')[0]}"
> +ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
>
>  inherit autotools pkgconfig github-releases
>
> @@ -81,15 +81,15 @@ BBCLASSEXTEND = "native nativesdk"
>  LIC_FILES_CHKSUM = "file://../LICENSE;md5=08dc3852df8fffa807301902ad899ff8"
>
>  def icu_download_version(d):
> -    pvsplit = d.getVar('PV').split('-')
> +    pvsplit = d.getVar('PV').split('.')
>      return pvsplit[0] + "_" + pvsplit[1]
>
>  def icu_download_folder(d):
> -    pvsplit = d.getVar('PV').split('-')
> +    pvsplit = d.getVar('PV').split('.')
>      return pvsplit[0] + "-" + pvsplit[1]
>
>  def icu_install_folder(d):
> -    pvsplit = d.getVar('PV').split('-')
> +    pvsplit = d.getVar('PV').split('.')
>      return pvsplit[0] + "." + pvsplit[1]
>
>  ICU_PV = "${@icu_download_version(d)}"
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#194311): https://lists.openembedded.org/g/openembedded-core/message/194311
> Mute This Topic: https://lists.openembedded.org/mt/103950928/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
diff mbox series

Patch

diff --git a/meta/recipes-support/icu/icu_74-1.bb b/meta/recipes-support/icu/icu_74.1.bb
similarity index 96%
rename from meta/recipes-support/icu/icu_74-1.bb
rename to meta/recipes-support/icu/icu_74.1.bb
index 88ded166b5..196b3dc579 100644
--- a/meta/recipes-support/icu/icu_74-1.bb
+++ b/meta/recipes-support/icu/icu_74.1.bb
@@ -14,7 +14,7 @@  S = "${WORKDIR}/icu/source"
 SPDX_S = "${WORKDIR}/icu"
 STAGING_ICU_DIR_NATIVE = "${STAGING_DATADIR_NATIVE}/${BPN}/${PV}"
 
-ICU_MAJOR_VER = "${@d.getVar('PV').split('-')[0]}"
+ICU_MAJOR_VER = "${@d.getVar('PV').split('.')[0]}"
 
 inherit autotools pkgconfig github-releases
 
@@ -81,15 +81,15 @@  BBCLASSEXTEND = "native nativesdk"
 LIC_FILES_CHKSUM = "file://../LICENSE;md5=08dc3852df8fffa807301902ad899ff8"
 
 def icu_download_version(d):
-    pvsplit = d.getVar('PV').split('-')
+    pvsplit = d.getVar('PV').split('.')
     return pvsplit[0] + "_" + pvsplit[1]
 
 def icu_download_folder(d):
-    pvsplit = d.getVar('PV').split('-')
+    pvsplit = d.getVar('PV').split('.')
     return pvsplit[0] + "-" + pvsplit[1]
 
 def icu_install_folder(d):
-    pvsplit = d.getVar('PV').split('-')
+    pvsplit = d.getVar('PV').split('.')
     return pvsplit[0] + "." + pvsplit[1]
 
 ICU_PV = "${@icu_download_version(d)}"