[Pkg-ocaml-maint-commits] [dose3] 02/05: Add patch 0001-applications-apt-cudf.ml-Do-not-generate-removal-req from upstream git master to let apt-cudf not create a removal request for upgrades or downgrades.

Johannes Schauer josch at moszumanska.debian.org
Fri May 13 18:16:48 UTC 2016


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

josch pushed a commit to annotated tag debian/4.3-1
in repository dose3.

commit b5e95cb688eea7c53ea07feda707b80647e6040a
Author: Johannes Schauer <josch at debian.org>
Date:   Fri May 13 17:28:46 2016 +0200

    Add patch 0001-applications-apt-cudf.ml-Do-not-generate-removal-req from upstream git master to let apt-cudf not create a removal request for upgrades or downgrades.
---
 debian/changelog                                   |  4 ++
 ...s-apt-cudf.ml-Do-not-generate-removal-req.patch | 60 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 65 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f1fd729..606eee9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,6 +8,10 @@ dose3 (4.3-1) experimental; urgency=medium
   [ Johannes Schauer ]
   * Drop patch disable_dot because #809049 has been fixed. Restore build
     dependency on graphviz.
+  * Add patch 0001-applications-apt-cudf.ml-Do-not-generate-removal-req from
+    upstream git master to let apt-cudf not create a removal request for
+    upgrades or downgrades but only a single install request. See the patch
+    description as well as the closed bug for details (closes: #823906)
 
  -- Ralf Treinen <treinen at debian.org>  Sat, 23 Apr 2016 17:28:08 +0200
 
diff --git a/debian/patches/0001-applications-apt-cudf.ml-Do-not-generate-removal-req.patch b/debian/patches/0001-applications-apt-cudf.ml-Do-not-generate-removal-req.patch
new file mode 100644
index 0000000..54ac3fa
--- /dev/null
+++ b/debian/patches/0001-applications-apt-cudf.ml-Do-not-generate-removal-req.patch
@@ -0,0 +1,60 @@
+From 27afc8f6d290dd7f31a6bcde6b8761d0b55e87bd Mon Sep 17 00:00:00 2001
+From: Johannes 'josch' Schauer <josch at mister-muffin.de>
+Date: Thu, 12 May 2016 06:37:47 +0200
+Subject: [PATCH] applications/apt-cudf.ml: Do not generate removal requests
+ for up/downgrades
+
+As far as solvers are concerned, changes in package versions mean that
+the old package is removed and the package in the new version is
+installed. This is how it was encoded in the EDSP output so far.
+
+Recently, (commit c0d57a2a) the order of installation and removal
+requests was turned around and it was discovered that apt will only
+parse the *last* request for a package (see Debian bug #823906). Thus,
+apt would remove a certain package but not install it in its new
+version.
+
+As a remedy, this commit makes sure that package up or downgrades are
+expressed in a single "Install" request and that these do not show up as
+a "Remove" request anymore.
+---
+ applications/apt-cudf.ml | 12 +++++++++++-
+ 1 file changed, 11 insertions(+), 1 deletion(-)
+
+diff --git a/applications/apt-cudf.ml b/applications/apt-cudf.ml
+index 29eb7b5..90fd450 100644
+--- a/applications/apt-cudf.ml
++++ b/applications/apt-cudf.ml
+@@ -506,10 +506,19 @@ let main () =
+   Util.Timer.start timer3;
+   let empty = ref true in
+   let cache = CudfAdd.Cudf_hashtbl.create 1023 in
++  (* In Debian (and thus for apt and dpkg), packages can only be installed in a
++   * single version at a time. Thus, any up or downgrades always implicitly
++   * remove the old version. Therefore, if a package installation request just
++   * changes the version of the package, we remember this in a hash table such
++   * that we do not generate a removal request for that package as well. As a
++   * result, every package (name) only shows up exactly once in the solution.
++   * Package removals are not explicitly shown for upgrades. *)
++  let notremoved = Util.StringHashtbl.create 1023 in
+ 
+   let (install,remove) = CudfDiff.make_solution ~universe ~solution:soluniv in
+   CudfAdd.Cudf_set.iter (fun pkg ->
+     CudfAdd.Cudf_hashtbl.add cache pkg ();
++    Util.StringHashtbl.add notremoved pkg.Cudf.package ();
+     Format.printf "Install: %a at ." pp_pkg (pkg,univ)
+   ) install;
+ 
+@@ -527,7 +536,8 @@ let main () =
+   ) cudf_request.Cudf.install;
+ 
+   CudfAdd.Cudf_set.iter (fun p ->
+-    Format.printf "Remove: %a at ." pp_pkg (p,univ)
++    if Util.StringHashtbl.mem notremoved p.Cudf.package then ()
++    else Format.printf "Remove: %a at ." pp_pkg (p,univ)
+   ) remove;
+ 
+   Util.Timer.stop timer3 ();
+-- 
+2.5.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 9dceec7..e5d64a1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 binaries-prefix-edos
+0001-applications-apt-cudf.ml-Do-not-generate-removal-req.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ocaml-maint/packages/dose3.git



More information about the Pkg-ocaml-maint-commits mailing list