Patchwork perl: stop perl-modules recommending perl-ptest

login
register
mail settings
Submitter Ross Burton
Date May 22, 2014, 2:28 p.m.
Message ID <1400768912-5313-1-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/72585/
State Accepted
Commit 2f4f644e3983c57c4d910cd93a7725186cbf8dcf
Headers show

Comments

Ross Burton - May 22, 2014, 2:28 p.m.
Change the logic that generates the perl-modules recommends to be an include
filter instead of an exclude filter, so that new sub-packages don't become
dependants of perl-modules (such as perl-ptest).

[ YOCTO #6203 ]

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-devtools/perl/perl_5.14.3.bb |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

Patch

diff --git a/meta/recipes-devtools/perl/perl_5.14.3.bb b/meta/recipes-devtools/perl/perl_5.14.3.bb
index c307b99..c3ec5a8 100644
--- a/meta/recipes-devtools/perl/perl_5.14.3.bb
+++ b/meta/recipes-devtools/perl/perl_5.14.3.bb
@@ -320,7 +320,12 @@  python populate_packages_prepend () {
     do_split_packages(d, libdir, 'Module/([^\/]*)\.pm', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
     do_split_packages(d, libdir, 'Module/([^\/]*)/.*', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
     do_split_packages(d, libdir, '(^(?!(CPAN\/|CPANPLUS\/|Module\/|unicore\/|auto\/)[^\/]).*)\.(pm|pl|e2x)', 'perl-module-%s', 'perl module %s', recursive=True, allow_dirs=False, match_path=True, prepend=False)
-    d.setVar("RRECOMMENDS_${PN}-modules", d.getVar('PACKAGES', True).replace('${PN}-modules ', '').replace('${PN}-dbg ', '').replace('${PN}-misc ', '').replace('${PN}-dev ', '').replace('${PN}-pod ', '').replace('${PN}-doc ', ''))
+
+    # perl-modules should recommend every perl module, and only the
+    # modules. Don't attempt to use the result of do_split_packages() as some
+    # modules are manually split (eg. perl-module-unicore).
+    packages = filter(lambda p: 'perl-module-' in p, d.getVar('PACKAGES', True).split())
+    d.setVar("RRECOMMENDS_${PN}-modules", ' '.join(packages))
 }
 
 PACKAGES_DYNAMIC += "^perl-module-.*"