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

Emmanouil Kiagias e.kiagias at gmail.com
Thu Aug 29 23:40:11 UTC 2013


The following commit has been merged in the master branch:
commit d4ce6f999d4d4832686b6b0f74d6a4ac9b37d007
Author: Emmanouil Kiagias <e.kiagias at gmail.com>
Date:   Fri Aug 30 01:20:26 2013 +0200

    changelogentry now does not need the * start auto../* end flags in order to work. Also Makefile ignores changelog entry in case there is only one release(for new Blends)

diff --git a/devtools/Makefile b/devtools/Makefile
index 2dbec64..2639cbf 100755
--- a/devtools/Makefile
+++ b/devtools/Makefile
@@ -10,7 +10,8 @@
 
 # TARGET_DIST is one of stable, sarge, etch, unstable, or any other available
 # sources.list file available
-TARGET_DIST := $(shell head -1 debian/changelog |awk '{print $$3}'|tr -d ';')
+#TODO remove, it is not used in the new blends-dev
+#TARGET_DIST := $(shell head -1 debian/changelog |awk '{print $$3}'|tr -d ';')
 BLEND := $(shell /usr/share/blends-dev/blend-get-names blendname)
 
 VERSION  := $(shell dpkg-parsechangelog -ldebian/changelog | grep Version: | cut -f2 -d' ' | cut -f1 -d- )
@@ -21,10 +22,9 @@ TASKSDIFF := /usr/share/blends-dev/tasks_diff
 # Verify whether config/control exists, if yes, add it to the depends of debian/control
 CONFIGCONTROL := $(shell if [ -d config -a -e config/control ] ; then echo config/control; fi)
 
-
 #variables needed for changelogentry
 LINESTART  := $(shell grep "\* start automatically" debian/changelog -n | head -1 | awk '{print $$1}' | tr -d '[:, ]' )
-LINEEND   := $(shell grep "\* end automatically" debian/changelog -n | head -1 | awk '{print $$1}' | tr -d ':')
+LINEEND   := $(shell lineend=`grep "* end of automatic changelog entry *" debian/changelog -n | head -1 | awk '{print $$1}' | tr -d ':'`; if [ -z "$$lineend" ]; then echo "2"; else echo "$$lineend + 1" | bc; fi)
 
 #get two latest releases
 RELEASES   := $(shell grep '^$(BLEND)' debian/changelog | head -2 | awk '{print $$2}' | tr -d '[(,)]')
@@ -51,6 +51,7 @@ statusdump: dependency_data/
 
 #update changelog with dependencies changes
 changelogentry: debian/changelog statusdump
+ifneq "$(LATEST)" "$(PREVIOUS)"
 	if [ ! -f dependency_data/$(BLEND)_$(LATEST).json ]; then \
 		echo "dependency_data/$(BLEND)_$(LATEST).json does not exist, can not generate changelog dependencies-changes entry"; \
 		exit -1; \
@@ -59,18 +60,13 @@ changelogentry: debian/changelog statusdump
 		echo "dependency_data/$(BLEND)_$(PREVIOUS).json does not exist, can not generate changelog dependencies-changes entry"; \
 		exit -1; \
 	fi
-	if [ -z "$(LINESTART)" ]; then \
-		echo "Could not locate  '* start automatically injected changes *' flag into changelog, aborting."; \
-		exit -1; \
-	fi
-	if [ -z "$(LINEEND)" ]; then \
-		echo "Could not locate  '* end automatically injected changes *' flag into changelog, aborting."; \
-		exit -1; \
-	fi
 
-	(sed $(LINESTART)q debian/changelog; echo;\
+	(sed $1q debian/changelog; echo;\
 	 $(TASKSDIFF) --compare $(CURRENTPARH)/dependency_data/$(BLEND)_$(LATEST).json,$(CURRENTPARH)/dependency_data/$(BLEND)_$(PREVIOUS).json | sed 's/^/  /'; \
-	 echo; sed -n '$(LINEEND),$$p' debian/changelog; ) > debian/changelog.new && mv debian/changelog.new debian/changelog
+	 sed -n '$(LINEEND),$$p' debian/changelog; ) > debian/changelog.new && mv debian/changelog.new debian/changelog
+else
+	echo "It is the first release, skip the changelog entry"
+endif
 
 ##FIXME comment out for the moment
 #packages.txt: tasks/*
diff --git a/devtools/sec-blend-gen-control b/devtools/sec-blend-gen-control
index bdead03..1a77d52 100755
--- a/devtools/sec-blend-gen-control
+++ b/devtools/sec-blend-gen-control
@@ -475,7 +475,7 @@ class UDD_connector:
                             #these packages are already added into Suggest so provide an added flag here
                             #so they won't be added again from the resolve_missing function
                             missing.append({ "pkg" : mis, "task" : task, "added" : True})
-
+        
         if missing:
             missing_to_suggests = self.__get_resolved_missing(missing)
 
diff --git a/tasks_diff b/tasks_diff
index aafb03a..3899022 100755
--- a/tasks_diff
+++ b/tasks_diff
@@ -17,6 +17,10 @@ import argparse
 import subprocess
 from debian import deb822
 
+#with this we distinguish the end of automatic entry in the changelog so we
+#can replace the entry if needed
+FINISH_FLAG = "* end of automatic changelog entry *"
+
 def clean_up_packages(packages):
 	logger = logging.getLogger(__name__)
 	# Hack: Debian Edu tasks files are using '\' at EOL which is broken
@@ -145,6 +149,9 @@ def compare_tasks(tasks, tasks_compare, taskprefix):
 		for removedtask in removed_tasks:
 			print " -{0}-{1}".format(taskprefix, removedtask)
 
+	if not first_print:
+		print ""
+		print FINISH_FLAG
 
 def load_tasks(tasks_path):
 	tasks = {}

-- 
Git repository for blends-gsoc code



More information about the Blends-commit mailing list