summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package.bbclass28
-rw-r--r--meta/conf/bitbake.conf11
2 files changed, 25 insertions, 14 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 749c7d9ea1..4c0a859536 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1128,7 +1128,7 @@ python populate_packages () {
1128 workdir = d.getVar('WORKDIR') 1128 workdir = d.getVar('WORKDIR')
1129 outdir = d.getVar('DEPLOY_DIR') 1129 outdir = d.getVar('DEPLOY_DIR')
1130 dvar = d.getVar('PKGD') 1130 dvar = d.getVar('PKGD')
1131 packages = d.getVar('PACKAGES') 1131 packages = d.getVar('PACKAGES').split()
1132 pn = d.getVar('PN') 1132 pn = d.getVar('PN')
1133 1133
1134 bb.utils.mkdirhier(outdir) 1134 bb.utils.mkdirhier(outdir)
@@ -1138,32 +1138,34 @@ python populate_packages () {
1138 1138
1139 split_source_package = (d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg') 1139 split_source_package = (d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-with-srcpkg')
1140 1140
1141 # If debug-with-srcpkg mode is enabled then the src package is added 1141 # If debug-with-srcpkg mode is enabled then add the source package if it
1142 # into the package list and the source directory as its main content 1142 # doesn't exist and add the source file contents to the source package.
1143 if split_source_package: 1143 if split_source_package:
1144 src_package_name = ('%s-src' % d.getVar('PN')) 1144 src_package_name = ('%s-src' % d.getVar('PN'))
1145 packages += (' ' + src_package_name) 1145 if not src_package_name in packages:
1146 packages.append(src_package_name)
1146 d.setVar('FILES_%s' % src_package_name, '/usr/src/debug') 1147 d.setVar('FILES_%s' % src_package_name, '/usr/src/debug')
1147 1148
1148 # Sanity check PACKAGES for duplicates 1149 # Sanity check PACKAGES for duplicates
1149 # Sanity should be moved to sanity.bbclass once we have the infrastructure 1150 # Sanity should be moved to sanity.bbclass once we have the infrastructure
1150 package_dict = {} 1151 package_dict = {}
1151 1152
1152 for i, pkg in enumerate(packages.split()): 1153 for i, pkg in enumerate(packages):
1153 if pkg in package_dict: 1154 if pkg in package_dict:
1154 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1155 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg
1155 package_qa_handle_error("packages-list", msg, d) 1156 package_qa_handle_error("packages-list", msg, d)
1156 # If debug-with-srcpkg mode is enabled then the src package will have 1157 # Ensure the source package gets the chance to pick up the source files
1157 # priority over dbg package when assigning the files. 1158 # before the debug package by ordering it first in PACKAGES. Whether it
1158 # This allows src package to include source files and remove them from dbg. 1159 # actually picks up any source files is controlled by
1159 elif split_source_package and pkg.endswith("-src"): 1160 # PACKAGE_DEBUG_SPLIT_STYLE.
1161 elif pkg.endswith("-src"):
1160 package_dict[pkg] = (10, i) 1162 package_dict[pkg] = (10, i)
1161 elif autodebug and pkg.endswith("-dbg"): 1163 elif autodebug and pkg.endswith("-dbg"):
1162 package_dict[pkg] = (30, i) 1164 package_dict[pkg] = (30, i)
1163 else: 1165 else:
1164 package_dict[pkg] = (50, i) 1166 package_dict[pkg] = (50, i)
1165 package_list = sorted(package_dict.keys(), key=package_dict.get) 1167 packages = sorted(package_dict.keys(), key=package_dict.get)
1166 d.setVar('PACKAGES', ' '.join(package_list)) 1168 d.setVar('PACKAGES', ' '.join(packages))
1167 pkgdest = d.getVar('PKGDEST') 1169 pkgdest = d.getVar('PKGDEST')
1168 1170
1169 seen = [] 1171 seen = []
@@ -1181,7 +1183,7 @@ python populate_packages () {
1181 if "/.debug/" in path or path.endswith("/.debug"): 1183 if "/.debug/" in path or path.endswith("/.debug"):
1182 debug.append(path) 1184 debug.append(path)
1183 1185
1184 for pkg in package_list: 1186 for pkg in packages:
1185 root = os.path.join(pkgdest, pkg) 1187 root = os.path.join(pkgdest, pkg)
1186 bb.utils.mkdirhier(root) 1188 bb.utils.mkdirhier(root)
1187 1189
@@ -1252,7 +1254,7 @@ python populate_packages () {
1252 1254
1253 # Handle LICENSE_EXCLUSION 1255 # Handle LICENSE_EXCLUSION
1254 package_list = [] 1256 package_list = []
1255 for pkg in packages.split(): 1257 for pkg in packages:
1256 if d.getVar('LICENSE_EXCLUSION-' + pkg): 1258 if d.getVar('LICENSE_EXCLUSION-' + pkg):
1257 msg = "%s has an incompatible license. Excluding from packaging." % pkg 1259 msg = "%s has an incompatible license. Excluding from packaging." % pkg
1258 package_qa_handle_error("incompatible-license", msg, d) 1260 package_qa_handle_error("incompatible-license", msg, d)
diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index f1540a0acf..8fc4e9bc1a 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -237,6 +237,10 @@ DESCRIPTION ?= "${SUMMARY}."
237#SUMMARY_${PN} ?= "${SUMMARY}" 237#SUMMARY_${PN} ?= "${SUMMARY}"
238#DESCRIPTION_${PN} ?= "${DESCRIPTION}" 238#DESCRIPTION_${PN} ?= "${DESCRIPTION}"
239 239
240SUMMARY_${PN}-src ?= "${SUMMARY} - Source files"
241DESCRIPTION_${PN}-src ?= "${DESCRIPTION} \
242This package contains sources for debugging purposes."
243
240SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files" 244SUMMARY_${PN}-dbg ?= "${SUMMARY} - Debugging files"
241DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \ 245DESCRIPTION_${PN}-dbg ?= "${DESCRIPTION} \
242This package contains ELF symbols and related sources for debugging purposes." 246This package contains ELF symbols and related sources for debugging purposes."
@@ -285,7 +289,7 @@ SOLIBSDEV_darwin = ".dylibbroken"
285PACKAGE_DEBUG_SPLIT_STYLE ?= "debug-with-srcpkg" 289PACKAGE_DEBUG_SPLIT_STYLE ?= "debug-with-srcpkg"
286 290
287PACKAGE_BEFORE_PN ?= "" 291PACKAGE_BEFORE_PN ?= ""
288PACKAGES = "${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}" 292PACKAGES = "${PN}-src ${PN}-dbg ${PN}-staticdev ${PN}-dev ${PN}-doc ${PN}-locale ${PACKAGE_BEFORE_PN} ${PN}"
289PACKAGES_DYNAMIC = "^${PN}-locale-.*" 293PACKAGES_DYNAMIC = "^${PN}-locale-.*"
290FILES = "" 294FILES = ""
291 295
@@ -324,6 +328,11 @@ FILES_${PN}-dbg = "/usr/lib/debug /usr/src/debug"
324SECTION_${PN}-dbg = "devel" 328SECTION_${PN}-dbg = "devel"
325ALLOW_EMPTY_${PN}-dbg = "1" 329ALLOW_EMPTY_${PN}-dbg = "1"
326 330
331# The files list for source packages are dynamically set based on
332# PACKAGE_DEBUG_SPLIT_STYLE
333FILES_${PN}-src = ""
334SECTION_${PN}-src = "devel"
335
327FILES_${PN}-locale = "${datadir}/locale" 336FILES_${PN}-locale = "${datadir}/locale"
328 337
329# File manifest 338# File manifest