[med-svn] [Git][med-team/imagej][master] 3 commits: d/extra/imagej: adjust "free" parsing

Étienne Mollier (@emollier) gitlab at salsa.debian.org
Fri Aug 20 12:16:54 BST 2021



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


Commits:
970001b5 by Étienne Mollier at 2021-08-20T11:13:20+02:00
d/extra/imagej: adjust "free" parsing

For a couple of years, "free" changed output format.  This change
captures again available memory for commit by the java virtual
machine.

Closes: #986041

- - - - -
557a78a5 by Étienne Mollier at 2021-08-20T11:24:33+02:00
d/control: imagej depends on procps

If the "free" command is unavailable, the wrapper "imagej" will output
spurious messages about missing "free" command.  This will not prevent
the "imagej" command to run, as the superficial autopkgtest does not
fail, apparently, but this probably won't go unnoticed.

- - - - -
adf5d591 by Étienne Mollier at 2021-08-20T12:32:21+02:00
update changelog

- - - - -


3 changed files:

- debian/changelog
- debian/control
- debian/extra/imagej


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+imagej (1.53k-2) UNRELEASED; urgency=medium
+
+  * Team Upload.
+  * d/extra/imagej: adjust "free" parsing (Closes: #986041)
+  * d/control: imagej depends on procps; fixes spurious missing "free" command
+    messages when "free" is not available.
+
+ -- Étienne Mollier <emollier at debian.org>  Fri, 20 Aug 2021 12:29:49 +0200
+
 imagej (1.53k-1) unstable; urgency=medium
 
   * Team Upload.


=====================================
debian/control
=====================================
@@ -20,6 +20,7 @@ Architecture: all
 Depends: ${java:Depends},
          ${misc:Depends},
          default-jre | java6-runtime,
+         procps,
          libij-java
 Recommends: ${java:Recommends}
 Description: Image processing program with a focus on microscopy images


=====================================
debian/extra/imagej
=====================================
@@ -102,13 +102,13 @@ elif [[ `uname` == 'Linux' ]] ; then
     if [[ `uname -m` == 'x86_64' ]] ; then
         java_path="${ij_path}/jre64/bin/java"
         max_mem=`free | awk 'NR == 2 {fmem=int($2 / 1024); if (fmem < 8000) {print fmem} else {print 8000}}'`
-        free_mem=`free | awk 'NR == 3 {fmem=int($4 / 1024); if (fmem < 8000) {print fmem} else {print 8000}}'`
+        free_mem=`free | awk 'NR == 2 {fmem=int($7 / 1024); if (fmem < 8000) {print fmem} else {print 8000}}'`
         mem=${free_mem}/3*2
         if (( $mem > $default_mem || $mem < $min_mem )) ; then mem=$default_mem ; fi
     else
         java_path="${ij_path}/jre/bin/java"
         max_mem=`free | awk 'NR == 2 {fmem=int($2 / 1024); if (fmem < 1800) {print fmem} else {print 1800}}'`
-        free_mem=`free | awk 'NR == 3 {fmem=int($4 / 1024); if (fmem < 1800) {print fmem} else {print 1800}}'`
+        free_mem=`free | awk 'NR == 2 {fmem=int($7 / 1024); if (fmem < 1800) {print fmem} else {print 1800}}'`
         mem=${free_mem}/3*2
         if (( $mem > $default_mem || $mem < $min_mem )) ; then mem=$default_mem ; fi
     fi



View it on GitLab: https://salsa.debian.org/med-team/imagej/-/compare/99944120d515e2e403dba435a982a767bcf5ad22...adf5d5917eb8f7acfe8a0d3c8c56f45f48b76c5f

-- 
View it on GitLab: https://salsa.debian.org/med-team/imagej/-/compare/99944120d515e2e403dba435a982a767bcf5ad22...adf5d5917eb8f7acfe8a0d3c8c56f45f48b76c5f
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/20210820/3fcc0504/attachment-0001.htm>


More information about the debian-med-commit mailing list