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

treinen pushed a commit to branch master
in repository dose3.

commit 416c230901f8b9d073e3b2f3c6b89488f38b7942
Author: Ralf Treinen <trei...@free.fr>
Date:   Fri Jul 15 19:09:25 2016 +0200

    get_real_name: drop both --virtual prefix and :architecture suffix from 
names
---
 debian/changelog           |  8 ++++++--
 debian/patches/getrealname | 31 +++++++++++++++++++++++++++++++
 debian/patches/series      |  1 +
 3 files changed, 38 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index a58074f..8bc5fd2 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,15 @@
-dose3 (5.0-2) UNRELEASED; urgency=medium
+dose3 (5.0-2) unstable; urgency=medium
 
   * patch distcheck-fg-bg: fix calculation of the list of packages to check
     by distcheck in case of both --bg and --fg arguments (closes: #830957).
+  * patch getrealname: fix the function get_real_name to remove both a
+    --virtual prefix and an :architecture suffix in case both are present.
+    This fixes a crash during the generation of explanations observed by
+    wanna-build.
   * added NEWS item for dose-distcheck and dose-builddebcheck
     about --latest now taking an integer argument.
 
- -- Ralf Treinen <trei...@debian.org>  Fri, 15 Jul 2016 10:47:23 +0200
+ -- Ralf Treinen <trei...@debian.org>  Fri, 15 Jul 2016 19:08:14 +0200
 
 dose3 (5.0-1) unstable; urgency=medium
 
diff --git a/debian/patches/getrealname b/debian/patches/getrealname
new file mode 100644
index 0000000..7f43148
--- /dev/null
+++ b/debian/patches/getrealname
@@ -0,0 +1,31 @@
+Author: Ralf Treinen <trei...@debian.org>
+Description: get_real_name: remove both --virtual prefix and arch suffix
+Upstream-commit: b09a011b8c9b5aa0391d466a6e004acc4ccfb2d8
+
+diff --git a/deb/debcudf.ml b/deb/debcudf.ml
+index fd4b980..8c83f0d 100644
+--- a/deb/debcudf.ml
++++ b/deb/debcudf.ml
+@@ -224,13 +224,15 @@ let get_cudf_version tables (package,version) =
+ let get_real_name name = 
+   (* Remove --virtual- and architecture encoding *)
+   let dn = (CudfAdd.decode name) in
+-  if ExtString.String.starts_with dn "--vir" then
+-    (ExtString.String.slice ~first:10 dn,None)
+-  else
+-    try
+-      let (n,a) = ExtString.String.split dn ":" in
+-      if n = "src" then (a,None) else (n,Some a)
+-    with Invalid_string -> (dn,None)
++  let no_virtual =
++    if ExtString.String.starts_with dn "--vir"
++    then ExtString.String.slice ~first:10 dn
++    else dn
++  in
++  try
++    let (n,a) = ExtString.String.split no_virtual ":" in
++    if n = "src" then (a,None) else (n,Some a)
++  with Invalid_string -> (no_virtual,None)
+ 
+ let get_real_version tables (cudfname,cudfversion) =
+   let (debname,arch) = get_real_name cudfname in
diff --git a/debian/patches/series b/debian/patches/series
index ce104a9..c0f50fb 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
 binaries-prefix-edos
 distcheck-fg-bg
+getrealname

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

_______________________________________________
Pkg-ocaml-maint-commits mailing list
Pkg-ocaml-maint-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-ocaml-maint-commits

Reply via email to