Просмотр исходного кода

dpkg-gensymbols: Add new -I<file> option to force usage of a particular symbols file

Raphael Hertzog лет назад: 18
Родитель
Сommit
f60477e2f3
4 измененных файлов с 20 добавлено и 1 удалено
  1. 6 0
      ChangeLog
  2. 4 0
      man/ChangeLog
  3. 4 0
      man/dpkg-gensymbols.1
  4. 6 1
      scripts/dpkg-gensymbols.pl

+ 6 - 0
ChangeLog

@@ -1,3 +1,9 @@
+2007-11-24  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-gensymbols.pl: Add a new -I<file> option to force
+	the usage of a specific file as basis for the generated symbols
+	file.
+
 2007-11-24  Guillem Jover  <guillem@debian.org>
 
 	* configure.ac: Bump version to 1.14.12~.

+ 4 - 0
man/ChangeLog

@@ -1,3 +1,7 @@
+2007-11-24  Raphael Hertzog  <hertzog@debian.org>
+
+	* dpkg-gensymbols.1: Document the new -I<file> option.
+
 2007-11-22  Guillem Jover  <guillem@debian.org>
 
 	* dpkg-name.1: Document that the Package-Type field is now supported.

+ 4 - 0
man/dpkg-gensymbols.1

@@ -117,6 +117,10 @@ libraries. You can use a regular expression in \fIlibrary-file\fR to match
 multiple libraries with a single argument (otherwise you need multiple
 \fB\-e\fR).
 .TP
+.BI \-I filename
+Use \fIfilename\fR as reference file to generate the symbols file
+that is integrated in the package itself.
+.TP
 .B \-O
 Print the generated symbols file to standard output, rather than being
 stored in the package build tree.

+ 6 - 1
scripts/dpkg-gensymbols.pl

@@ -27,6 +27,7 @@ my $sourceversion;
 my $stdout;
 my $oppackage;
 my $compare = 1; # Bail on missing symbols by default
+my $input;
 my $output;
 my $debug = 0;
 my $host_arch = get_host_arch();
@@ -60,6 +61,8 @@ Options:
 			   (level goes from 0 for no check, to 4
 			   for all checks). By default checks at
 			   level 1.
+  -I<file>                 force usage of <file> as reference symbols
+                           file instead of the default file.
   -O<file>                 write to <file>, not .../DEBIAN/symbols.
   -O                       write to stdout, not .../DEBIAN/symbols.
   -d                       display debug information during work.
@@ -93,6 +96,8 @@ while (@ARGV) {
 	$packagebuilddir =~ s{/+$}{};
     } elsif (m/^-O$/) {
 	$stdout= 1;
+    } elsif (m/^-I(.+)$/) {
+	$input = $1;
     } elsif (m/^-O(.+)$/) {
 	$output= $1;
     } elsif (m/^-(h|-help)$/) {
@@ -121,7 +126,7 @@ if (not defined($oppackage)) {
 my $symfile = Dpkg::Shlibs::SymbolFile->new();
 my $ref_symfile = Dpkg::Shlibs::SymbolFile->new();
 # Load source-provided symbol information
-foreach my $file ($output, "debian/$oppackage.symbols.$host_arch",
+foreach my $file ($input, $output, "debian/$oppackage.symbols.$host_arch",
     "debian/symbols.$host_arch", "debian/$oppackage.symbols",
     "debian/symbols")
 {