Alon Bar-Lev has uploaded a new change for review.

Change subject: packaging: spec: rework jar/poms installation
......................................................................

packaging: spec: rework jar/poms installation

at 96199c4e we introduce different method of handling poms/jars, this
derived the need to have real path for %{_javadir}/%{name} as the files
listed in the .mfiles are per that %{name}, so far it used to be symlink
to %{_javadir}/%{engine_name} if package name differ, this is the exact
opposite than what we had before.

however, if previous installation had %{_javadir}%{engine_name} directory
with files that for some reason were not removed, the rpm could not
recreate it as symlink.

as result, we must revert to previous state in this regard, and process
the .mfiles to contain the real path instead of the symlink instead.

Change-Id: Ieb38102400dc861e2369ba8cdbef380593442832
Signed-off-by: Alon Bar-Lev <alo...@redhat.com>
---
M ovirt-engine.spec.in
1 file changed, 7 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/94/27294/1

diff --git a/ovirt-engine.spec.in b/ovirt-engine.spec.in
index 1514294..27e793e 100644
--- a/ovirt-engine.spec.in
+++ b/ovirt-engine.spec.in
@@ -613,11 +613,9 @@
 %{engine_restapi_war}/WEB-INF/lib/restapi-types.jar
 __EOF__
 
-# needed for compatibility if package is different than the directory structure
-# as we must install poms/files at %{name} we must set it to be the real path
+# Needed for compatibility if package is different than the directory structure
 %if "%{name}" != "%{engine_name}"
-mv "%{buildroot}%{engine_java}" "%{buildroot}%{engine_java}/../%{name}"
-ln -s "%{name}" "%{buildroot}%{engine_java}"
+ln -s "%{engine_name}" "%{buildroot}%{engine_java}/../%{name}"
 %endif
 
 #
@@ -661,6 +659,10 @@
 restapi %{name}-restapi-types.pom
 tools %{name}-tools.pom
 __EOF__
+
+%if "%{name}" != "%{engine_name}"
+sed -i 's#%{_javadir}/%{name}#%{engine_java}#' .mfiles*
+%endif
 
 %if !%{ovirt_install_poms}
 rm -fr "%{buildroot}%{_mavenpomdir}"
@@ -832,7 +834,7 @@
 # than the directory structure
 #
 %if "%{name}" != "%{engine_name}"
-%{_javadir}/%{engine_name}
+%{_javadir}/%{name}
 %endif
 
 %files extensions-api-impl -f .mfiles-extensions-api


-- 
To view, visit http://gerrit.ovirt.org/27294
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ieb38102400dc861e2369ba8cdbef380593442832
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Alon Bar-Lev <alo...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to