diff options
Diffstat (limited to 'meta/classes/package.bbclass')
-rw-r--r-- | meta/classes/package.bbclass | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index a116948952..4ce9de2f57 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass @@ -1138,21 +1138,22 @@ python populate_packages () { # Sanity check PACKAGES for duplicates # Sanity should be moved to sanity.bbclass once we have the infrastructure - package_list = [] + package_dict = {} - for pkg in packages.split(): - if pkg in package_list: + for i, pkg in enumerate(packages.split()): + if pkg in package_dict: msg = "%s is listed in PACKAGES multiple times, this leads to packaging errors." % pkg package_qa_handle_error("packages-list", msg, d) # If debug-with-srcpkg mode is enabled then the src package will have # priority over dbg package when assigning the files. # This allows src package to include source files and remove them from dbg. elif split_source_package and pkg.endswith("-src"): - package_list.insert(0, pkg) - elif autodebug and pkg.endswith("-dbg") and not split_source_package: - package_list.insert(0, pkg) + package_dict[pkg] = (10, i) + elif autodebug and pkg.endswith("-dbg"): + package_dict[pkg] = (30, i) else: - package_list.append(pkg) + package_dict[pkg] = (50, i) + package_list = sorted(package_dict.keys(), key=package_dict.get) d.setVar('PACKAGES', ' '.join(package_list)) pkgdest = d.getVar('PKGDEST') |