[Apt-listbugs-commits] [apt-listbugs] 01/06: read Pre-Install-Pkgs hook info protocol version 3

Francesco Poli frx-guest at alioth.debian.org
Fri Oct 4 17:19:13 UTC 2013


This is an automated email from the git hooks/post-receive script.

frx-guest pushed a commit to branch master
in repository apt-listbugs.

commit f0cf138f96e0df0a3a4466e9cfe84a6bcf2a494f
Author: Francesco Poli (wintermute) <invernomuto at paranoici.org>
Date:   Tue Sep 24 00:18:50 2013 +0200

    read Pre-Install-Pkgs hook info protocol version 3
    
    First step towards a MultiArch aware apt-listbugs: hook information
    protocol version 3 is now read, but the extra data are not yet used...
---
 10apt-listbugs |    2 +-
 apt-listbugs   |   10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/10apt-listbugs b/10apt-listbugs
index 0c93139..13b5409 100644
--- a/10apt-listbugs
+++ b/10apt-listbugs
@@ -2,7 +2,7 @@
 // If you don't like it, comment it out.
 DPkg::Pre-Install-Pkgs {"/usr/sbin/apt-listbugs apt";};
 DPkg::Tools::Options::/usr/sbin/apt-listbugs "";
-DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "2";
+DPkg::Tools::Options::/usr/sbin/apt-listbugs::Version "3";
 DPkg::Tools::Options::/usr/sbin/apt-listbugs::InfoFD "20";
 AptListbugs::Severities "critical,grave,serious";
 // AptListbugs::IgnoreRegexp "FTBFS";
diff --git a/apt-listbugs b/apt-listbugs
index f517adc..a2d8339 100755
--- a/apt-listbugs
+++ b/apt-listbugs
@@ -148,7 +148,7 @@ apt-listbugs [-h] [-v] [-s <severities>] [-T <tags>] [-S <states>] [-B <bug#>] [
   Reads package actions from a file descriptor specified in the
   APT_HOOK_INFO_FD environment variable (typically provided by apt
   or other compatible package manager; Pre-Install-Pkgs hook info
-  protocol version 2 is expected - see apt.conf(5) for more details).
+  protocol version 3 is expected - see apt.conf(5) for more details).
 
 : list [<package1[/version]> <package2[/version]>...]
 
@@ -311,7 +311,7 @@ cur_pkgs = {}
 holdpkgs = {}
 case config.command
 when "apt"
-  # parse apt VERSION 2 input.
+  # parse apt VERSION 3 input.
   state=1
   apt_hook_fd = ENV["APT_HOOK_INFO_FD"]
   puts if $DEBUG
@@ -338,11 +338,11 @@ when "apt"
     case state
     when 1
       # the version header, only one line.
-      if pkg == "VERSION 2"
+      if pkg == "VERSION 3"
         puts "#{pkg}" if $DEBUG
         state=2
       else
-        $stderr.print _("E: apt Pre-Install-Pkgs is not giving me expected 'VERSION 2' string.\n")
+        $stderr.print _("E: apt Pre-Install-Pkgs is not giving me expected 'VERSION 3' string.\n")
         exit 1
       end
     when 2
@@ -360,7 +360,7 @@ when "apt"
     when 3
       # package action lines
       puts "#{pkg}" if $DEBUG
-      pkgname, old_ver, direction, new_ver, filename = pkg.split(" ")
+      pkgname, old_ver, old_arch, old_ma, direction, new_ver, new_arch, new_ma, filename = pkg.split(" ")
       case filename
       when "**CONFIGURE**"
         # none

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/apt-listbugs/apt-listbugs.git



More information about the Apt-listbugs-commits mailing list