[Pkg-pascal-devel] Bug#968121: FPC 3.2.0 upload to SID

peter green plugwash at p10link.net
Tue Aug 11 15:31:18 BST 2020


On 11/08/2020 13:06, Graham Inggs wrote:
> I've had a quick look at ddrescue [1], but I don't know how to fix
> that.  Does anyone have any suggestions?

Googling the error message took me to https://wiki.freepascal.org/User_Changes_Trunk
which has an entry "Property field access lists no longer allows classes" that
seems to describe the problem. Poking around in svn it seems that this change
was backported to 3.2 but they forgot to move the description of it from the
"user changes trunk" to the "user changes 3.2" page.

The solution is to use a getter rather than direct access for the
property. I have attatched a patch that does that, I have tested that it builds
I have not tested it beyond that.


> I've also looked at mricron [2][3], and changing '(**)' to '*)' in
> both places fixes the compilation, but I have no idea what the '(**)'
> means.  Can anyone tell me?

I followed up on this in a seperate mail, but I did not notice that
the maintainer was not the pascal team and hence the mail would
not go to the pkg-pascal-devel list, you can find a copy at
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=968126#10

-------------- next part --------------
diff -Nru ddrescueview-0.4~alpha3/debian/changelog ddrescueview-0.4~alpha3/debian/changelog
--- ddrescueview-0.4~alpha3/debian/changelog	2019-01-06 08:34:43.000000000 +0000
+++ ddrescueview-0.4~alpha3/debian/changelog	2020-08-11 14:26:53.000000000 +0000
@@ -1,3 +1,12 @@
+ddrescueview (0.4~alpha3-3.1) UNRELEASED; urgency=medium
+
+  * Patch proposed to BTS
+  * Use getters rather than direct access for properties that
+    access fields in other classes to fix build with fpc 3.2.
+    (Closes: 968121)
+
+ -- Peter Michael Green <plugwash at debian.org>  Tue, 11 Aug 2020 14:26:53 +0000
+
 ddrescueview (0.4~alpha3-3) unstable; urgency=medium
 
   * Update Vcs-* URIs for move to salsa.debian.org
diff -Nru ddrescueview-0.4~alpha3/debian/patches/series ddrescueview-0.4~alpha3/debian/patches/series
--- ddrescueview-0.4~alpha3/debian/patches/series	1970-01-01 00:00:00.000000000 +0000
+++ ddrescueview-0.4~alpha3/debian/patches/series	2020-08-11 14:23:43.000000000 +0000
@@ -0,0 +1 @@
+use-getters-for-fields-in-other-classes.patch
diff -Nru ddrescueview-0.4~alpha3/debian/patches/use-getters-for-fields-in-other-classes.patch ddrescueview-0.4~alpha3/debian/patches/use-getters-for-fields-in-other-classes.patch
--- ddrescueview-0.4~alpha3/debian/patches/use-getters-for-fields-in-other-classes.patch	1970-01-01 00:00:00.000000000 +0000
+++ ddrescueview-0.4~alpha3/debian/patches/use-getters-for-fields-in-other-classes.patch	2020-08-11 14:24:54.000000000 +0000
@@ -0,0 +1,58 @@
+Description: Use getters for fields in other classes.
+ fpc 3.2 no longer allows properties to directly access fields in other classes.
+ use getters instead to work around this.
+Author: Peter Michael Green <plugwash at debian.org>
+
+--- ddrescueview-0.4~alpha3.orig/source/Parser.pas
++++ ddrescueview-0.4~alpha3/source/Parser.pas
+@@ -64,6 +64,10 @@ type
+     function getMap(): TMap;
+     procedure postParse();
+     procedure setContiguous(mode: Boolean);
++    function getCommentLines(): TStringList;
++    function getVersion(): String;
++    function getMapFileName(): String;
++    function getDomFileName(): String;
+   public
+     constructor Create;
+     destructor Destroy; override;
+@@ -75,10 +79,10 @@ type
+     function hasDomFile() : Boolean;
+     property rescueStatus : TRescueStatus read FRescueStatus;
+     property map : TMap read getMap;
+-    property CommentLines : TStringList read FMapParser.FComments;
+-    property Version : String read FMapParser.FVersion;
+-    property MapFileName : String read FMapParser.FFileName;
+-    property DomFileName : String read FDomParser.FFileName;
++    property CommentLines : TStringList read GetCommentLines;
++    property Version : String read getVersion;
++    property MapFileName : String read getMapFileName;
++    property DomFileName : String read getDomFileName;
+     property ContiguousDomain : Boolean read FContiguous write setContiguous;
+   end;
+ 
+@@ -474,4 +478,24 @@ begin
+   hasFile:=Assigned(FMapStream);
+ end;
+ 
++function TMapParser.getCommentLines(): TStringList;
++begin
++  getCommentLines:=FMapParser.FComments;
++end;
++
++function TMapParser.getVersion(): String;
++begin
++  getVersion:=FMapParser.FVersion;
++end;
++
++function TMapParser.getMapFileName(): String;
++begin
++  getMapFileName:=FMapParser.FFileName;
++end;
++
++function TMapParser.getDomFileName(): String;
++begin
++  getDomFileName:=FDomParser.FFileName;
++end;
++
+ end.


More information about the Pkg-pascal-devel mailing list