[Blends-commit] [SCM] website branch, master, updated. 2535a81b90b695e2c9b985d638cee436fbf9cadf

Ole Streicher olebole at debian.org
Wed Apr 27 11:53:42 UTC 2016


The following commit has been merged in the master branch:
commit 2535a81b90b695e2c9b985d638cee436fbf9cadf
Author: Ole Streicher <olebole at debian.org>
Date:   Wed Apr 27 13:49:36 2016 +0200

    Simplify dependency creation
    This is apreparation to lower the priority of alternatives.
    The idea is that in alternatives separated with "|" in high relevance packages,
    only the main dependency goes into that section. Other alternatives shall
    go into low relevance packages: they are not going to be installed by default,
    but may be on request.
    A use case is to put "python" and "python3" packages as alternatives. Since
    we should make a transition to Python 3, Python 2 packages (when listed as
    alternative) should only have a lower priority.

diff --git a/webtools/blendstasktools.py b/webtools/blendstasktools.py
index 1b2fcc3..d344642 100644
--- a/webtools/blendstasktools.py
+++ b/webtools/blendstasktools.py
@@ -1148,15 +1148,12 @@ class TaskDependencies:
 
                     # turn alternatives ('|') into real depends for this purpose
                     # because we are finally interested in all alternatives
-                    dependencylist = dependencies.replace('|', ',').split(',')
-                    # Collect all dependencies in one line first,
-                    # create an object for each later
-                    deps_in_one_line = []
-                    for dependency in dependencylist:
-                        if dependency.strip() != '':  # avoid confusion when ',' is at end of line
-                            deps_in_one_line.append(dependency.strip())
-
-                    for dep_in_line in deps_in_one_line:
+                    dependencies = dependencies.replace('|', ',')
+
+                    for dep_in_line in dependencies.split(','):
+                        dep_in_line = dep_in_line.strip()
+                        if not dep_in_line:
+                            continue
                         # If there are more than one dependencies in one line
                         # just put the current one into the right list of dependencies
                         # before initiating the next instance

-- 
Static and dynamic websites for Debian Pure Blends



More information about the Blends-commit mailing list