util-linux: fix the pylibmount installation path
PATCH 1/1 util-linux: fix the pylibmount installation path
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}.
---
As we install libraries of util-linux in ${base_libdir} (/lib), the python library pylibmount is also installed there. An issue was raised when pylibmount was added to PACKAGECONFIG.
--- meta/recipes-core/util-linux/util-linux_2.38.1.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)
meta/recipes-core/util-linux/util-linux_2.38.1.bb +10 -1
@@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir python3targetconfig bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff"
@@ -320,3 +320,12 @@ do_install_ptest() { rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fi } + +do_install:append() { + if [ -d ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ] + then + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ${D}${PYTHON_SITEPACKAGES_DIR}/ + rm -rf ${D}${base_libdir}/${PYTHON_DIR} + fi +}
---
base-commit: ed04d429f742288bdc547a6537d536c97c89831f
change-id: 20230629-pylibmount-84dab8d2ba11
Best regards,
Signature · 1 line
Louis Rannou <[email protected]>
Quoted 28 lines · Louis Rannou
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}.
Signed-off-by Louis Rannou <[email protected]>---
As we install libraries of util-linux in ${base_libdir} (/lib), the python library pylibmount is also installed there. An issue was raised when pylibmount was added to PACKAGECONFIG.--- meta/recipes-core/util-linux/util-linux_2.38.1.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)meta/recipes-core/util-linux/util-linux_2.38.1.bb +1
-1@@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir python3targetconfig bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff"@@ -320,3 +320,12 @@ do_install_ptest() { rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fi
meta/recipes-core/util-linux/util-linux_2.38.1.bb do_install_ptest() { · line 331
Quoted 10 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb +9
-0} + +do_install:append() { + if [ -d ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ] + then + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ${D}${PYTHON_SITEPACKAGES_DIR}/ + rm -rf ${D}${base_libdir}/${PYTHON_DIR} + fi +}
When it is being installed, can we not pass the right path into the build system so it ends up in the right place?
Cheers,
Richard
Quoted 34 lines · Richard Purdie
Quoted 33 lines · Louis Rannou
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}.
Signed-off-by Louis Rannou <[email protected]>---
As we install libraries of util-linux in ${base_libdir} (/lib), the python library pylibmount is also installed there. An issue was raised when pylibmount was added to PACKAGECONFIG.--- meta/recipes-core/util-linux/util-linux_2.38.1.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)meta/recipes-core/util-linux/util-linux_2.38.1.bb +5
-1@@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir python3targetconfig bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff"@@ -320,3 +320,12 @@ do_install_ptest() { rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fi } + +do_install:append() { + if [ -d ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ] + then
Quoted 8 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb do_install_ptest() { · line 331
Quoted 5 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb +5
-0+ install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ${D}${PYTHON_SITEPACKAGES_DIR}/ + rm -rf ${D}${base_libdir}/${PYTHON_DIR} + fi +}When it is being installed, can we not pass the right path into the build system so it ends up in the right place?
I would love that. But the build system installs the libraries and the python package using the same prefix which we specify to ${base_libdir}. I have asked a quick question on IRC. I'll send a mail to the util-linux mailing list if I get no answer.
Louis
Quoted 43 lines · Louis Rannou
Quoted 34 lines · Richard Purdie
Quoted 33 lines · Louis Rannou
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}.
Signed-off-by Louis Rannou <[email protected]>---
As we install libraries of util-linux in ${base_libdir} (/lib), the python library pylibmount is also installed there. An issue was raised when pylibmount was added to PACKAGECONFIG.--- meta/recipes-core/util-linux/util-linux_2.38.1.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)meta/recipes-core/util-linux/util-linux_2.38.1.bb +5
-1@@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir python3targetconfig bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff"@@ -320,3 +320,12 @@ do_install_ptest() { rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fi } + +do_install:append() { + if [ -d ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ] + thenQuoted 8 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb do_install_ptest() { · line 331
Quoted 5 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb +5
-0+ install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ${D}${PYTHON_SITEPACKAGES_DIR}/ + rm -rf ${D}${base_libdir}/${PYTHON_DIR} + fi +}When it is being installed, can we not pass the right path into the build system so it ends up in the right place?
Quoted 4 lines
I would love that. But the build system installs the libraries and the python package using the same prefix which we specify to ${base_libdir}. I have asked a quick question on IRC. I'll send a mail to the util-linux mailing list if I get no answer.
Perhaps we should just let util-linux install to libdir instead of base_libdir. The reasons for using base_libdir are effectively historical now anyway...
Cheers,
Richard
Quoted 44 lines · Richard Purdie
Quoted 43 lines · Louis Rannou
Quoted 42 lines · Richard Purdie
Quoted 28 lines · Louis Rannou
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}.
Signed-off-by Louis Rannou <[email protected]>---
As we install libraries of util-linux in ${base_libdir} (/lib), the python library pylibmount is also installed there. An issue was raised when pylibmount was added to PACKAGECONFIG.--- meta/recipes-core/util-linux/util-linux_2.38.1.bb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-)meta/recipes-core/util-linux/util-linux_2.38.1.bb +1
-1@@ -1,7 +1,7 @@ require util-linux.inc #gtk-doc is not enabled as it requires xmlto which requires util-linux -inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir bash-completion ptest +inherit autotools gettext manpages pkgconfig systemd update-alternatives python3-dir python3targetconfig bash-completion ptest DEPENDS = "libcap-ng ncurses virtual/crypt zlib util-linux-libuuid" PACKAGES =+ "${PN}-swaponoff"@@ -320,3 +320,12 @@ do_install_ptest() { rm -rf ${D}${PTEST_PATH}/tests/ts/chfn fimeta/recipes-core/util-linux/util-linux_2.38.1.bb do_install_ptest() { · line 331
Quoted 10 lines
meta/recipes-core/util-linux/util-linux_2.38.1.bb +9
-0} + +do_install:append() { + if [ -d ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ] + then + install -d ${D}${PYTHON_SITEPACKAGES_DIR} + mv ${D}${base_libdir}/${PYTHON_DIR}/site-packages/libmount ${D}${PYTHON_SITEPACKAGES_DIR}/ + rm -rf ${D}${base_libdir}/${PYTHON_DIR} + fi +}When it is being installed, can we not pass the right path into the build system so it ends up in the right place?
Quoted 8 lines
Quoted 4 lines
I would love that. But the build system installs the libraries and the python package using the same prefix which we specify to ${base_libdir}. I have asked a quick question on IRC. I'll send a mail to the util-linux mailing list if I get no answer.
Perhaps we should just let util-linux install to libdir instead of
base_libdir. The reasons for usingbase_libdirare effectively historical now anyway...
I can do that, but if /lib and /usr/lib are distincts we probably require util-linux to be in /lib, don't we ? For example, if /usr is a separate partition.
Thanks,
Louis