The following commit has been merged in the master branch:
commit 432925334746c722ef957d692c901eeb84c7d8f1
Author: Guillem Jover <[email protected]>
Date:   Thu May 21 06:16:33 2009 +0200

    dpkg-deb: Do not warn when parsing unknown fields with “Private-” prefix
    
    Fields prefixed with “Private-” are intended to be used privately by
    individuals, organizations or companies, and are expected to never be
    standardized. This guarantees them to never collide with any official
    field in the future. Because there's still the danger that different
    organizations might end up using the same field name, those should
    never be visible in any public repository.
    
    Closes: #353040
    
    Based-on-patch-by: Nils Rennebarth <[email protected]>

diff --git a/debian/changelog b/debian/changelog
index 617f465..8c7feb1 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -132,6 +132,8 @@ dpkg (1.15.1) UNRELEASED; urgency=low
     file to match reality.
   * Warn in start-stop-daemon if the argument to --name is longer than the
     supported kernel process name size. Closes: #353015, #519128
+  * Do not warn in dpkg-deb when parsing unknown fields with the “Private-”
+    prefix. Based on a patch by Nils Rennebarth. Closes: #353040
 
   [ Frank Lichtenheld ]
   * Dpkg::Version: Remove unnecessary function next_elem which just
diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c
index f5bcc70..624882c 100644
--- a/dpkg-deb/build.c
+++ b/dpkg-deb/build.c
@@ -70,9 +70,15 @@ static const char *arbitrary_fields[] = {
   NULL
 };
 
+static const char *private_prefix = "Private-";
+
 static int known_arbitrary_field(const struct arbitraryfield *field) {
   const char **known;
 
+  /* Always accept fields starting with a private field prefix. */
+  if (strncasecmp(field->name, private_prefix, strlen(private_prefix)) == 0)
+    return 1;
+
   for (known= arbitrary_fields; *known; known++)
     if (strcasecmp(field->name, *known) == 0)
       return 1;

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to