Hi!

On Mon, 2012-07-23 at 17:51:56 +0100, Neil McGovern wrote:
> On Mon, Jul 23, 2012 at 06:38:21PM +0200, Julien Cristau wrote:
> > On Mon, Jul 23, 2012 at 15:14:15 +0100, Neil McGovern wrote:
> > 
> > > That is of course, your perogative. However, if you could kindly prepare
> > > a patchset between 1.16.5 and whatever you want to migrate, with all the
> > > translation and documentation changes stripped out, lets see how big
> > > that is.

> > ITYM 1.16.4.3.

> Nope, 1.16.5. I'd like to see that to get a view as to why 1.16.5 was
> broken. Once we've managed to have a look at that, it may give a clue as
> to if it's worth reviewing the giant-diff-from-doom.

Thanks, attached the filtered diff (with additional junk left by
filterdiff, but left the changelog) from git:

  $ git diff 1.16.5..1.16.8 | \
    filterdiff -x '*.po' -x '*.pot' -x '*/man/*' -x '*/doc/*' > \
    dpkg-1.16.5-1.16.8.patch

I can also send the git commit logs if you'd want that. The SE Linux
regression has been present since SE Linux support was added to dpkg.

thanks,
guillem
diff --git a/debian/changelog b/debian/changelog
index 3a92f22..7fd350e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,79 @@
+dpkg (1.16.8) unstable; urgency=low
+
+  [ Updated programs translations ]
+  * Esperanto (Felipe Castro).
+  * French (Christian Perrier).
+  * Polish (Michał Kułach). Closes: #680561
+  * Russian (Yuri Kozlov). Closes: #677850, #680411
+  * Slovak (Ivan Masár).
+  * Spanish (Javier Fernández-Sanguino)
+
+  [ Updated man page translations ]
+  * French (Christian Perrier).
+
+  [ Updated scripts translations ]
+  * French (Christian Perrier).
+  * Russian (Yuri Kozlov).
+
+  [ Updated dselect translations ]
+  * Danish (Joe Dalton). Closes: #680108
+  * Russian (Yuri Kozlov).
+  * Traditional Chinese (Asho Yeh - 阿信).
+
+ -- Guillem Jover <guil...@debian.org>  Sat, 21 Jul 2012 02:11:04 +0200
+
+dpkg (1.16.7) unstable; urgency=low
+
+  [ Guillem Jover ]
+  * Fix bogus dpkg-query --control-show badusage() strings.
+
+  [ Raphaël Hertzog ]
+  * Fix dpkg-gencontrol to correctly compute the source version
+    in the case of "old-style" bin-nmus. Closes: #679959
+
+  [ Updated dselect translations ]
+  * Catalan (Guillem Jover).
+  * French (Christian Perrier).
+  * German (Sven Joachim).
+  * Swedish (Peter Krefting).
+
+  [ Updated programs translations ]
+  * French (Christian Perrier).
+  * German (Sven Joachim).
+  * Italian (Milo Casagrande).
+  * Swedish (Peter Krefting).
+
+  [ Updated man page translations ]
+  * Swedish (Peter Krefting).
+  * French (Christian Perrier).
+
+  [ Updated scripts translations ]
+  * Swedish (Peter Krefting).
+  * French (Christian Perrier).
+
+ -- Raphaël Hertzog <hert...@debian.org>  Mon, 02 Jul 2012 21:16:12 +0200
+
+dpkg (1.16.6) unstable; urgency=low
+
+  [ Guillem Jover ]
+  * Do not translate SE Linux context to human readable form while unpacking,
+    as that might cause the operation to fail if the mcstransd daemon
+    stopped running during the transaction. Closes: #679641
+    Thanks to Russell Coker <russ...@coker.com.au>.
+  * Add --control-list and --control-show to dpkg-query --help output.
+
+  [ Raphaël Hertzog ]
+  * Fix import of error functions in dpkg-buildflags. Regression introduced
+    in 1.16.5.
+
+  [ Updated scripts translations ]
+  * German (Helge Kreutzmann).
+
+  [ Updated man page translations ]
+  * German (Helge Kreutzmann).
+
+ -- Guillem Jover <guil...@debian.org>  Sat, 30 Jun 2012 21:45:10 +0200
+
 dpkg (1.16.5) unstable; urgency=low
 
   [ Raphaël Hertzog ]
