Message ID | 20230629-pylibmount-v1-1-342da6733d5d@baylibre.com |
---|---|
State | New |
Headers | show |
Series | util-linux: fix the pylibmount installation path | expand |
On Thu, 2023-06-29 at 12:37 +0000, Louis Rannou wrote: > Append the install task to move the python library from ${base_libdir} > to ${PYTHON_SITEPACKAGES_DIR}. > > Signed-off-by: Louis Rannou <lrannou@baylibre.com> > --- > 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(-) > > diff --git a/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/meta/recipes-core/util-linux/util-linux_2.38.1.bb > index 9ea7a04e8a..f9a9fdcfaf 100644 > --- a/meta/recipes-core/util-linux/util-linux_2.38.1.bb > +++ b/meta/recipes-core/util-linux/util-linux_2.38.1.bb > @@ -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 > +} 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
On 29/06/2023 14:59, Richard Purdie wrote: > On Thu, 2023-06-29 at 12:37 +0000, Louis Rannou wrote: >> Append the install task to move the python library from ${base_libdir} >> to ${PYTHON_SITEPACKAGES_DIR}. >> >> Signed-off-by: Louis Rannou <lrannou@baylibre.com> >> --- >> 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(-) >> >> diff --git a/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/meta/recipes-core/util-linux/util-linux_2.38.1.bb >> index 9ea7a04e8a..f9a9fdcfaf 100644 >> --- a/meta/recipes-core/util-linux/util-linux_2.38.1.bb >> +++ b/meta/recipes-core/util-linux/util-linux_2.38.1.bb >> @@ -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 >> +} > > 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
On Thu, 2023-06-29 at 15:50 +0200, Louis Rannou wrote: > On 29/06/2023 14:59, Richard Purdie wrote: > > On Thu, 2023-06-29 at 12:37 +0000, Louis Rannou wrote: > > > Append the install task to move the python library from ${base_libdir} > > > to ${PYTHON_SITEPACKAGES_DIR}. > > > > > > Signed-off-by: Louis Rannou <lrannou@baylibre.com> > > > --- > > > 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(-) > > > > > > diff --git a/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/meta/recipes-core/util-linux/util-linux_2.38.1.bb > > > index 9ea7a04e8a..f9a9fdcfaf 100644 > > > --- a/meta/recipes-core/util-linux/util-linux_2.38.1.bb > > > +++ b/meta/recipes-core/util-linux/util-linux_2.38.1.bb > > > @@ -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 > > > +} > > > > 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. 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
On 29/06/2023 16:04, Richard Purdie wrote: > On Thu, 2023-06-29 at 15:50 +0200, Louis Rannou wrote: >> On 29/06/2023 14:59, Richard Purdie wrote: >>> On Thu, 2023-06-29 at 12:37 +0000, Louis Rannou wrote: >>>> Append the install task to move the python library from ${base_libdir} >>>> to ${PYTHON_SITEPACKAGES_DIR}. >>>> >>>> Signed-off-by: Louis Rannou <lrannou@baylibre.com> >>>> --- >>>> 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(-) >>>> >>>> diff --git a/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/meta/recipes-core/util-linux/util-linux_2.38.1.bb >>>> index 9ea7a04e8a..f9a9fdcfaf 100644 >>>> --- a/meta/recipes-core/util-linux/util-linux_2.38.1.bb >>>> +++ b/meta/recipes-core/util-linux/util-linux_2.38.1.bb >>>> @@ -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 >>>> +} >>> >>> 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. > > 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... 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
diff --git a/meta/recipes-core/util-linux/util-linux_2.38.1.bb b/meta/recipes-core/util-linux/util-linux_2.38.1.bb index 9ea7a04e8a..f9a9fdcfaf 100644 --- a/meta/recipes-core/util-linux/util-linux_2.38.1.bb +++ b/meta/recipes-core/util-linux/util-linux_2.38.1.bb @@ -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 +}
Append the install task to move the python library from ${base_libdir} to ${PYTHON_SITEPACKAGES_DIR}. Signed-off-by: Louis Rannou <lrannou@baylibre.com> --- 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(-) --- base-commit: ed04d429f742288bdc547a6537d536c97c89831f change-id: 20230629-pylibmount-84dab8d2ba11 Best regards,