[Blends-commit] [Git][blends-team/blends][master] Degrade packages from contrib/non-free to Suggests even when enforcing strict depends

Andreas Tille gitlab at salsa.debian.org
Thu Mar 15 18:39:00 UTC 2018


Andreas Tille pushed to branch master at Debian Blends Team / blends


Commits:
52c03be2 by Andreas Tille at 2018-03-15T19:38:47+01:00
Degrade packages from contrib/non-free to Suggests even when enforcing strict depends

- - - - -


2 changed files:

- debian/changelog
- devtools/blend-gen-control


Changes:

=====================================
debian/changelog
=====================================
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,9 @@
 blends (0.6.101) UNRELEASED; urgency=medium
 
   * Moved to Salsa
+  * Degrade packages from contrib/non-free to Suggests even when enforcing
+    strict depends
+    Closes: #891188
 
  -- Andreas Tille <tille at debian.org>  Fri, 02 Mar 2018 14:44:16 +0100
 


=====================================
devtools/blend-gen-control
=====================================
--- a/devtools/blend-gen-control
+++ b/devtools/blend-gen-control
@@ -264,20 +264,31 @@ sub gen_control {
         else {
                 my $pkglist;
                 my $missinglist;
+                my $pkgcandidate;
                 if (defined $taskinfo{$task}{Depends})
                 {
                     ($pkglist, $missinglist) = process_pkglist(join(",",@{$taskinfo{$task}{Depends}}));
                 }
+                # make sure that $missinglist will not remain empty if there are no Depends defined
+                if (defined $taskinfo{$task}{Recommends})
+                {
+                    ($pkglist, $missinglist) = process_pkglist(join(",",@{$taskinfo{$task}{Recommends}}));
+                }
 
                 my (@depends, @recommends, @suggests);
 
                 push @depends, $tasksname.' (= ${source:Version})';
                 push @depends, '${misc:Depends}';
-                push @depends, @{$pkglist}
-                    if defined $pkglist;
-
-                push @recommends, @{$taskinfo{$task}{Recommends}}
-                    if defined $taskinfo{$task}{Recommends};
+                if ( defined $pkglist ) {
+                    for $pkgcandidate (@{$pkglist}) {
+                        unless ( grep( /^$pkgcandidate$/, $missinglist ) ) { push @depends, $pkgcandidate };
+                    }
+                }
+                if ( defined $taskinfo{$task}{Recommends} ) {
+                    for $pkgcandidate (@{$taskinfo{$task}{Recommends}}) {
+                        unless ( grep( /^$pkgcandidate$/, $missinglist ) ) { push @recommends, $pkgcandidate };
+                    }
+                }
 
                 push @suggests, @{$missinglist}
                     if defined $missinglist;



View it on GitLab: https://salsa.debian.org/blends-team/blends/commit/52c03be2a1f688e252b919122427d420d6bcf334

---
View it on GitLab: https://salsa.debian.org/blends-team/blends/commit/52c03be2a1f688e252b919122427d420d6bcf334
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/blends-commit/attachments/20180315/d48d090c/attachment-0001.html>


More information about the Blends-commit mailing list