From 68f2dc5e86527fda5ad6414f2a33f0b272d2c98849938365ebd015b8ca644d07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Wed, 19 Mar 2014 09:18:41 +0000 Subject: [PATCH] Accepting request 225446 from home:deadpoint:branches:Java:packages Added maven_depmap-no-attribute-exit.patch: SLES patch for ZipFile having no attribute '__exit__' which was causing ecj build failures OBS-URL: https://build.opensuse.org/request/show/225446 OBS-URL: https://build.opensuse.org/package/show/Java:packages/javapackages-tools?expand=0&rev=14 --- javapackages-tools.changes | 7 +++++++ javapackages-tools.spec | 6 ++++++ maven_depmap-no-attribute-exit.patch | 15 +++++++++++++++ 3 files changed, 28 insertions(+) create mode 100644 maven_depmap-no-attribute-exit.patch diff --git a/javapackages-tools.changes b/javapackages-tools.changes index eb37454..e022285 100644 --- a/javapackages-tools.changes +++ b/javapackages-tools.changes @@ -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 diff --git a/javapackages-tools.spec b/javapackages-tools.spec index 29242fe..7255f20 100644 --- a/javapackages-tools.spec +++ b/javapackages-tools.spec @@ -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} diff --git a/maven_depmap-no-attribute-exit.patch b/maven_depmap-no-attribute-exit.patch new file mode 100644 index 0000000..7be8823 --- /dev/null +++ b/maven_depmap-no-attribute-exit.patch @@ -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.