Prechádzať zdrojové kódy

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

Raphael Hertzog 18 rokov pred
rodič
commit
f60477e2f3
4 zmenil súbory, kde vykonal 20 pridanie a 1 odobranie
  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>
 2007-11-24  Guillem Jover  <guillem@debian.org>
 
 
 	* configure.ac: Bump version to 1.14.12~.
 	* 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>
 2007-11-22  Guillem Jover  <guillem@debian.org>
 
 
 	* dpkg-name.1: Document that the Package-Type field is now supported.
 	* 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
 multiple libraries with a single argument (otherwise you need multiple
 \fB\-e\fR).
 \fB\-e\fR).
 .TP
 .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
 .B \-O
 Print the generated symbols file to standard output, rather than being
 Print the generated symbols file to standard output, rather than being
 stored in the package build tree.
 stored in the package build tree.

+ 6 - 1
scripts/dpkg-gensymbols.pl

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