Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 758881 - dev-java/jython-2.7.0-r2 AttributeError: 'NoneType' object has no attribute 'startswith'
Summary: dev-java/jython-2.7.0-r2 AttributeError: 'NoneType' object has no attribute '...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal major with 3 votes (vote)
Assignee: Java team
URL:
Whiteboard:
Keywords: PullRequest
: 770958 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-12-07 09:34 UTC by Jean-Claude Aciman
Modified: 2021-05-07 06:55 UTC (History)
9 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
all requested files (jython-2.7.0.tar.gz,54.84 KB, application/gzip)
2020-12-07 09:36 UTC, Jean-Claude Aciman
Details
jython-2.7.0-r2.ebuild.patch (jython-2.7.0-r2.ebuild.patch,913 bytes, patch)
2021-01-10 12:04 UTC, Fabio Rossi
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jean-Claude Aciman 2020-12-07 09:34:36 UTC
Required by "emerge ant", the package jython-2.7.0.r2 failed to compile in the following configuration:

GENTOO_VM=icedtea-bin-8  CLASSPATH="" JAVA_HOME="/opt/icedtea-bin-3.16.0"
JAVACFLAGS="-source 1.7 -target 1.7" COMPILER="javac"

Error reported is:

  File "/var/tmp/portage/dev-java/jython-2.7.0-r2/image/usr/share/jython-2.7/Lib/posixpath.py", line 373, in _joinrealpath
    if isabs(rest):
  File "/var/tmp/portage/dev-java/jython-2.7.0-r2/image/usr/share/jython-2.7/Lib/posixpath.py", line 61, in isabs
    return s.startswith('/')
AttributeError: 'NoneType' object has no attribute 'startswith'
 * ERROR: dev-java/jython-2.7.0-r2::gentoo failed (install phase):
 *   (no error message)

_______________________________________________________________________________
Attchment includes:
build.log
emerge --info =jython-2.7.0
environment


Reproducible: Always
Comment 1 Jean-Claude Aciman 2020-12-07 09:36:01 UTC
Created attachment 677134 [details]
all requested files

Contents:
build.log
environment
emerge --info
Comment 2 Fabio Rossi 2021-01-10 12:04:30 UTC
Created attachment 682225 [details, diff]
jython-2.7.0-r2.ebuild.patch

I have applied the attached patch to the current ebuild in portage, the package now build successfully
Comment 3 Fabio Rossi 2021-01-10 12:10:13 UTC
During the install phase there is a warning

/var/tmp/portage/dev-java/jython-2.7.0-r2/temp/jython: /usr/share/bashdb/bashdb-main.inc: No such file or directory
/var/tmp/portage/dev-java/jython-2.7.0-r2/temp/jython: warning: cannot start debugger; debugging mode disabled

but it seems it can be ignored, there is no need to depend on bashdb. It happens during call to "python_domodule epython.py" which calls python_optimize but eventually I can see the optimized file /usr/share/jython-2.7/Lib/site-packages/epython$py.class being generated
Comment 4 Jonathan Janzen 2021-01-14 04:32:46 UTC
I can confirm that I'm experiencing the same build failure on my machine, and additionally that the provide patch allows the package to build.
Comment 5 Ionen Wolkens 2021-02-16 17:55:55 UTC
*** Bug 770958 has been marked as a duplicate of this bug. ***
Comment 6 Ionen Wolkens 2021-02-16 17:57:09 UTC
Taking the liberty to re-open given this was never really fixed and the patch seems to help.
Comment 7 Jean-Claude Aciman 2021-03-06 22:27:48 UTC
Hi,
I got exactly the same problem today and the patch don't work. It cannot be applied without error as follow:
The text leading up to this was:

--------------------------
|--- /usr/portage/dev-java/jython/jython-2.7.0-r2.ebuild	2021-01-09 17:04:20.798391252 +0100
|+++ /var/lib/layman/__mine__/dev-java/jython/jython-2.7.0-r2.ebuild	2021-01-10 12:26:24.341996198 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored           

