[med-svn] [Git][med-team/kaptive][master] 6 commits: add fix-which-error-output.patch; fix `which` parsing

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Wed Sep 22 16:44:35 BST 2021



Étienne Mollier pushed to branch master at Debian Med / kaptive


Commits:
bc5edcba by Étienne Mollier at 2021-09-22T17:21:39+02:00
add fix-which-error-output.patch; fix `which` parsing

- - - - -
10868232 by Étienne Mollier at 2021-09-22T17:22:32+02:00
routine-update: Fix watchfile to detect new versions on github

- - - - -
8664b4b0 by Étienne Mollier at 2021-09-22T17:23:45+02:00
routine-update: Standards-Version: 4.6.0

- - - - -
4f2432d7 by Étienne Mollier at 2021-09-22T17:23:57+02:00
Apply multi-arch hints.
+ kaptive-data, kaptive-example: Add Multi-Arch: foreign.

Changes-By: apply-multiarch-hints

- - - - -
2d9d650c by Étienne Mollier at 2021-09-22T17:37:19+02:00
d/t/run-unit-test: run kaptive.py multi threaded

This restores the autopkgtest to its initial condition, since the
bug #970344 is resolved.

- - - - -
7d83b141 by Étienne Mollier at 2021-09-22T17:43:15+02:00
ready for team upload to unstable

- - - - -


6 changed files:

- debian/changelog
- debian/control
- + debian/patches/fix-which-error-output.patch
- debian/patches/series
- debian/tests/run-unit-test
- debian/watch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,18 @@
+kaptive (0.7.3-4) unstable; urgency=medium
+
+  * Team upload.
+  * Add fix-which-error-output.patch to fix the way kaptive.py parses `which`
+    output; this is necessary since `which` in Debian issues a deprecation
+    warning.
+  * Fix watchfile to detect new versions on github (routine-update)
+  * Standards-Version: 4.6.0 (routine-update)
+  * Apply multi-arch hints.
+    + kaptive-data, kaptive-example: Add Multi-Arch: foreign.
+  * d/t/run-unit-test: run kaptive.py in multiple threads again, since the bug
+    #970344, affecting tblastn, is now solved.
+
+ -- Étienne Mollier <emollier at debian.org>  Wed, 22 Sep 2021 17:38:14 +0200
+
 kaptive (0.7.3-3) unstable; urgency=high
 
   * Team upload.


=====================================
debian/control
=====================================
@@ -8,7 +8,7 @@ Build-Depends: debhelper-compat (= 13),
                python3-all,
                python3-setuptools,
                python3-biopython <!nocheck>
-Standards-Version: 4.5.0
+Standards-Version: 4.6.0
 Vcs-Browser: https://salsa.debian.org/med-team/kaptive
 Vcs-Git: https://salsa.debian.org/med-team/kaptive.git
 Homepage: https://github.com/katholt/Kaptive
@@ -54,6 +54,7 @@ Package: kaptive-data
 Architecture: all
 Depends: ${misc:Depends}
 Enhances: kaptive
+Multi-Arch: foreign
 Description: reference data for kaptive for Klebsiella genome assemblies
  Kaptive reports information about K and O types for Klebsiella genome
  assemblies.
@@ -89,6 +90,7 @@ Package: kaptive-example
 Architecture: all
 Depends: ${misc:Depends}
 Enhances: kaptive
+Multi-Arch: foreign
 Description: example data for kaptive for Klebsiella genome assemblies
  Kaptive reports information about K and O types for Klebsiella genome
  assemblies.


=====================================
debian/patches/fix-which-error-output.patch
=====================================
@@ -0,0 +1,30 @@
+Description: address handling of `which` command
+ kaptive.py is unable to run any meaningful computation, due to the way it
+ handles the output of the command `which makeblastdb` in a context of `which`
+ outputing deprecation messages in the standard error.  The patch is a way to
+ approximate the behavior of the regular shell use of the command `which` which
+ consists in checking the error code of the command, and discarding the
+ standard output.  Standard error is left around in case the command `which`
+ were to have interesting diagnostic messages to the user.
+Author: Étienne Mollier <emollier at debian.org>
+Forwarded: no
+Last-Update: 2021-09-22
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- kaptive.orig/kaptive.py
++++ kaptive/kaptive.py
+@@ -171,9 +171,11 @@
+ 
+ def find_program(name):
+     """Checks to see if a program exists."""
+-    process = subprocess.Popen(['which', name], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+-    out, err = process.communicate()
+-    return bool(out) and not bool(err)
++    try:
++        subprocess.check_call(['which', name], stdout=subprocess.DEVNULL)
++    except subprocess.CalledProcessError:
++        return False
++    return True
+ 
+ 
+ def fix_paths(args):


=====================================
debian/patches/series
=====================================
@@ -1,2 +1,3 @@
 blastdb_4
 extend_bad_versions
+fix-which-error-output.patch


=====================================
debian/tests/run-unit-test
=====================================
@@ -14,6 +14,4 @@ cd "${AUTOPKGTEST_TMP}"
 
 gunzip -r *
 
-echo "FIXME: Due to bug #970344 we are using single threaded mode (-t 1) here."
-kaptive.py -t 1 -a exact_match.fasta -k /usr/share/${pkg}/reference_database/Klebsiella_k_locus_primary_reference.gbk -o output/test
-echo "FIXME: Make sure to remove '-t 1' from the kaptive call once bug #970344 is fixed."
+kaptive.py -a exact_match.fasta -k /usr/share/${pkg}/reference_database/Klebsiella_k_locus_primary_reference.gbk -o output/test


=====================================
debian/watch
=====================================
@@ -1,3 +1,3 @@
 version=4
 
-https://github.com/katholt/Kaptive/releases .*/archive/v?@ANY_VERSION@@ARCHIVE_EXT@
+https://github.com/katholt/Kaptive/releases .*/v?@ANY_VERSION@@ARCHIVE_EXT@



View it on GitLab: https://salsa.debian.org/med-team/kaptive/-/compare/61bc03e075a93af23653f5d3aabec210444f91a7...7d83b1410ebc16f1b69cc77f09faf41f3e3de5f0

-- 
View it on GitLab: https://salsa.debian.org/med-team/kaptive/-/compare/61bc03e075a93af23653f5d3aabec210444f91a7...7d83b1410ebc16f1b69cc77f09faf41f3e3de5f0
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20210922/cad1aefa/attachment-0001.htm>


More information about the debian-med-commit mailing list