From 63e21e9e1be32d9058d7d76aa731bead985f5838 Mon Sep 17 00:00:00 2001 From: Michael Pyne Date: Sat, 15 Dec 2012 20:47:12 -0500 Subject: [PATCH] kde-projects: Don't pull in modules w/out right branch. It's easiest to describe by giving the test case: module-set kde-workspace-utils repository kde-projects use-modules kde/kdeutils branch KDE/4.9 end-module-set This pulled in all modules available under the kde/kdeutils virtual path, including print-manager (a program only available from KDE/4.10 on). When kdesrc-build tried to switch the branch of print-manager to KDE/4.9 it failed after cloning. Now we don't even try cloning print-manager (or in general, any module that doesn't have a branch specified for the whole module-set). To be clear, this is the only level of detail we look at for filtering at this point: Is a branch option given for the module-set, and if so we filter out non-matching modules that would be implicitly selected. BUG:307694 FIXED-IN:1.16 --- kdesrc-build | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/kdesrc-build b/kdesrc-build index 594c515..f0b97ba 100755 --- a/kdesrc-build +++ b/kdesrc-build @@ -811,6 +811,15 @@ sub expandXMLModules # projects.kde.org, elide those. my @xmlResults = grep { $_->{'active'} ne 'false' } (@allXmlResults); + # Bug 307694 + my $moduleSetBranch = $moduleSet->getOption('branch', 'module'); + if ($moduleSetBranch) { + debug ("Filtering kde-projects modules that don't have a $moduleSetBranch branch"); + @xmlResults = grep { + list_has($_->{'branches'}, $moduleSetBranch) + } (@xmlResults); + } + if (!@xmlResults) { # If this was a "guessed XML module" then we guessed wrong, and it's really # a misspelling.