[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Making Source-Version binNMU-safe



The following patch for dpkg-dev is inspired by the comments by
Steve Langasek in 
http://lists.debian.org/debian-devel/2005/11/msg00005.html
and the related thread, which seem to me clearly correct.

The original problem is best described here:
http://lists.debian.org/debian-devel/2005/10/msg01206.html

This change is supposed to only affect situations with binNMUs.  I realized
that the version number requirements for binNMUs vs. source NMUs
and maintainer uploads are not actually in policy, which worried me;
I sent a message to debian-policy.

Given that this actually changes the definition of Source-Version, a
warning message should probably be sent to debian-devel-announce if this
is adopted.  However, I think this will be correct the majority of the
time Source-Version is used.  Only occasionally does a dependency actually
need to be so strict that a binNMU breaks the relationship.  (This could
happen in the case of a -dev package depending on a library package, in the
subcase where the binNMU built the library against different libraries,
however.)

If you'd rather retain the old not-quite-accurate meaning of
Source-Version and add something like Indep-Version, that would really
be just as good, though perhaps slightly more confusing to developers of
the future; the main point is to provide a standard binNMU-safe way
of allowing exact versioned dependencies of arch:any packages on arch:all
packages.  While providing the other meaning for those who need it.

Anyway, I think either this patch, or the 'backward-compatible' version
introducing Indep-Version and retaining the old meaning of Source-Version,
is a good idea.  Thoughts?

--- controllib.pl.old	2005-11-01 18:30:24.000000000 -0500
+++ controllib.pl	2005-11-01 18:59:59.000000000 -0500
@@ -241,6 +241,10 @@
     &parsecdata('L',0,"parsed version of changelog");
     close(CDATA); $? && &subprocerr("parse changelog");
     $substvar{'Source-Version'}= $fi{"L Version"};
+    # Strip off any binNMU version suffix.
+    $substvar{'Source-Version'} =~ s/(-[\d+]+\.[\d+]+)\.[\d+]+$/$1/;
+    # Leave this for strict binary version dependencies.
+    $substvar{'Binary-Version'}= $fi{"L Version"};
 }
 
 

-- 
Nathanael Nerode  <neroden@twcny.rr.com>

"(Instead, we front-load the flamewars and grudges in
the interest of efficiency.)" --Steve Lanagasek,
http://lists.debian.org/debian-devel/2005/09/msg01056.html



Reply to: