summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/classes/package.bbclass17
-rw-r--r--meta/recipes-qt/qt4/qt4.inc1
2 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 2bae34189d..54f7ae55cf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1039,6 +1039,8 @@ python populate_packages () {
1039 1039
1040 bb.utils.mkdirhier(outdir) 1040 bb.utils.mkdirhier(outdir)
1041 os.chdir(dvar) 1041 os.chdir(dvar)
1042
1043 autodebug = not (d.getVar("NOAUTOPACKAGEDEBUG", True) or False)
1042 1044
1043 # Sanity check PACKAGES for duplicates 1045 # Sanity check PACKAGES for duplicates
1044 # Sanity should be moved to sanity.bbclass once we have the infrastucture 1046 # Sanity should be moved to sanity.bbclass once we have the infrastucture
@@ -1048,6 +1050,8 @@ python populate_packages () {
1048 if pkg in package_list: 1050 if pkg in package_list:
1049 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg 1051 msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg
1050 package_qa_handle_error("packages-list", msg, d) 1052 package_qa_handle_error("packages-list", msg, d)
1053 elif autodebug and pkg.endswith("-dbg"):
1054 package_list.insert(0, pkg)
1051 else: 1055 else:
1052 package_list.append(pkg) 1056 package_list.append(pkg)
1053 d.setVar('PACKAGES', ' '.join(package_list)) 1057 d.setVar('PACKAGES', ' '.join(package_list))
@@ -1058,6 +1062,16 @@ python populate_packages () {
1058 # os.mkdir masks the permissions with umask so we have to unset it first 1062 # os.mkdir masks the permissions with umask so we have to unset it first
1059 oldumask = os.umask(0) 1063 oldumask = os.umask(0)
1060 1064
1065 debug = []
1066 for root, dirs, files in cpath.walk(dvar):
1067 dir = root[len(dvar):]
1068 if not dir:
1069 dir = os.sep
1070 for f in (files + dirs):
1071 path = "." + os.path.join(dir, f)
1072 if "/.debug/" in path or path.endswith("/.debug"):
1073 debug.append(path)
1074
1061 for pkg in package_list: 1075 for pkg in package_list:
1062 root = os.path.join(pkgdest, pkg) 1076 root = os.path.join(pkgdest, pkg)
1063 bb.utils.mkdirhier(root) 1077 bb.utils.mkdirhier(root)
@@ -1071,6 +1085,9 @@ python populate_packages () {
1071 origfiles = filesvar.split() 1085 origfiles = filesvar.split()
1072 files = files_from_filevars(origfiles) 1086 files = files_from_filevars(origfiles)
1073 1087
1088 if autodebug and pkg.endswith("-dbg"):
1089 files.extend(debug)
1090
1074 for file in files: 1091 for file in files:
1075 if (not cpath.islink(file)) and (not cpath.exists(file)): 1092 if (not cpath.islink(file)) and (not cpath.exists(file)):
1076 continue 1093 continue
diff --git a/meta/recipes-qt/qt4/qt4.inc b/meta/recipes-qt/qt4/qt4.inc
index 2058e54d3d..91be769231 100644
--- a/meta/recipes-qt/qt4/qt4.inc
+++ b/meta/recipes-qt/qt4/qt4.inc
@@ -129,6 +129,7 @@ PACKAGES_DYNAMIC += "^${QT_BASE_NAME}-plugin-.* ^${QT_BASE_NAME}-translation-.*
129 129
130ALLOW_EMPTY_${PN} = "1" 130ALLOW_EMPTY_${PN} = "1"
131FILES_${PN} = "" 131FILES_${PN} = ""
132NOAUTOPACKAGEDEBUG = "1"
132FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*" 133FILES_${PN}-dev = "${includedir}/${QT_DIR_NAME}/Qt/*"
133FILES_${PN}-dbg = "/usr/src/debug/" 134FILES_${PN}-dbg = "/usr/src/debug/"
134FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch" 135FILES_${QT_BASE_NAME}-demos-doc = "${docdir}/${QT_DIR_NAME}/qch/qt.qch"