Skip to contentSkip to conversation

pkgconfig: Correct the PV

PATCH In review [email protected] 2 participants 7 messages Jan 25, 2024 – Jan 26, 2024

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 pkgconfig: Correct the PV

From: Mingli Yu <[email protected]>

Correct the PV to make the version consistent.

Before the patch:

 # rpm -qa | grep pkgconfig
 pkgconfig-0.29.2+git0+d97db4fae4-r0.core2_64
 # rpm -ql pkgconfig
 /usr
 /usr/bin
 /usr/bin/pkg-config
 /usr/bin/x86_64-wrs-linux-gnu-pkg-config
 /usr/share
 /usr/share/aclocal
 /usr/share/aclocal/pkg.m4
 # pkg-config --version
 0.29.2

After the patch:

 # rpm -qa | grep pkgconfig
 pkgconfig-0.29.2-r0.core2_64
 # rpm -ql pkgconfig
 /usr
 /usr/bin
 /usr/bin/pkg-config
 /usr/bin/x86_64-wrs-linux-gnu-pkg-config
 /usr/share
 /usr/share/aclocal
 /usr/share/aclocal/pkg.m4
 # pkg-config --version
 0.29.2
---
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -1
index 16e6c5b609..53d2335317 100644
@@ -9,7 +9,7 @@ LICENSE = "GPL-2.0-or-later"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
 
 SRCREV = "d97db4fae4c1cd099b506970b285dc2afd818ea2"
-PV = "0.29.2+git"
+PV = "0.29.2"
 
 SRC_URI = "git://gitlab.freedesktop.org/pkg-config/pkg-config.git;branch=master;protocol=https \
            file://pkg-config-esdk.in \
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 icu: Make the version consistent

From: Mingli Yu <[email protected]>

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
---
 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%)
meta/recipes-support/icu/icu_74.1.bb renamed from meta/recipes-support/icu/icu_74-1.bb +4 -4
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
@@ -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)}"
Signature · 1 line
2.25.1
#2 lore raw

Re: [OE-core] [PATCH 2/3] icu: Make the version consistent

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

Quoted 81 lines · Mingli

From: Mingli Yu <[email protected]>

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
---
 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%)
meta/recipes-support/icu/icu_74.1.bb renamed from meta/recipes-support/icu/icu_74-1.bb +4 -5
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
@@ -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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#3 lore raw

PATCH 3/3 blktool: Make the version consistent

In reply to [email protected]

From: Mingli Yu <[email protected]>

Update the version to make package version consistent and there is indeed the source as blktool_4.orig.tar.gz [1].
Before the patch:

  # rpm -qa | grep blktool
  blktool-4+7.1-r0.core2_64
  # blktool
  blktool version 4
  usage: blktool [options] DEVICE COMMAND [args...]
  command list:
  ATA     defect-mgmt { off | on }
  ATA     dev-keep-settings { off | on }
  any     dev-read-ahead { off | on }
  [snip]
After the patch:
  # rpm -qa | grep blktool
  blktool-4-r0.core2_64
  # blktool
  blktool version 4
  usage: blktool [options] DEVICE COMMAND [args...]
  command list:
  ATA     defect-mgmt { off | on }
  ATA     dev-keep-settings { off | on }
  any     dev-read-ahead { off | on }
  [snip]

[1] http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/blktool/

