Your message dated Sun, 27 Nov 2016 21:33:36 +0000
with message-id <[email protected]>
and subject line Bug#845360: fixed in jython 2.5.3-12
has caused the Debian Bug report #845360,
regarding jython: the default cachedir path should be set at the library 
intialization step
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
845360: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=845360
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: jython
Version: 2.5.3-11
Severity: normal
Tags: patch

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

The jython launcher currently forces the cachedir to $HOME/.jython-cache. But 
when the library is used directly the cachedir is still set from the upstream 
default in src/org/python/core/PySystemState.java:
 protected static final String CACHEDIR_DEFAULT_NAME = "cachedir";
Which results in the non-writable path /usr/share/jython/cachedir.

I think it would be more consistent to change the default directly into the 
PySystemState class and drop the corresponding configuration from the launcher.

Please see the attached patch proposal. I'm willing to team-upload it in a few 
days, unless you object.

thanks,

- -- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.7.0-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

-----BEGIN PGP SIGNATURE-----

iQEcBAEBCAAGBQJYNJlRAAoJEO/obGx//s+DjpgH/3cSm00TLH4+AhQ/Slv5PpGb
1nunZGfS/sBsKPezfGayNhezZCiWE+BFjUyi8ErL/Gb7hiHEGDGdBZYanJcAgQc8
XzyoIvXdVn3UuoZ0Uwlic5EMGNdgh/8uZNVs/ZhommZHs+VxuDDjATP0IAZ2pPhY
wH13hX4amZ7LVliTbKoCV6Wip4cookjdROyxvf5Q7sMVIpdZA6hWtc5RdczONF0j
cgXjnwWEc3aZEw6yEk12ZMcsEY40HmrE9lRtHL6AqPXj0ZUhvX+Lrt5HlgxfRf7m
QsFJz85HID0ZxCJCqCkIed13IuQ7xxWaHo1N9Hoeh/tU3Wok4FbK7vLwnxLrpb8=
=D7MZ
-----END PGP SIGNATURE-----
diff -Nru jython-2.5.3/debian/changelog jython-2.5.3/debian/changelog
--- jython-2.5.3/debian/changelog	2016-11-07 14:36:32.000000000 +0100
+++ jython-2.5.3/debian/changelog	2016-11-22 01:38:42.000000000 +0100
@@ -1,3 +1,12 @@
+jython (2.5.3-11.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * New patch 03-default-cachedir.patch: the Debian default cachedir
+    path is now set at the library intialization step, so that it works
+    for every use case
+
+ -- Gilles Filippini <[email protected]>  Tue, 22 Nov 2016 00:34:43 +0100
+
 jython (2.5.3-11) unstable; urgency=medium
 
   * Team upload.
diff -Nru jython-2.5.3/debian/jython_perl jython-2.5.3/debian/jython_perl
--- jython-2.5.3/debian/jython_perl	2015-12-21 15:05:26.000000000 +0100
+++ jython-2.5.3/debian/jython_perl	2016-11-22 01:33:37.000000000 +0100
@@ -92,21 +92,6 @@
 # Decide upon the python path.
 my $jythonPath = "/usr/lib/site-python:/usr/share/jython/Lib";
 
-# Set up the cache directory.
-#
-my $cacheDir = "$home/.jython-cache";
-if (-e $cacheDir and ! -d $cacheDir) {
-	# The expected cache directory exists but is not a directory.
-	# Use a temporary directory instead.
-	$cacheDir = `mktemp -dt jython-cache.XXXXXX` or
-		bail("Could not create temporary cache directory.");
-	chomp $cacheDir;
-}
-if (! -e $cacheDir) {
-	# Create a new cache directory.
-	mkdir $cacheDir or bail("Could not create cache directory $cacheDir.");
-}
-
 # We will build up a JNI library path from various places.
 #
 my $jniPath = '';
@@ -160,7 +145,6 @@
 push @fullCommandLine, "-Dpython.home=$jythonHome";
 push @fullCommandLine, "-Dpython.path=$jythonPath";
 push @fullCommandLine, "-Dpython.executable=$0";
-push @fullCommandLine, "-Dpython.cachedir=$cacheDir";
 push @fullCommandLine, "-Dpython.console=org.python.util.ReadlineConsole";
 push @fullCommandLine, "-Dpython.console.readlinelib=Editline";
 $ENV{CALLED_FROM_JYTHONC} and
diff -Nru jython-2.5.3/debian/jython.README.Debian jython-2.5.3/debian/jython.README.Debian
--- jython-2.5.3/debian/jython.README.Debian	2015-07-23 14:00:44.000000000 +0200
+++ jython-2.5.3/debian/jython.README.Debian	2016-11-22 01:42:00.000000000 +0100
@@ -7,6 +7,9 @@
 Consult the jython(1) man page for details about invocation
 of the Jython interpreter.
 
+On Debian, the default jython cachedir path is set to
+${user.home}/.jython-cache instead of ${python.home}/cachedir.
+
 The Jython API is provided by the jython-doc package in
 /usr/share/doc/jython-doc.
 
diff -Nru jython-2.5.3/debian/patches/03-default-cachedir.patch jython-2.5.3/debian/patches/03-default-cachedir.patch
--- jython-2.5.3/debian/patches/03-default-cachedir.patch	1970-01-01 01:00:00.000000000 +0100
+++ jython-2.5.3/debian/patches/03-default-cachedir.patch	2016-11-22 19:30:04.000000000 +0100
@@ -0,0 +1,14 @@
+Index: jython-2.5.3/src/org/python/core/PySystemState.java
+===================================================================
+--- jython-2.5.3.orig/src/org/python/core/PySystemState.java
++++ jython-2.5.3/src/org/python/core/PySystemState.java
+@@ -46,7 +46,8 @@ public class PySystemState extends PyObj
+     public static final String PYTHON_CACHEDIR = "python.cachedir";
+     public static final String PYTHON_CACHEDIR_SKIP = "python.cachedir.skip";
+     public static final String PYTHON_CONSOLE_ENCODING = "python.console.encoding";
+-    protected static final String CACHEDIR_DEFAULT_NAME = "cachedir";
++    protected static final String CACHEDIR_DEFAULT_NAME = System.getProperty("user.home") != null ?
++        (new File(System.getProperty("user.home"), ".jython-cache")).toString() : "cachedir";
+ 
+     public static final String JYTHON_JAR = "jython.jar";
+     public static final String JYTHON_DEV_JAR = "jython-dev.jar";
diff -Nru jython-2.5.3/debian/patches/series jython-2.5.3/debian/patches/series
--- jython-2.5.3/debian/patches/series	2015-09-03 12:12:49.000000000 +0200
+++ jython-2.5.3/debian/patches/series	2016-11-22 00:34:19.000000000 +0100
@@ -1,2 +1,3 @@
 01-build.patch
 02-jnr_refactoring.patch
+03-default-cachedir.patch

--- End Message ---
--- Begin Message ---
Source: jython
Source-Version: 2.5.3-12

We believe that the bug you reported is fixed in the latest version of
jython, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Gilles Filippini <[email protected]> (supplier of updated jython package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Sun, 27 Nov 2016 21:48:24 +0100
Source: jython
Binary: jython jython-doc
Architecture: source
Version: 2.5.3-12
Distribution: unstable
Urgency: medium
Maintainer: Debian Java Maintainers 
<[email protected]>
Changed-By: Gilles Filippini <[email protected]>
Description:
 jython     - Python seamlessly integrated with Java
 jython-doc - Jython documentation including API docs
Closes: 845270 845360
Changes:
 jython (2.5.3-12) unstable; urgency=medium
 .
   * Team upload
   * Fix jython.home setting (closes: 845270):
     - Install jython laucher into /usr/share/jython/bin
     - Make /usr/bin/jython a symlink to /usr/share/jython/bin/jython
     - In the jython launcher, define jython.home with
       dirname(dirname(abs_path($0)))
   * New patch 03-default-cachedir.patch: the Debian default cachedir
     path is now set at the library intialization step, so that it works
     for every use case (closes: #845360)
   * Move python from Build-Depends-Indep to Build-Depends to allow building
     source only package (python provides the debhelper sequence file for
     dh_python2)
Checksums-Sha1:
 4a3014b2459cc61991f73ac8e4096344a5945bb9 2029 jython_2.5.3-12.dsc
 46c4e44b9e95aecbcbbb5031dc6a0d6876b99a33 19404 jython_2.5.3-12.debian.tar.xz
Checksums-Sha256:
 9151481cab2f9a1d53c585da40087593552ff219fbda70c30f5ad85fcdb7a62c 2029 
jython_2.5.3-12.dsc
 fc199a97bc758fd64db8c8961a0425b5fc18e659486cecd98861fb08f7ff0568 19404 
jython_2.5.3-12.debian.tar.xz
Files:
 6919299ab531fdcad63b28218f687f5a 2029 python optional jython_2.5.3-12.dsc
 fc161ebbf576274d5a1db3899472156b 19404 python optional 
jython_2.5.3-12.debian.tar.xz

-----BEGIN PGP SIGNATURE-----

iQEtBAEBCAAXBQJYO0p+EBxwaW5pQGRlYmlhbi5vcmcACgkQ7+hsbH/+z4Mi/QgA
r6zyAQYuqr4MJCnbbHnK1E3w0LyjhiOYU9hvSnVPy7Vpfm4Q54oRykteFPqnHRFd
uewbozjylMG/NXp04/ZYQtTwz/3EOgI/irWKQ473qu8sqpOorF8RsiTmy19dwLxd
GJElHm0T/2/Vj/t4bhrlxeJ3CJzTh/oAwZyKuYmsnDNm3I7uqCbgHyeI8L6ZqlW7
wojd4MancNc8OoO+onfFgOrSLi87bPzcUfvnsFJwYQSq8P6NcsY0KuxDkrkjgANP
dFZGnEbpqPpmnesoBYflyTG2yX00eb8YQLEgZ2CST31IlCzqv3bJ3s6DnkUCLaOt
81ZwLpB0qop9azRlf/dM4A==
=KaAP
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to