[med-svn] r19435 - in trunk/packages/logol/trunk/debian: . patches

Olivier Sallou osallou at moszumanska.debian.org
Mon Jun 29 10:01:26 UTC 2015


Author: osallou
Date: 2015-06-29 10:01:25 +0000 (Mon, 29 Jun 2015)
New Revision: 19435

Added:
   trunk/packages/logol/trunk/debian/patches/fix_swipl72
Modified:
   trunk/packages/logol/trunk/debian/changelog
   trunk/packages/logol/trunk/debian/patches/series
Log:
fix #790136 due to a modification in print statement introduced in 7.x versions

Modified: trunk/packages/logol/trunk/debian/changelog
===================================================================
--- trunk/packages/logol/trunk/debian/changelog	2015-06-29 10:00:51 UTC (rev 19434)
+++ trunk/packages/logol/trunk/debian/changelog	2015-06-29 10:01:25 UTC (rev 19435)
@@ -1,3 +1,9 @@
+logol (1.7.2-2) unstable; urgency=medium
+
+  * d/patches/fix_swipl72: Fix swipl v7.x compatibility (Closes: #790136).
+
+ -- Olivier Sallou <osallou at debian.org>  Mon, 29 Jun 2015 11:59:23 +0200
+
 logol (1.7.2-1) unstable; urgency=medium
 
   * New upstream release

Added: trunk/packages/logol/trunk/debian/patches/fix_swipl72
===================================================================
--- trunk/packages/logol/trunk/debian/patches/fix_swipl72	                        (rev 0)
+++ trunk/packages/logol/trunk/debian/patches/fix_swipl72	2015-06-29 10:01:25 UTC (rev 19435)
@@ -0,0 +1,48 @@
+Subject: swipl v7 changed print predicate
+Description: v7 print predicate (~p in format) adds some quotes when
+ priting data, need to use ~w in format to avoid quotes
+Author: Olivier Sallou <osallou at debian.org>
+Last-Updated: 2015-06-29
+Forwarded: yes
+--- a/prolog/logol.pl
++++ b/prolog/logol.pl
+@@ -2123,16 +2123,16 @@
+ 
+ %sub predicates, do not call
+ writecontent(X,OutStream):- maxsize(Maxsize),getVariable(X,_,Begin,End,Size,Info,Level,[Errors,Indel],Name),((Size>Maxsize,Content='-');(Size=0,Content='NULL');(Size=<Maxsize,Size>0,getVariable(X,TmpContent,_,_,_,_,_,_,_),atom_chars(Content,TmpContent)))
+-,format(OutStream,'<variable name="~p">~N~10|<data><begin>~p</begin>~N~10|<end>~p</end>~N~10|<size>~p</size>~N~10|<errors>~p</errors>~N~10|<distance>~p</distance>~N~10|<content>~p</content>~N~10|<text>~p</text>~N~10|</data>~N',[Name,Begin,End,Size,Errors,Indel,Content,Level]),(Info=[];(\+ Info=[],format(OutStream,'<subdata>~N',[]),writeresult(Info,OutStream),format(OutStream,'</subdata>~N',[]))),format(OutStream,'</variable>~N',[]).
++,format(OutStream,'<variable name="~w">~N~10|<data><begin>~w</begin>~N~10|<end>~w</end>~N~10|<size>~w</size>~N~10|<errors>~w</errors>~N~10|<distance>~w</distance>~N~10|<content>~w</content>~N~10|<text>~w</text>~N~10|</data>~N',[Name,Begin,End,Size,Errors,Indel,Content,Level]),(Info=[];(\+ Info=[],format(OutStream,'<subdata>~N',[]),writeresult(Info,OutStream),format(OutStream,'</subdata>~N',[]))),format(OutStream,'</variable>~N',[]).
+ writeresult([],OutStream):- format(OutStream,'',[]).
+ writeresult([X],OutStream):- writecontent(X,OutStream).
+ writeresult([X|Y],OutStream):- writecontent(X,OutStream),writeresult(Y,OutStream).
+ %main predicate
+-writeresult(Id,[X|Y],OutStream):- format(OutStream,'<model id="~p">~N',[Id]),writeresult([X|Y],OutStream),format(OutStream,'</model>~N',[]).
++writeresult(Id,[X|Y],OutStream):- format(OutStream,'<model id="~w">~N',[Id]),writeresult([X|Y],OutStream),format(OutStream,'</model>~N',[]).
+ 
+ writeallresult(Id,[X],OutStream):- writeresult(Id,X,OutStream).
+ writeallresult(Id,[X|Y],OutStream):- writeresult(Id,X,OutStream),NewId is Id+1,writeallresult(NewId,Y,OutStream).
+-writeallresult(File,[X|Y]):- open(File,append,OutStream),bb_get('matchCounter',Count),format(OutStream,'<match id="~p">~N',[Count]),NewCount is Count + 1,bb_put('matchCounter',NewCount),writeallresult(1,[X|Y],OutStream),format(OutStream,'</match>~N',[]),close(OutStream),!.  
++writeallresult(File,[X|Y]):- open(File,append,OutStream),bb_get('matchCounter',Count),format(OutStream,'<match id="~w">~N',[Count]),NewCount is Count + 1,bb_put('matchCounter',NewCount),writeallresult(1,[X|Y],OutStream),format(OutStream,'</match>~N',[]),close(OutStream),!.  
+ 
+ 
+ %% initResultFile(+File:char-list)
+@@ -2237,7 +2237,7 @@
+ % @param Message message to log
+ %
+ 
+-logData(File,Message):-open(File,append,OutStream),format(OutStream,'~p~N',Message),close(OutStream).
++logData(File,Message):-open(File,append,OutStream),format(OutStream,'~w~N',Message),close(OutStream).
+ 
+ 
+ %:-comment(setParent/2," Set parent value in variable structure at p Description: @p @bf{DEPRECATED}@p Set the parent value in structure @begin{itemize} @item @bf{setParent(Var, Parent) , list * char-list => list * char-list}. @end{itemize} @p Input: @begin{itemize} @item @var{Var} is variable structure saved in @pred{varDefinition} @item @var{Parent} is the parent string at end{itemize} @p Output: ").
+--- a/src/org/irisa/genouest/logol/Treatment.java
++++ b/src/org/irisa/genouest/logol/Treatment.java
+@@ -383,7 +383,7 @@
+ 				switch(sc.type) {
+ 					case Constants.SAVECONSTRAINT: {
+ 						//if(!data.equals("")) data+=",";							
+-						save+="((\\+var("+sc.variableContent+"),format(OutStream,'~p,~p,~p~N',["+sc.variableContent+",'"+lvar.model+"','"+lvar.id+"']),nl);(var("+sc.variableContent+")))";
++						save+="((\\+var("+sc.variableContent+"),format(OutStream,'~w,~w,~w~N',["+sc.variableContent+",'"+lvar.model+"','"+lvar.id+"']),nl);(var("+sc.variableContent+")))";
+ 					
+ 						LogolVariable.matchedVariables.add(sc.variableContent);
+ 						break;

Modified: trunk/packages/logol/trunk/debian/patches/series
===================================================================
--- trunk/packages/logol/trunk/debian/patches/series	2015-06-29 10:00:51 UTC (rev 19434)
+++ trunk/packages/logol/trunk/debian/patches/series	2015-06-29 10:01:25 UTC (rev 19435)
@@ -4,3 +4,4 @@
 setDebianDirs
 fix_doc_generation
 remove_rubygems_usage
+fix_swipl72




More information about the debian-med-commit mailing list