1
0

Accepting request 226691 from Java:packages

Added maven_depmap-no-attribute-exit.patch: SLES patch for ZipFile having no attribute '__exit__' which was causing ecj build failures (forwarded request 225446 from deadpoint)

OBS-URL: https://build.opensuse.org/request/show/226691
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/javapackages-tools?expand=0&rev=8
This commit is contained in:
Stephan Kulow 2014-03-21 12:31:17 +00:00 committed by Git OBS Bridge
commit 3a113b2c40
3 changed files with 28 additions and 0 deletions

View File

@ -1,3 +1,10 @@
-------------------------------------------------------------------
Mon Mar 10 13:52:26 UTC 2014 - darin@darins.net
- maven_depmap-no-attribute-exit.patch: SLES patch for ZipFile
having no attribute '__exit__' which was causing ecj build
failures
-------------------------------------------------------------------
Thu Mar 6 13:54:16 UTC 2014 - darin@darins.net

View File

@ -34,6 +34,9 @@ Source0: https://fedorahosted.org/released/javapackages/javapackages-%{ve
Patch0: suse-use-libdir.patch
# PATCH-FIX-UPSTREAM Drain stdin in dependency generator
Patch1: depgen.patch
# PATCH-FIX-SLE maven_depmap-no-attribute-exit.patch - fix ZipFile instance has no attribute '__exit__'
Patch2: maven_depmap-no-attribute-exit.patch
#BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: asciidoc
@ -102,6 +105,9 @@ This package provides macros and scripts to support packaging Maven artifacts.
%setup -q -n javapackages-%{version}
%patch0 -p1
%patch1 -p1
%if 0%{?suse_version} == 1110
%patch2 -p1
%endif
%build
%{configure}

View File

@ -0,0 +1,15 @@
--- javapackages-2.0.1/java-utils/maven_depmap.py 2014-03-10 09:25:02.081196397 -0400
+++ javapackages-2.0.1/java-utils/maven_depmap.py.mod 2014-03-10 09:25:35.499433928 -0400
@@ -236,9 +236,9 @@
# Add a file to a ZIP archive (or JAR, WAR, ...) unless the file
# already exists in the archive. Provided by Tomas Radej.
def append_if_missing(archive_name, file_name, file_contents):
- with ZipFile(archive_name, 'a') as archive:
- if file_name not in archive.namelist():
- archive.writestr(file_name, file_contents)
+ archive = ZipFile(archive_name, 'a')
+ if file_name not in archive.namelist():
+ archive.writestr(file_name, file_contents)
# Inject pom.properties if JAR doesn't have one. This is necessary to
# identify the origin of JAR files that are present in the repository.