During the upgrade of qmmp, the following error occurs:
Warning: For recipe qmmp, the following files were installed but not shipped in any package:
| Warning:/usr/lib/qmmp/filedialogs/libqmatrix filedialog. So
| Warning:/usr/lib/qmmp/filedialogs/. debug/libqmatrix filedialog. So
| Warning:/usr/lib/qmmp/engines/libmplayer. So
| Warning:/usr/lib/qmmp/engines/. debug/libmplayer. So
| Warning:/usr/lib/qmmp/effect/libstereo. So
| Warning:/usr/lib/qmmp/effect/libladspa. So
....
| Error: QA issue: Non-dev/-dbg/-nativesdk package contains symlink. so: qmmp path'/work/i586-poky-linux/qmmp-0.5.1-r0/packages-Split/qmmp/usr/lib/libqmatrix UI. so'
| Error: QA issue: Non-dev/-dbg/-nativesdk package contains symlink. so: qmmp path'/work/i586-poky-linux/qmmp-0.5.1-r0/packages-Split/qmmp/usr/lib/libqmmp. so'
The preceding warning error indicates that these files are already in the image, but they are not included in the package (in the RPM package format.
Error: indicates that the link is included in the non-Dev, dbg, and nativesdk packages. For example:
In qmmp-0.5.2-r0.rpm this is a non-qmmp-dev-0.5.2.r0.rpm qmmp-dbg-0.5.2.r0.rpm, qmmp-nativesdk-r0.0.5.2.rpm, etc. It calls/usr/bin and/usr/lib/* resources into this package.
This is the case in the original BB file.
Files _ $ {PN} = "$ {bindir}/qmmp $ {libdir}/*. So *\
$ {Libdir}/qmmp/playlistformats/*. So \
$ {Libdir}/qmmp/output/libalsa. So \
$ {Libdir}/qmmp/transports/libhttp. So \
$ {Libdir}/qmmp/visual/libanalyzer. So \
$ {Datadir}/icons /*\
$ {Datadir}/qmmp/images /*\
$ {Datadir}/applications/qmmp. Desktop \
This version is correct, but it is not allowed in the latest version. Because $ {bindir} and $ {libdir} are the tools themselves. You do not have to do it again. In do_package_qa, a function will be used to determine whether there is a link library in the package directory *. so, if there is an error, the specific reason for doing so is unknown, and will be studied later.
To place a library with links, use lib * $ {solibs.
Qapathtest [Dev-So] = "package_qa_check_dev"
Def package_qa_check_dev (path, name, D, Elf, messages ):
"""
Check for ". So" library symlinks in non-dev packages
"""
If not name. endswith ("-dev") and not name. endswith ("-dbg") and not name. endswith ("-nativesdk") and path. endswith (". so ") and OS. path. islink (PATH ):
Messages. append ("non-dev/-dbg/-nativesdk package contains symlink. So: % s path '% S'" % \
(Name, package_qa_clean_path (path, d )))
Therefore, the correct syntax is as follows:
Files _ $ {PN} = + "\
$ {Libdir}/qmmp/*. So \
$ {Datadir}/icons /*\
$ {Datadir}/qmmp/images /*\
$ {Datadir}/applications/qmmp. desktop"
If yes, $ {bindir}, $ {libdir}/*, we need to manually add them, such as $ {libdir}/qmmp /*/*. so, because, qmmp /*/*. so is not a resource under $ {libdir.
Files _ $ {PN}-dbg + = "\
$ {Libdir}/qmmp/*/. debug /*\
"
Another problem is how to pack the library files under/usr/lib/qmmp into a package of each file.
Use the do_split_packge Function
Usage:
Packages_dynamic + = "qmmp-plugin -*"
Python populate_packages_prepend (){
Qmatrix _ libdir = BB. Data. Expand ('$ {libdir}/qmmp', d)
Do_split_packages (D, qmatrix _ libdir, '^ lib (. *)\. so $ ', 'qmmp -plugin-% s', 'qmmp % s plugin for', recursive = true, extra_depends = '')
}
I find. debug can't be packaged to RPM package because it is invisible directory. in current OE-core. debug was shipped to files _ $ {PN}-dbg, for example, GTK +, qt4-x11-free
If we want to split up. debug/* to single package, we can rename. Debug to debug to make this directory visible, then DEBUG directory can be split up to single package.
Please review the following two mode.
Mode 1: ship. Debug to files _ $ {PN}-dbg
Packages_dynamic = "qmmp-plugin -*"
Python populate_packages_prepend (){
Import OS
Qmatrix _ libdir = BB. Data. Expand ('$ {libdir}/qmmp', d)
GD = BB. Data. Expand ('$ {d}/$ {libdir}/qmp', d)
Plug_dirs = OS. listdir (GD)
# For makeing do_split_package for each grouping and name them correctly
# Qmmp -plugin-<group>-<library> with the description: qmmp <group> plugin for % s"
# I use the following method.
For plug_dir in plug_dirs:
G_plug_dir = OS. Path. Join (qmmp _libdir, plug_dir)
Do_split_packages (D, g_plug_dir, '^ lib (. *)\. so $ ', 'qmmp -in in-' + plug_dir + '-% s', 'qmmp' + plug_dir + 'in in for % s ')
}
# If I don't point files to ship file to $ {PN }, then file _ $ {PN} will get files in usr/lib/qmmp and qmmp-plug-* will not get files.
Files _ $ {PN} = "\
$ {Bindir}/qmmp \
$ {Libdir}/lib * $ {solibs }\
$ {Datadir}/icons /*\
$ {Datadir}/qmmp/images /*\
$ {Datadir}/applications /*\
"
Files _ $ {PN}-dbg + = "\
$ {Libdir}/qmmp/*/. debug /*\
"
========================================================== ========================================================== =
Mode 2: split up. Debug to sub-packages
Packages_dynamic = "qmmp-plugin-* qmmp-debug-plugin -*"
Python populate_packages_prepend (){
Import OS
Qmatrix _ libdir = BB. Data. Expand ('$ {libdir}/qmmp', d)
Qmatrix _ pkgd = BB. Data. Expand ('$ {workdir}/package/$ {libdir}/qmp', d)
GD = BB. Data. Expand ('$ {d}/$ {libdir}/qmp', d)
Plug_dirs = OS. listdir (GD)
For plug_dir in plug_dirs:
# Rename. Debug to debug
If OS. Path. exists (qmmp _pkgd + '/' + plug_dir + '/. debug '):
OS. Rename (qmatrix _ pkgd + '/' + plug_dir + '/. debug', qmatrix _ pkgd +'/'+ plug_dir +'/debug ')
G_plug_dir = OS. Path. Join (qmmp _libdir, plug_dir)
Do_split_packages (D, g_plug_dir, '^ lib (. *)\. so $ ', 'qmmp -in in-' + plug_dir + '-% s', 'qmmp' + plug_dir + 'in in for % s ')
# Split up. Debug to sub-packages
G_plug_debug_dir = OS. Path. Join (g_plug_dir, 'debug ')
Do_split_packages (D, g_plug_debug_dir, '^ lib (. *)\. so $ ', 'qmmp -debug-plugin-' + plug_dir + '-% s', 'qmmp' + plug_dir + 'in in debug for % s ')
}
# If I don't point files to ship file to $ {PN }, then file _ $ {PN} will get files in usr/lib/qmmp and qmmp-plug-* will not get files. I check GTK + and qt4-x11-free and find that they adopt the following method without using
Default mode.
Files _ $ {PN} = "\
$ {Bindir}/qmmp \
$ {Libdir}/lib * $ {solibs }\
$ {Datadir}/icons /*\
$ {Datadir}/qmmp/images /*\
$ {Datadir}/applications /*\