diff --git a/scripts/dpkg-buildflags.pl b/scripts/dpkg-buildflags.pl
index 866f4b3..a87dd42 100755
--- a/scripts/dpkg-buildflags.pl
+++ b/scripts/dpkg-buildflags.pl
@@ -22,7 +22,7 @@ use warnings;
 
 use Dpkg;
 use Dpkg::Gettext;
-use Dpkg::ErrorHandling qw(report);
+use Dpkg::ErrorHandling qw(:DEFAULT report);
 use Dpkg::BuildFlags;
 use Dpkg::Vendor qw(get_current_vendor);
 
diff --git a/scripts/dpkg-buildpackage.pl b/scripts/dpkg-buildpackage.pl
index d1efdb9..768fb6e 100755
--- a/scripts/dpkg-buildpackage.pl
+++ b/scripts/dpkg-buildpackage.pl
@@ -97,7 +97,7 @@ sub usage {
 "Options passed to dpkg-source:
   -sn            force Debian native source format.
   -s[sAkurKUR]   see dpkg-source for explanation.
-  -z<level>      compression level to use fo source.
+  -z<level>      compression level to use for source.
   -Z<compressor> compression to use for source (gz|xz|bzip2|lzma).
   -i[<regex>]    ignore diffs of files matching regex.
   -I[<pattern>]  filter out files when building tarballs.
diff --git a/scripts/dpkg-gencontrol.pl b/scripts/dpkg-gencontrol.pl
index c1b5786..8df486e 100755
--- a/scripts/dpkg-gencontrol.pl
+++ b/scripts/dpkg-gencontrol.pl
@@ -161,6 +161,10 @@ $substvars->load("debian/substvars") if -e "debian/substvars" and not $substvars
 my $control = Dpkg::Control::Info->new($controlfile);
 my $fields = Dpkg::Control->new(type => CTRL_PKG_DEB);
 
+# Old-style bin-nmus change the source version submitted to
+# set_version_substvars()
+$sourceversion = $substvars->get("source:Version");
+
 my $pkg;
 
 if (defined($oppackage)) {
diff --git a/src/archives.c b/src/archives.c
index 3a4baa0..4434be5 100644
--- a/src/archives.c
+++ b/src/archives.c
@@ -479,9 +479,15 @@ tarobject_set_se_context(const char *matchpath, const char *path, mode_t mode)
     return;
 
   /* Set selinux_enabled if it is not already set (singleton). */
-  if (selinux_enabled < 0)
+  if (selinux_enabled < 0) {
     selinux_enabled = (is_selinux_enabled() > 0);
 
+    /* Do not translate from computer to human readable forms, to avoid
+     * issues when mcstransd has disappeared during the unpack process. */
+    if (selinux_enabled)
+      set_matchpathcon_flags(MATCHPATHCON_NOTRANS);
+  }
+
   /* If SE Linux is not enabled just do nothing. */
   if (!selinux_enabled)
     return;
@@ -496,7 +502,7 @@ tarobject_set_se_context(const char *matchpath, const char *path, mode_t mode)
     return;
 
   if (strcmp(scontext, "<<none>>") != 0) {
-    if (lsetfilecon(path, scontext) < 0)
+    if (lsetfilecon_raw(path, scontext) < 0)
       /* XXX: This might need to be fatal instead!? */
       perror("Error setting security context for next file object:");
   }
diff --git a/src/querycmd.c b/src/querycmd.c
index acacea3..135a465 100644
--- a/src/querycmd.c
+++ b/src/querycmd.c
@@ -723,12 +723,12 @@ control_show(const char *const *argv)
 
   pkgname = *argv++;
   if (!pkgname || !*argv)
-    badusage(_("--%s needs at two arguments"),
+    badusage(_("--%s takes exactly two arguments"),
              cipaction->olong);
 
   control_file = *argv++;
   if (!control_file || *argv)
-    badusage(_("--%s takes at most two arguments"), cipaction->olong);
+    badusage(_("--%s takes exactly two arguments"), cipaction->olong);
 
   pkg_infodb_check_filetype(control_file);
 
@@ -783,6 +783,9 @@ usage(const struct cmdinfo *ci, const char *value)
 "  -l|--list [<pattern> ...]        List packages concisely.\n"
 "  -W|--show [<pattern> ...]        Show information on package(s).\n"
 "  -S|--search <pattern> ...        Find package(s) owning file(s).\n"
+"     --control-list <package>      Print the package control file list.\n"
+"     --control-show <package> <file>\n"
+"                                   Show the package control file.\n"
 "  -c|--control-path <package> [<file>]\n"
 "                                   Print path for package control file.\n"
 "\n"));

Reply via email to