[Blends-commit] [SCM] blends-gsoc branch, master, updated. 5bf67dd0efec82b04a299b9078a3919669c599ea
Emmanouil Kiagias
e.kiagias at gmail.com
Fri Jul 26 16:13:26 UTC 2013
The following commit has been merged in the master branch:
commit 5bf67dd0efec82b04a299b9078a3919669c599ea
Author: Emmanouil Kiagias <e.kiagias at gmail.com>
Date: Fri Jul 26 18:01:06 2013 +0200
single/{sec-}blend-gen-control do not include virtual packages into tasksel template, new regex in test_task for handling the alternatives in tasksel template(dirty but seems to work for the moment)
diff --git a/single/blend-gen-control b/single/blend-gen-control
index da2439d..4558000 100755
--- a/single/blend-gen-control
+++ b/single/blend-gen-control
@@ -422,7 +422,8 @@ class UDD_connector:
task, package, dependency, distribution, component, provides = row[:6]
exist_in_archs = [ x for x in row[6:] if x ]
- if provides:
+ ##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:
if not task in virtual_packages:
virtual_packages[task] = []
@@ -657,16 +658,17 @@ def gen_task_desc(**kwargs):
continue
#Tasksel doesn't allow boolean(eg OR : |) comparisons in dependencies such as package1 | package2.
#so we include in the list the first of the alternative packages
- alternatives_resolved = []
- for pkg in blend_dependencies[task][header]:
- if '|' in pkg:
- alternatives_resolved.append(pkg.split('|')[0])
- else:
- alternatives_resolved.append(pkg)
-
- fout.write("{0}".format("\n ".join(sorted(alternatives_resolved))))
+ #alternatives_resolved = []
+ #for pkg in blend_dependencies[task][header]:
+ # if '|' in pkg:
+ # alternatives_resolved.append(pkg.split('|')[0])
+ # else:
+ # alternatives_resolved.append(pkg)
+
+ #fout.write("{0}".format("\n ".join(sorted(alternatives_resolved))))
+ #fout.write("\n")
+ fout.write("{0}".format("\n ".join(sorted(blend_dependencies[task][header]))))
fout.write("\n")
- #fout.write("{0}".format("\n ".join(sorted(blend_dependencies[task][header]))))
fout.write("\n")
diff --git a/single/sec-blend-gen-control b/single/sec-blend-gen-control
index 331619c..59fd66f 100755
--- a/single/sec-blend-gen-control
+++ b/single/sec-blend-gen-control
@@ -352,7 +352,8 @@ class UDD_connector:
###TODO check this out again
#if dependency in wanted_dependencies and distribution == 'debian' and component == 'main':
if dependency in wanted_dependencies:
- if contains_provides:
+ #TODO check again, do not include at all virtual packages when it comes to the tasksel template file
+ if contains_provides and not taskdescription:
virtual_packages += [ myalt.strip() for myalt in package.split("|") ]
if not task in blend_alternatives_virtuals:
@@ -636,15 +637,16 @@ def gen_task_desc(**kwargs):
#Tasksel doesn't allow boolean(eg OR : |) comparisons in dependencies such as package1 | package2.
#so we include in the list the first of the alternative packages
alternatives_resolved = []
- for pkg in blend_dependencies[task][header]:
- if '|' in pkg:
- alternatives_resolved.append(pkg.split('|')[0])
- else:
- alternatives_resolved.append(pkg)
-
- fout.write("{0}".format("\n ".join(sorted(alternatives_resolved))))
+ #for pkg in blend_dependencies[task][header]:
+ # if '|' in pkg:
+ # alternatives_resolved.append(pkg.split('|')[0])
+ # else:
+ # alternatives_resolved.append(pkg)
+
+ #fout.write("{0}".format("\n ".join(sorted(alternatives_resolved))))
+ #fout.write("\n")
+ fout.write("{0}".format("\n ".join(sorted(blend_dependencies[task][header]))))
fout.write("\n")
- #fout.write("{0}".format("\n ".join(sorted(blend_dependencies[task][header]))))
fout.write("\n")
diff --git a/test_taskdesc b/test_taskdesc
index 82d7440..f0633cc 100755
--- a/test_taskdesc
+++ b/test_taskdesc
@@ -18,8 +18,10 @@ do
for arch in $architectures
do
+ #really dirty way to resolve the alternatives but it seems to work
+ sed "s/.*\(\[\!$arch\]\|\[\!$arch .*\| .*\!$arch .*\| .*\!$arch\]\) |//;s/|.*//" taskdesc-sec.template |
#for example match only !s390 and not !s390x and in sed also remove the trailing spaces of the end of each line to avoid trailing spaces diffs
- grep -vE "\[\!$arch\]|\[\!$arch | \!$arch | \!$arch\]" taskdesc-sec.template | sed -e 's/\[.*\]//;s/[ \t]*$//' > taskdesc-sec.temp
+ grep -vE "\[\!$arch\]|\[\!$arch | \!$arch | \!$arch\]" | sed -e 's/\[.*\]//;s/[ \t]*$//' > taskdesc-sec.temp
#also remove trailing spaces from this file to make sure we avoid trailing spaces diffs
sed 's/[ \t]*$//' taskdesc-sec/${blend}-tasks.desc.$arch > taskdesc-sec.temp2
if [ $DEBUG != 0 ] ; then
--
Git repository for blends-gsoc code
More information about the Blends-commit
mailing list