[tycho] Avoid extracting tycho-bundles-external.zip in XMvn plugin

Mikolaj Izdebski mizdebsk at fedoraproject.org
Mon Sep 8 10:52:28 UTC 2014


commit 84939cf2d2d8021317014c9f4ad0e1f07f840e50
Author: Mikolaj Izdebski <mizdebsk at redhat.com>
Date:   Mon Sep 8 11:01:19 2014 +0200

    Avoid extracting tycho-bundles-external.zip in XMvn plugin

 .gitignore        |    1 -
 sources           |    2 +-
 tycho-debundle.sh |    3 +++
 tycho.spec        |    9 +++++++--
 4 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 8993107..3fc2da8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,3 @@ maven-repo.tar.xz
 /.project
 /eclipse-bootstrap.tar.xz
 /fedoraproject-p2-*.tar.xz
-/fedoraproject-p2-be5015.tar
diff --git a/sources b/sources
index 228889b..276024d 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
 127267aa75abd86df6815bcbd7f2492d  tycho-0.21.0.tar.bz2
 8303bf4c107a219ce0c916bb692046f6  eclipse-bootstrap.tar.xz
-1fa665013aa0c05452583c68e92ede11  fedoraproject-p2-be5015.tar
+1242c1415f51650aad0fd775b0e681e9  fedoraproject-p2-51d2ab.tar.xz
diff --git a/tycho-debundle.sh b/tycho-debundle.sh
index e9f8994..3bfd6ab 100755
--- a/tycho-debundle.sh
+++ b/tycho-debundle.sh
@@ -4,10 +4,12 @@
 
 projLoc=$1
 zipLoc=$2
+mfLoc=$3
 
 zipDir=`dirname ${zipLoc}`
 zipFile=`basename ${zipLoc}`
 tmpDir=${zipDir}/tmp
+[ -z "$mfLoc" ] && mfLoc=/dev/null
 
 mkdir -p ${tmpDir}
 unzip -d ${tmpDir} ${zipLoc}
@@ -16,6 +18,7 @@ pushd ${tmpDir}
 pluginsDir=`find . -type d -name plugins`
 pushd ${pluginsDir} && rm -rf *
 symlinkBundles "${wantedBundles}"
+for b in *; do readlink -f $b; done >$mfLoc
 popd
 zip -ry ${zipFile} *
 popd
diff --git a/tycho.spec b/tycho.spec
index 1a8ae80..e4f1da9 100644
--- a/tycho.spec
+++ b/tycho.spec
@@ -15,7 +15,7 @@
 # %%global snap -SNAPSHOT
 %global snap %{nil}
 
-%global fp_p2_sha be5015
+%global fp_p2_sha 51d2ab
 %global fp_p2_version 0.0.1
 %global fp_p2_snap -SNAPSHOT
 
@@ -324,10 +324,13 @@ done
 
 # p2 runtime
 dir=.m2/org/eclipse/tycho/tycho-bundles-external/%{version}%{snap}
-./%{name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip
+./%{name}-debundle.sh tycho-bundles/tycho-bundles-external/ $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external-manifest.txt
 install -pm 644 $dir/tycho-bundles-external-%{version}*.pom $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-tycho-bundles-external.pom
 install -m 644 $dir/tycho-bundles-external-%{version}*.zip $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external.zip
 %add_maven_depmap JPP.%{name}-tycho-bundles-external.pom %{name}/tycho-bundles-external.zip -a "org.eclipse.tycho:tycho-bundles-external"
+cp $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external-manifest.txt{,~}  # workaround for rhbz#1139180
+%add_maven_depmap org.eclipse.tycho:tycho-bundles-external:txt:manifest:%{version}%{snap} %{name}/tycho-bundles-external-manifest.txt
+mv $RPM_BUILD_ROOT%{_javadir}/%{name}/tycho-bundles-external-manifest.txt{~,}  # workaround for rhbz#1139180
 
 # main
 install -pm 644 pom.xml  $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.%{name}-main.pom
@@ -396,6 +399,8 @@ ln -s %{_javadir}/%{name}/org.fedoraproject.p2.jar %{buildroot}%{_datadir}/xmvn/
 %changelog
 * Mon Sep  8 2014 Mikolaj Izdebski <mizdebsk at redhat.com> - 0.21.0-8
 - fedoraproject-p2: Import XMvn P2 plugin
+- fedoraproject-p2: Fix NPE bug
+- fedoraproject-p2: Avoid extracting tycho-bundles-external.zip
 
 * Fri Sep 05 2014 Roland Grunberg <rgrunber at redhat.com> - 0.21.0-7
 - Debundle tycho-bundles-external and tycho-standalone-p2-director.


More information about the scm-commits mailing list