Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kirkstone: python3-xmodem: do_install append is no longer required #34

Open
ngenetzky-appareo opened this issue Apr 24, 2023 · 2 comments

Comments

@ngenetzky-appareo
Copy link

ngenetzky-appareo commented Apr 24, 2023

The following packaging logic from python3-xmodem is causing an error when used with kirkstone layer. It appears that is logic is on longer required as we can see the correct files are installed in the correct locations (rather than in "${D}/usr/doc/").


do_install:append() {
    # Move the documentation files to the expected location so they are
    # packaged in the *-docs package.
    mkdir -p ${D}${docdir}/
    mv ${D}/usr/doc/* ${D}${docdir}/
    rmdir ${D}/usr/doc
}

Here is the error that is produced:

mv: cannot stat '<SNIP>/python3-xmodem/0.4.6-r0.2/image/usr/doc/*': No such file or directory
WARNING: exit code 1 from a shell command.                                   
ERROR: Logfile of failure stored in: <SNIP>/python3-xmodem/0.4.6-r0.2/temp/log.do_install.10947  

We can see that the correct files are installed:

$ find <SNIP>/python3-xmodem/0.4.6-r0/image/
<SNIP>/python3-xmodem/0.4.6-r0/image/
<SNIP>/python3-xmodem/0.4.6-r0/image/usr
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share/doc
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share/doc/ymodem.txt
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share/doc/XMODEM.TXT
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share/doc/XMODEM1K.TXT
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/share/doc/XMODMCRC.TXT
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem-0.4.6-py3.9.egg-info
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem-0.4.6-py3.9.egg-info/SOURCES.txt
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem-0.4.6-py3.9.egg-info/PKG-INFO
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem-0.4.6-py3.9.egg-info/top_level.txt
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem-0.4.6-py3.9.egg-info/dependency_links.txt
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem/__pycache__
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem/__pycache__/__main__.cpython-39.pyc
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem/__pycache__/__init__.cpython-39.pyc
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem/__main__.py
<SNIP>/python3-xmodem/0.4.6-r0/image/usr/lib/python3.9/site-packages/xmodem/__init__.py
@ngenetzky-appareo
Copy link
Author

Mentioning the author in the commit that added the logic.

CC: @hnez

commit 2d3933a18413548d15b7c3160df4195fe982a4c1
Author: Leonard Göhrs <[email protected]>
Date:   Mon May 9 08:58:31 2022 +0200

    python3-xmodem: add post install hook to move docs to correct location
    
    Signed-off-by: Leonard Göhrs <[email protected]>

diff --git a/recipes-backport/python/python3-xmodem_0.4.6.bb b/recipes-backport/python/python3-xmodem_0.4.6.bb
index 9d722b8..d89aabd 100644
--- a/recipes-backport/python/python3-xmodem_0.4.6.bb
+++ b/recipes-backport/python/python3-xmodem_0.4.6.bb
@@ -12,3 +12,11 @@ RDEPENDS:${PN} += " \
 "
 
 BBCLASSEXTEND = "native nativesdk"
+
+do_install:append() {
+    # Move the documentation files to the expected location so they are
+    # packaged in the *-docs package.
+    mkdir -p ${D}${docdir}/
+    mv ${D}/usr/doc/* ${D}${docdir}/
+    rmdir ${D}/usr/doc
+}

@Emantor
Copy link
Member

Emantor commented Apr 24, 2023

#33 mentions that kirkstone is not supported from the current master version, does it build successfully when you remove the do_install:append?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants