[Blends-commit] [SCM] blends-gsoc branch, master, updated. c8d106d938d4904dce69502f706bdd288f4e4768

Emmanouil Kiagias e.kiagias at gmail.com
Thu Aug 15 20:56:20 UTC 2013


The following commit has been merged in the master branch:
commit a82fbd6cd56748402e8e8e7c24f043068845b6fd
Author: Emmanouil Kiagias <e.kiagias at gmail.com>
Date:   Thu Aug 15 20:48:05 2013 +0200

    rules/Makefile and blends-dev.install now use sec-blend-gen-control instead of blend-gen-control(we will go with this script from now on). Also changed the 'haspackages' counter into {sec-}blend-gen-control

diff --git a/debian/blends-dev.install b/debian/blends-dev.install
index 0a0e35f..5bc8df1 100644
--- a/debian/blends-dev.install
+++ b/debian/blends-dev.install
@@ -1,4 +1,4 @@
-devtools/blend-gen-control         	usr/share/blends-dev
+devtools/sec-blend-gen-control      usr/share/blends-dev
 devtools/Makefile					usr/share/blends-dev
 devtools/rules 						usr/share/blends-dev
 devtools/blend-get-names 			usr/share/blends-dev
diff --git a/devtools/Makefile b/devtools/Makefile
index fd7c039..dd95bd2 100755
--- a/devtools/Makefile
+++ b/devtools/Makefile
@@ -15,7 +15,7 @@ BLEND := $(shell /usr/share/blends-dev/blend-get-names blendname)
 
 VERSION  := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
 
-GENCONTROL := /usr/share/blends-dev/blend-gen-control
+GENCONTROL := /usr/share/blends-dev/sec-blend-gen-control
 TASKSDIFF := /usr/share/blends-dev/tasks_diff
 
 # Verify whether config/control exists, if yes, add it to the depends of debian/control
diff --git a/devtools/blend-gen-control b/devtools/blend-gen-control
index 459f6ee..8507c49 100755
--- a/devtools/blend-gen-control
+++ b/devtools/blend-gen-control
@@ -418,11 +418,13 @@ class UDD_connector:
         row = self.cursor.fetchone()
 
         while not row is None:
-            increase_packages = True
             #task, package, dependency, distribution, component, arch, provides = (row[0], row[1], row[2], row[3], row[4], row[5], row[6])
             task, package, dependency, distribution, component, provides = row[:6]
             exist_in_archs = [ x for x in row[6:] if x ]
 
+            if not dependency == 'i' and not dependency == 'a':
+                blend_dependencies[task]["haspackages"] += 1
+
             ##TODO check again, do not include at all virtual packages when it comes to the tasksel template file
             if provides and not taskdescription:
                 if dependency in wanted_dependencies:
@@ -462,11 +464,9 @@ class UDD_connector:
             if dependency == 'i':
                 blend_dependencies[task]["Ignores"].append(package)
                 #missing.append(package)
-                increase_packages = False
             if dependency == 'a':
                 blend_dependencies[task]["Avoid"].append(package)
                 excluded.append(package)
-                increase_packages = False
 
             #TODO check again which packages should be kept
             #not sure if i should add these packages into the missing
@@ -475,12 +475,8 @@ class UDD_connector:
             #else:
             #    available.append(package)
 
-            if increase_packages:
-               blend_dependencies[task]["haspackages"] += 1 
-
             row = self.cursor.fetchone()
 
-
         #once we have all the dependencies we will get the alternatives
         blend_alternatives, single_alternatives = self.__get_blend_alternatives(blend = blend, wanted_dependencies = wanted_dependencies)
 
diff --git a/devtools/rules b/devtools/rules
index 34e5f13..a17c821 100755
--- a/devtools/rules
+++ b/devtools/rules
@@ -17,7 +17,7 @@ BLEND_INSTALL_HELPER := /usr/share/blends-dev/blend-install-helper
 TARGET_DIST := $(shell head -1 debian/changelog |awk '{print $$3}'|tr -d ';')
 BLEND       := $(shell /usr/share/blends-dev/blend-get-names blendname)
 
-GENCONTROL  := /usr/share/blends-dev/blend-gen-control
+GENCONTROL  := /usr/share/blends-dev/sec-blend-gen-control
 
 VERSION     := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
 DISTDIR     := $(BLENDNAME)-$(VERSION)
diff --git a/devtools/sec-blend-gen-control b/devtools/sec-blend-gen-control
index f2e5978..0ebf67f 100755
--- a/devtools/sec-blend-gen-control
+++ b/devtools/sec-blend-gen-control
@@ -338,11 +338,13 @@ class UDD_connector:
         row = self.cursor.fetchone()
 
         while not row is None:
-            increase_packages = True
             #task, package, dependency, distribution, component, provides = (row[0], row[1], row[2], row[3], row[4], row[5], row[6])
             task, package, dependency, distribution, component, contains_provides = row[:6]
             exist_in_archs = [ x for x in row[6:] if x ]
 
+            if not dependency == 'i' and not dependency == 'a':
+                blend_dependencies[task]["haspackages"] += 1
+
             #check for alternatives('|') and virtuals(provides)
             #if a Depends-virtual does not exist into an alternative relation, let it be
             #it will go into Suggests cause it will not have any element into exist_in_archs
@@ -399,11 +401,9 @@ class UDD_connector:
             if dependency == 'i':
                 blend_dependencies[task]["Ignores"].append(package)
                 missing.append(package)
-                increase_packages = False
             if dependency == 'a':
                 blend_dependencies[task]["Avoid"].append(package)
                 excluded.append(package)
-                increase_packages = False
 
             #TODO check which packages should be kept
             #not sure if i should add these packages into the missing
@@ -412,9 +412,6 @@ class UDD_connector:
             #else:
             #    available.append(package)
 
-            if increase_packages:
-               blend_dependencies[task]["haspackages"] += 1 
-
             row = self.cursor.fetchone()
 
         ## Up to this point we have properly handled all the single stand-alone packages
diff --git a/devtools/tester b/devtools/tester
index 0baa948..77490a0 100755
--- a/devtools/tester
+++ b/devtools/tester
@@ -6,11 +6,11 @@
 
 for blend in `psql -t udd -c 'SELECT blend FROM blends_metadata ORDER BY blend;'`
 do  
-    #echo "Generating control files for $blend."
-    #./blend-gen-control -S -D -c -b $blend 
-    #./sec-blend-gen-control -S -D -c -b $blend 
+    echo "Generating control files for $blend."
+    ./blend-gen-control -S -D -c -b $blend 
+    ./sec-blend-gen-control -S -D -c -b $blend 
     
-    #diff control control-sec
+    diff control.temp control-sec.temp
 
     #no need to generate and compare task-description files(they have exact the same data
     #with the control files)

-- 
Git repository for blends-gsoc code



More information about the Blends-commit mailing list