---
 meta/recipes-extended/blktool/{blktool_4-7.1.bb => blktool_4.bb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-extended/blktool/{blktool_4-7.1.bb => blktool_4.bb} (100%)
meta/recipes-extended/blktool/blktool_4.bb renamed from meta/recipes-extended/blktool/blktool_4-7.1.bb +0 -0
similarity index 100%
rename from meta/recipes-extended/blktool/blktool_4-7.1.bb
rename to meta/recipes-extended/blktool/blktool_4.bb
Signature · 1 line
2.25.1
#4 lore raw

Re: [OE-core] [PATCH 3/3] blktool: Make the version consistent

Doesn't this also break PV monotonically increasing?

Alex

Quoted 52 lines · Mingli

From: Mingli Yu <[email protected]>

Update the version to make package version consistent and there is indeed the source as blktool_4.orig.tar.gz [1].
Before the patch:

  # rpm -qa | grep blktool
  blktool-4+7.1-r0.core2_64
  # blktool
  blktool version 4
  usage: blktool [options] DEVICE COMMAND [args...]
  command list:
  ATA     defect-mgmt { off | on }
  ATA     dev-keep-settings { off | on }
  any     dev-read-ahead { off | on }
  [snip]
After the patch:
  # rpm -qa | grep blktool
  blktool-4-r0.core2_64
  # blktool
  blktool version 4
  usage: blktool [options] DEVICE COMMAND [args...]
  command list:
  ATA     defect-mgmt { off | on }
  ATA     dev-keep-settings { off | on }
  any     dev-read-ahead { off | on }
  [snip]

[1] http://snapshot.debian.org/archive/debian/20160728T043443Z/pool/main/b/blktool/

---
 meta/recipes-extended/blktool/{blktool_4-7.1.bb => blktool_4.bb} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename meta/recipes-extended/blktool/{blktool_4-7.1.bb => blktool_4.bb} (100%)
meta/recipes-extended/blktool/blktool_4.bb renamed from meta/recipes-extended/blktool/blktool_4-7.1.bb +0 -1
similarity index 100%
rename from meta/recipes-extended/blktool/blktool_4-7.1.bb
rename to meta/recipes-extended/blktool/blktool_4.bb
--

2.25.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#194312): https://lists.openembedded.org/g/openembedded-core/message/194312
Mute This Topic: https://lists.openembedded.org/mt/103950929/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
In reply to [email protected]

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb LICENSE = "GPL-2.0-or-later" · line 12

Quoted 7 lines · Mingli

From: Mingli Yu <[email protected]>

Correct the PV to make the version consistent.
SRCREV = "d97db4fae4c1cd099b506970b285dc2afd818ea2"

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -1
-PV = "0.29.2+git"
+PV = "0.29.2"

0.29.2 release tag maps to a different commit, so we cannot drop +git:
https://gitlab.freedesktop.org/pkg-config/pkg-config/-/tags/pkg-config-0.29.2

It helps if you explain the broader goal. Why does version as reported by rpm need to match version as reported by component exactly? Can't you strip all the suffixes from what rpm says?

Alex

author
#6 lore raw
Quoted 7 lines · Alexander Kanavin

CAUTION: This email comes from a non Wind River email account!
Do not click links or open attachments unless you recognize the sender and know the content is safe.

Quoted 3 lines · Mingli

From: Mingli Yu <[email protected]>

Quoted 7 lines

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb LICENSE = "GPL-2.0-or-later" · line 12

Quoted 4 lines

Correct the PV to make the version consistent.
SRCREV = "d97db4fae4c1cd099b506970b285dc2afd818ea2"

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -1
-PV = "0.29.2+git"
+PV = "0.29.2"

0.29.2 release tag maps to a different commit, so we cannot drop +git:
https://gitlab.freedesktop.org/pkg-config/pkg-config/-/tags/pkg-config-0.29.2

Thanks Alex to pointing out! The commit [1] did make to update pkgconfig to a non-release version.

[1] https://git.openembedded.org/openembedded-core/commit/?id=fd621eefee1a4acaffa3754b76f8e14d2684ab3f

Quoted 4 lines

It helps if you explain the broader goal. Why does version as reported by rpm need to match version as reported by component exactly? Can't you strip all the suffixes from what rpm says?

For some reasons, the user complains the version which rpm says is not consistent with the version which reported by some binary as below though no function impacts. So we try to fix the gap.

 # rpm -qa | grep pkgconfig
 pkgconfig-0.29.2+git0+d97db4fae4-r0.core2_64
 # rpm -ql pkgconfig
 /usr
 /usr/bin
 /usr/bin/pkg-config
 /usr/bin/x86_64-wrs-linux-gnu-pkg-config
 /usr/share
 /usr/share/aclocal
 /usr/share/aclocal/pkg.m4
 # pkg-config --version
 0.29.2

Thanks,

Quoted 2 lines

Alex