Skip to contentSkip to conversation

python3-libarchive-c: add the missing rdepends

PATCH In review Yu, Mingli 2 participants 4 messages Jul 1, 2020 – Jul 2, 2020

lore
Share & tools
lore
author
#1 lore raw

PATCH 2/2 python3: add ldconfig rdepends for python3-ctypes

In reply to Yu, Mingli

From: Mingli Yu <[email protected]>

The ctypes module needs to use "ldconfig -p" to find the library path and it simply has below logic if no ldconfig installed.
except OSError:
pass

Before the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

None

After the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

libarchive.so.13

---
 meta/recipes-devtools/python/python3_3.8.3.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.8.3.bb +1 -0
index 2eb2a422e6..abcd16e63d 100644
@@ -350,6 +350,7 @@ FILES_${PN}-man = "${datadir}/man"
 
 # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
 RDEPENDS_libpython3_append_libc-glibc = " libgcc"
+RDEPENDS_${PN}-ctypes_append_libc-glibc = " ldconfig"
 RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
 RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"
Signature · 1 line
2.17.1

Yu, Mingli

author
#0 lore raw

PATCH 1/2 python3-libarchive-c: add the missing rdepends

From: Mingli Yu <[email protected]>

Add the missing rdepends to fix below error:

 # python3
 [snip]
Quoted 1 line
Quoted 1 line
Quoted 1 line

import libarchive

[snip]
ModuleNotFoundError: No module named 'ctypes'
ModuleNotFoundError: No module named 'mmap'

---
 meta/recipes-devtools/python/python3-libarchive-c_2.9.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-devtools/python/python3-libarchive-c_2.9.bb +5 -1
index 4983ae527a..3a2d8733e9 100644
@@ -12,6 +12,10 @@ inherit pypi setuptools3
 SRC_URI[md5sum] = "083bd2cb0043c1e22a52cb9a05e31532"
 SRC_URI[sha256sum] = "9919344cec203f5db6596a29b5bc26b07ba9662925a05e24980b84709232ef60"
 
-RDEPENDS_${PN} += "libarchive"
+RDEPENDS_${PN} += "\
+  libarchive \
+  ${PYTHON_PN}-ctypes \
+  ${PYTHON_PN}-mmap \
+"
 
 BBCLASSEXTEND = "native"
Signature · 1 line
2.17.1
#2 lore raw

Re: [OE-core] [PATCH 2/2] python3: add ldconfig rdepends for python3-ctypes

In reply to Yu, Mingli
Quoted 30 lines · Mingli

From: Mingli Yu <[email protected]>

The ctypes module needs to use "ldconfig -p" to find the library path and it simply has below logic if no ldconfig installed.
except OSError:
pass

Before the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

None

After the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

libarchive.so.13

---
 meta/recipes-devtools/python/python3_3.8.3.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.8.3.bb +0 -0
index 2eb2a422e6..abcd16e63d 100644

meta/recipes-devtools/python/python3_3.8.3.bb FILES_${PN}-man = "${datadir}/man" · line 356

Quoted 7 lines
meta/recipes-devtools/python/python3_3.8.3.bb +1 -0
@@ -350,6 +350,7 @@ FILES_${PN}-man = "${datadir}/man"
 
 # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
 RDEPENDS_libpython3_append_libc-glibc = " libgcc"
+RDEPENDS_${PN}-ctypes_append_libc-glibc = " ldconfig"
 RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
 RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
 RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"

Throws warnings in test builds:

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/2123

Cheers,

Richard

author
#3 lore raw

Re: [OE-core] [PATCH 2/2] python3: add ldconfig rdepends for python3-ctypes

Quoted 41 lines · Richard Purdie
Quoted 30 lines · Mingli

From: Mingli Yu <[email protected]>

The ctypes module needs to use "ldconfig -p" to find the library path and it simply has below logic if no ldconfig installed.
except OSError:
pass

Before the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

None

After the patch:

Quoted 3 lines
Quoted 3 lines
Quoted 3 lines

from ctypes.util import find_library
lib_path = find_library('archive')
print(lib_path)

libarchive.so.13

---
  meta/recipes-devtools/python/python3_3.8.3.bb | 1 +
  1 file changed, 1 insertion(+)
meta/recipes-devtools/python/python3_3.8.3.bb +0 -0
index 2eb2a422e6..abcd16e63d 100644

meta/recipes-devtools/python/python3_3.8.3.bb FILES_${PN}-man = "${datadir}/man" · line 356

Quoted 7 lines
meta/recipes-devtools/python/python3_3.8.3.bb +1 -0
@@ -350,6 +350,7 @@ FILES_${PN}-man = "${datadir}/man"
 
  # See https://bugs.python.org/issue18748 and https://bugs.python.org/issue37395
  RDEPENDS_libpython3_append_libc-glibc = " libgcc"
+RDEPENDS_${PN}-ctypes_append_libc-glibc = " ldconfig"
  RDEPENDS_${PN}-ptest = "${PN}-modules ${PN}-tests unzip bzip2 libgcc tzdata-europe coreutils sed"
  RDEPENDS_${PN}-ptest_append_libc-glibc = " locale-base-tr-tr.iso-8859-9"
  RDEPENDS_${PN}-tkinter += "${@bb.utils.contains('PACKAGECONFIG', 'tk', 'tk tk-lib', '', d)}"

Throws warnings in test builds:

Quoted 1 line

https://autobuilder.yoctoproject.org/typhoon/#/builders/44/builds/2123

Will send V2 to fix the warning.

Thanks,

Quoted 5 lines

Cheers,

Richard