Browse Source

dpkg-gensymbols: override the check level with an environment variable

* scripts/dpkg-gensymbols.pl: The environment variable
DPKG_GENSYMBOLS_CHECK_LEVEL can override the level of checks made by
dpkg-gensymbols. This offers the possibility to unofficial ports to ignore
errors due to symbols files that do not correspond.
Raphael Hertzog 18 years ago
parent
commit
b0d0578a1a
4 changed files with 16 additions and 0 deletions
  1. 7 0
      ChangeLog
  2. 2 0
      debian/changelog
  3. 3 0
      man/dpkg-gensymbols.1
  4. 4 0
      scripts/dpkg-gensymbols.pl

+ 7 - 0
ChangeLog

@@ -1,3 +1,10 @@
+2007-11-28  Raphael Hertzog  <hertzog@debian.org>
+
+	* scripts/dpkg-gensymbols.pl: The environment variable
+	DPKG_GENSYMBOLS_CHECK_LEVEL can override the level of checks made
+	by dpkg-gensymbols. This offers the possibility to unofficial
+	ports to ignore errors due to symbols files that do not correspond.
+
 2007-11-28  Raphael Hertzog  <hertzog@debian.org>
 
 	* scripts/dpkg-shlibdeps.pl: Harmonize a failure message.

+ 2 - 0
debian/changelog

@@ -11,6 +11,8 @@ dpkg (1.14.12) UNRELEASED; urgency=low
     a warning instead.
   * Expand the dpkg-shlibdeps manual page with explanations concerning
     failures.
+  * The environment variable DPKG_GENSYMBOLS_CHECK_LEVEL can be used to force
+    dpkg-gensymbols to use a precise level of checks. Closes: #452022
 
  -- Guillem Jover <guillem@debian.org>  Sat, 24 Nov 2007 07:38:13 +0200
 

+ 3 - 0
man/dpkg-gensymbols.1

@@ -139,6 +139,9 @@ Level 0 disables all checks. Level 1 fails if some symbols have
 disappeared. Level 2 fails if some new symbols have been introduced.
 Level 3 fails if some libraries have disappeared. Level 4 fails if some
 libraries have been introduced.
+
+This value can be overriden by the environment variable
+DPKG_GENSYMBOLS_CHECK_LEVEL.
 .TP
 .BI \-d
 Enable debug mode. Numerous messages are displayed to explain what 

+ 4 - 0
scripts/dpkg-gensymbols.pl

@@ -109,6 +109,10 @@ while (@ARGV) {
     }
 }
 
+if (exists $ENV{DPKG_GENSYMBOLS_CHECK_LEVEL}) {
+    $compare = $ENV{DPKG_GENSYMBOLS_CHECK_LEVEL};
+}
+
 if (not defined($sourceversion)) {
     parsechangelog($changelogfile);
     $sourceversion = $fi{"L Version"};