[Git][debian-gis-team/gdal][experimental] Replace package name with #PACKAGE# when updating symbols files.

Bas Couwenberg gitlab at salsa.debian.org
Thu May 9 13:30:12 BST 2019



Bas Couwenberg pushed to branch experimental at Debian GIS Project / gdal


Commits:
607ffca1 by Bas Couwenberg at 2019-05-09T12:30:03Z
Replace package name with #PACKAGE# when updating symbols files.

- - - - -


2 changed files:

- debian/changelog
- debian/gdal-symbols.pl


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+gdal (3.0.0+dfsg-1~exp2) UNRELEASED; urgency=medium
+
+  * Replace package name with #PACKAGE# when updating symbols files.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 09 May 2019 14:29:25 +0200
+
 gdal (3.0.0+dfsg-1~exp1) experimental; urgency=medium
 
   * New upstream release.


=====================================
debian/gdal-symbols.pl
=====================================
@@ -860,6 +860,8 @@ sub compare_new_symbols {
 							print "Copy: $file1 -> $file2\n" if($cfg{verbose});
 
 							copy($file1, $file2) || die "Error: Failed to copy $file1 to $file2 ($!)\n";
+
+							replace_package_name($file2);
 						}
 						else {
 							print "Error: Cannot read $file1 and/or write $file2\n";
@@ -943,6 +945,8 @@ sub compare_new_symbols {
 									print "Copy: $file1 -> $file2\n" if($cfg{verbose});
 
 									copy($file1, $file2) || die "Error: Failed to copy $file1 to $file2 ($!)\n";
+
+									replace_package_name($file2);
 								}
 								else {
 									print "Error: Cannot read $file1 and/or write $file2\n";
@@ -986,6 +990,7 @@ sub parse_symbols {
 		# libgdal.so.20 libgdal20 #MINVER#
 		# | libgdal20 #MINVER#, gdal-abi-2-0-0
 		# #include "libgdal20.symbols.common"
+		#
 		#  (c++)"PamGetProxy(char const*)@Base" 1.8.0 1
 		elsif(/^ (\S+)\s+(\d+\S+\d+)\s*(\d+)\s*$/) {
 			my $symbol   = $1;
@@ -1230,6 +1235,8 @@ sub new_architecture_symbols {
 							print "Copy: $file1 -> $file2\n" if($cfg{verbose});
 
 							copy($file1, $file2) || die "Error: Failed to copy $file1 to $file2 ($!)\n";
+
+							replace_package_name($file2);
 						}
 						else {
 							print "Warning: Cannot read $file1 and/or write $file2\n";
@@ -1256,6 +1263,28 @@ sub new_architecture_symbols {
 	}
 }
 
+sub replace_package_name {
+	my ($file) = @_;
+
+	my $data = '';
+
+	my $changed = 0;
+	foreach(read_file($file)) {
+		# libgdal.so.26 libgdal26 #MINVER#
+		if(/^(libgdal\.so\.\d+) libgdal\d+ (.MINVER.)/) {
+			$_ = "$1 #PACKAGE# $2\n";
+
+			$changed = 1;
+		}
+
+		$data .= $_;
+	}
+
+	if($changed) {
+		write_file($file, $data);
+	}
+}
+
 sub clean_temp_files {
 	my (%args) = @_;
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/commit/607ffca1900b6ae7ddfdf949c5a57a1962335abc

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/gdal/commit/607ffca1900b6ae7ddfdf949c5a57a1962335abc
You're receiving this email because of your account on salsa.debian.org.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190509/84ee6dd1/attachment-0001.html>


More information about the Pkg-grass-devel mailing list