On Sun, 5 May 2013, Sven Joachim wrote:

On 2013-03-22 11:01 +0100, Vincent Lefevre wrote:

On 2013-03-22 22:50:40 +1300, Jan Larres wrote:
version 457 of less, released in December, reverts to the old parsing
behaviour and makes the new one available as an option instead. So it
would probably be a better idea to upgrade to that version instead.

I agree. And what's important is that compatible versions of less
and man-db are installed at the same time.

Unfortunately that's currently impossible in Jessie because the version
of man-db there declares a "Breaks: less (<< 456)", and less cannot
transition to testing because of this bug.  So it would be good to fix
it or downgrade the severity, since not being able to install both
man-db and less sucks.

Since upstream less has reverted this behavior, it seems to me that the right approach is to revert man-db's workaround, mark it as breaking less 456 only (since << 456 and >= 457 are then both okay), and upload the new less upstream release as closing this bug.

Attached is a debdiff for the change to man-db needed to implement this. Since you can't have a Breaks field for a range bounded on both sides, I've just marked it as breaking less 456-1 and 456-1ubuntu1, the only known packaged versions. I've tested that building this patch works the way that you'd expect: apt neither installs the new version of less from unstable, nor attempts to remove it. I've also test-built the new less upstream release (458; 457 is no longer available) with no other changes to packaging, and it works fine and `man apt.conf` displays the right thing.

If the other folks on this bug report think this looks sane, I'll clone this bug and assign it to man-db.

In addition to uploading the new man-db packaging and the new less upstream, man-db upstream r1443 should be reverted.

--
Geoffrey Thomas
http://ldpreload.com
geo...@ldpreload.com
diff -Nru man-db-2.6.3/debian/changelog man-db-2.6.3/debian/changelog
--- man-db-2.6.3/debian/changelog       2012-12-16 04:18:24.000000000 -0800
+++ man-db-2.6.3/debian/changelog       2013-05-05 16:20:30.000000000 -0700
@@ -1,3 +1,10 @@
+man-db (2.6.3-3geofft1) unstable; urgency=low
+
+  * The incompatible change from less 456 has been reverted, so revert
+    our patch and instead Break that version of less.
+
+ -- Geoffrey Thomas <geo...@ldpreload.com>  Sun, 05 May 2013 16:18:17 -0700
+
 man-db (2.6.3-3) unstable; urgency=low
 
   * Support parallel builds.
diff -Nru man-db-2.6.3/debian/control man-db-2.6.3/debian/control
--- man-db-2.6.3/debian/control 2012-12-16 04:17:47.000000000 -0800
+++ man-db-2.6.3/debian/control 2013-05-05 17:11:58.000000000 -0700
@@ -13,7 +13,7 @@
 Suggests: groff, less, www-browser
 Provides: man, man-browser
 Conflicts: man, suidmanager (<< 0.50)
-Breaks: less (<< 456)
+Breaks: less (= 456-1), less (= 456-1ubuntu1)
 Replaces: man, nlsutils, manpages-de (<< 0.5-4)
 Multi-Arch: foreign
 Description: on-line manual pager
diff -Nru man-db-2.6.3/debian/patches/less-incompatibility.patch 
man-db-2.6.3/debian/patches/less-incompatibility.patch
--- man-db-2.6.3/debian/patches/less-incompatibility.patch      2012-12-16 
04:05:23.000000000 -0800
+++ man-db-2.6.3/debian/patches/less-incompatibility.patch      1969-12-31 
16:00:00.000000000 -0800
@@ -1,52 +0,0 @@
-Description: Handle incompatible change to option string escaping in less 456
-Author: Colin Watson <cjwat...@debian.org>
-Origin: backport, 
http://bazaar.launchpad.net/~cjwatson/man-db/trunk/revision/1443
-Bug-Debian: http://bugs.debian.org/695459
-Forwarded: not-needed
-Last-Update: 2012-12-16
-
-Index: b/src/man.c
-===================================================================
---- a/src/man.c
-+++ b/src/man.c
-@@ -814,17 +814,35 @@
-       static char *escaped_string; 
-       char *ptr;
- 
--      /* 2*strlen will always be long enough to hold the escaped string */
-+      /* 4*strlen will always be long enough to hold the escaped string */
-       ptr = escaped_string = xrealloc (escaped_string, 
--                                       2 * strlen (string) + 1);
--      
-+                                       4 * strlen (string) + 1);
-+
-       while (*string) {
-+              /* less 456 requires dollar and backslash to be escaped in
-+               * the option string; this means that we need two
-+               * backslashes to effectively escape characters special in
-+               * prompt strings, and that displaying a backslash requires
-+               * two levels of escaping.  Note that this appears to be an
-+               * incompatible change, so this will overescape for earlier
-+               * versions of less.
-+               */
-               if (*string == '?' ||
-                   *string == ':' ||
-                   *string == '.' ||
--                  *string == '%' ||
--                  *string == '\\')
-+                  *string == '%') {
-+                      /* Special only in prompt strings */
-+                      *ptr++ = '\\';
-+                      *ptr++ = '\\';
-+              } else if (*string == '$')
-+                      /* Special only in option strings */
-+                      *ptr++ = '\\';
-+              else if (*string == '\\') {
-+                      /* Special in both option and prompt strings */
-+                      *ptr++ = '\\';
-+                      *ptr++ = '\\';
-                       *ptr++ = '\\';
-+              }
- 
-               *ptr++ = *string++;
-       }
diff -Nru man-db-2.6.3/debian/patches/series man-db-2.6.3/debian/patches/series
--- man-db-2.6.3/debian/patches/series  2012-12-16 04:03:58.000000000 -0800
+++ man-db-2.6.3/debian/patches/series  1969-12-31 16:00:00.000000000 -0800
@@ -1 +0,0 @@
-less-incompatibility.patch

Reply via email to