How to solve this issue? Please help!
Comment 8 Sebastian Pipping gentoo-dev 2021-03-06 23:02:51 UTC
(In reply to Jean-Claude Aciman from comment #7)
> I got exactly the same problem today and the patch don't work. It cannot be
> applied without error as follow:

Based on the output of patch you shared: There's a problem in the way you're using patch.  Try format "patch path/to/target < /path/to/patch" or see "man patch" please.
Comment 9 Jean-Claude Aciman 2021-03-08 13:57:05 UTC
(In reply to Sebastian Pipping from comment #8)
> (In reply to Jean-Claude Aciman from comment #7)
> > I got exactly the same problem today and the patch don't work. It cannot be
> > applied without error as follow:
> 
> Based on the output of patch you shared: There's a problem in the way you're
> using patch.  Try format "patch path/to/target < /path/to/patch" or see "man
> patch" please.

I did not use "patch" to apply this, but I ave put the patch_to_apply.patch file in the directory /etc/portage/patches/dev-lang/jython/, then doing a normal emerge for the packet. Normally, the patch must be applied correctly (with all the others from the repository), but there the application ot this patch fails.
Comment 10 Sebastian Pipping gentoo-dev 2021-03-08 14:04:44 UTC
(In reply to Jean-Claude Aciman from comment #9)
> I did not use "patch" to apply this, but I ave put the patch_to_apply.patch
> file in the directory /etc/portage/patches/dev-lang/jython/, then doing a
> normal emerge for the packet. Normally, the patch must be applied correctly
> (with all the others from the repository), but there the application ot this
> patch fails.

I see, my bad.  Have you tried adjusting the path inside the patch file?
Comment 11 Jean-Claude Aciman 2021-03-08 15:43:44 UTC
(In reply to Sebastian Pipping from comment #10)
> (In reply to Jean-Claude Aciman from comment #9)
> > I did not use "patch" to apply this, but I ave put the patch_to_apply.patch
> > file in the directory /etc/portage/patches/dev-lang/jython/, then doing a
> > normal emerge for the packet. Normally, the patch must be applied correctly
> > (with all the others from the repository), but there the application ot this
> > patch fails.
> 
> I see, my bad.  Have you tried adjusting the path inside the patch file?

I did and the full result of "ebuild jython-2.7.0-r2.ebuild clean prepare" is:

# ebuild jython-2.7.0-r2.ebuild clean prepare
 * jython-2.7.0-sources.jar BLAKE2B SHA512 size ;-) ...                                                              [ ok ]
 * checking ebuild checksums ;-) ...                                                                                 [ ok ]
 * checking auxfile checksums ;-) ...                                                                                [ ok ]
 * checking miscfile checksums ;-) ...                                                                               [ ok ]
 * Using: icedtea-8
>>> Unpacking source...
>>> Unpacking jython-2.7.0-sources.jar to /var/tmp/portage/dev-java/jython-2.7.0-r2/work
>>> Source unpacked in /var/tmp/portage/dev-java/jython-2.7.0-r2/work
>>> Preparing source in /var/tmp/portage/dev-java/jython-2.7.0-r2/work ...
 * Applying jython-2.5.2-distutils_scripts_location.patch ...
patching file Lib/distutils/command/install.py
Hunk #1 succeeded at 87 with fuzz 2 (offset 17 lines).                                                               [ ok ]
 * Applying jython-2.5.2-respect_PYTHONPATH.patch ...
patching file src/org/python/core/PySystemState.java
Hunk #1 succeeded at 807 with fuzz 2 (offset 161 lines).                                                             [ ok ]
 * Applying jython-2.7_beta1-ant.patch ...                                                                           [ ok ]
 * Applying jython-2.7_beta1-dont-always-recompile-classes.patch ...                                                 [ ok ]
 * Applying jython-2.7_beta2-maxrepeat-import.patch ...                                                              [ ok ]
 * Applying jython-2.7.0-build.xml.patch ...                                                                         [ ok ]
 * Applying CVE-2016-4000.patch ...                                                                                  [ ok ]
 * Applying jython-2.7.0-r2.ebuild.patch ...
can't find file to patch at input line 3
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|--- /usr/portage/dev-java/jython/jython-2.7.0-r2.ebuild	2021-01-09 17:04:20.798391252 +0100
|+++ /var/lib/layman/__mine__/dev-java/jython/jython-2.7.0-r2.ebuild	2021-01-10 12:26:24.341996198 +0100
--------------------------
No file to patch.  Skipping patch.
2 out of 2 hunks ignored                                                                                             [ !! ]
 * ERROR: dev-java/jython-2.7.0-r2::gentoo failed (prepare phase):
 *   patch -p1  failed with /etc/portage/patches/dev-java/jython-2.7.0-r2/jython-2.7.0-r2.ebuild.patch
Comment 12 Fabio Rossi 2021-03-08 16:07:28 UTC
The patch is to change the ebuild file itself as indicated in the name, it is not a patch to be added in /etc/portage/patches/dev-lang/jython ;-)

Starting from the ebuild in portage you use the patch to produce a new ebuild to be installed in your overlay
Comment 13 Sebastian Pipping gentoo-dev 2021-03-08 16:29:51 UTC
I'm not sure I understand.  Why would you apply a patch against the ebuild from inside the ebuild?  You need to patch the ebuild and then run it, no?
Comment 14 Jean-Claude Aciman 2021-03-08 18:44:57 UTC
(In reply to Sebastian Pipping from comment #13)
> I'm not sure I understand.  Why would you apply a patch against the ebuild
> from inside the ebuild?  You need to patch the ebuild and then run it, no?

You are right. I applied the patch directly to the ebuild, updated the Manifest then run the ebuild patched and all worked fine.
Thank you for your help.
Comment 15 Volkmar W. Pogatzki 2021-05-04 21:59:59 UTC
(In reply to Jonathan Janzen from comment #4)
> I can confirm that I'm experiencing the same build failure on my machine,
> and additionally that the provide patch allows the package to build.

That patch causes trouble in qa-reports:
https://qa-reports.gentoo.org/output/gentoo-ci/28728c336e/output.html#dev-java/jython
Comment 16 Volkmar W. Pogatzki 2021-05-07 06:55:12 UTC
(In reply to Volkmar W. Pogatzki from comment #15)
> (In reply to Jonathan Janzen from comment #4)
> > I can confirm that I'm experiencing the same build failure on my machine,
> > and additionally that the provide patch allows the package to build.
> 
> That patch causes trouble in qa-reports:
> https://qa-reports.gentoo.org/output/gentoo-ci/28728c336e/output.html#dev-
> java/jython

Removing PATCH keyword since the patch was wrong