fix repupgrade during RPM upgrade

This commit is contained in:
jvdias 2006-04-17 21:29:22 +00:00
parent a12d08b3e1
commit 99ac9d7402
2 changed files with 22 additions and 3 deletions

View File

@ -0,0 +1,15 @@
--- pegasus/src/Clients/repupgrade/RepositoryUpgrade.cpp.fix_repupgrade 2006-01-31 14:34:30.000000000 -0500
+++ pegasus/src/Clients/repupgrade/RepositoryUpgrade.cpp 2006-04-17 16:09:24.000000000 -0400
@@ -295,9 +295,9 @@
const String NEW_REPOSITORY_PATH = "/wbem_var/opt/wbem/repository";
const String RepositoryUpgrade::_LOG_PATH = "/wbem_var/opt/wbem/upgrade";
#elif defined(PEGASUS_USE_RELEASE_DIRS) && defined(PEGASUS_OS_LINUX)
- const String OLD_REPOSITORY_PATH = "/var/opt/tog-pegasus/prev_repository";
- const String NEW_REPOSITORY_PATH = "/var/opt/tog-pegasus/repository";
- const String RepositoryUpgrade::_LOG_PATH = "/var/opt/tog-pegasus/log/upgrade";
+ const String OLD_REPOSITORY_PATH = "/var/lib/Pegasus/prev_repository";
+ const String NEW_REPOSITORY_PATH = "/var/lib/Pegasus/repository";
+ const String RepositoryUpgrade::_LOG_PATH = "/var/lib/Pegasus/log/install.log";
#define REPUPGRADE_USE_RELEASE_DIRS true
#else
const String RepositoryUpgrade::_LOG_PATH

View File

@ -31,7 +31,7 @@
%define pegasus_uid 66
Version: 2.5.1
Release: 2%{?LINUX_VERSION:.%{LINUX_VERSION}}
Release: 3%{?LINUX_VERSION:.%{LINUX_VERSION}}
Epoch: 2
#
Summary: OpenPegasus WBEM Services for Linux
@ -65,6 +65,7 @@ Patch13: pegasus-2.5.1-obz4934.patch
Patch14: pegasus-2.5.1-obz4945.patch
Patch15: pegasus-2.5.1-PATH_MAX.patch
Patch16: pegasus-2.5.1-HOSTNAME_MAX.patch
Patch17: pegasus-2.5.1-fix_repupgrade.patch
#
Conflicts: openwbem
Provides: tog-pegasus-cimserver
@ -136,6 +137,7 @@ The OpenPegasus WBEM tests for the OpenPegasus %{version} Linux rpm.
%patch14 -p1 -b .obz4945
%patch15 -p1 -b .PATH_MAX
%patch16 -p1 -b .HOSTNAME_MAX
%patch17 -p1 -b .fix_repupgrade
%build
rm -rf ${RPM_BUILD_ROOT} || :;
@ -246,8 +248,7 @@ elif [ $1 -gt 1 ]; then
if [ -d /var/lib/Pegasus/prev_repository ]; then
# The user's old repository was moved to /var/lib/Pegasus/prev_repository, which
# now must be upgraded to the new repository in /var/lib/Pegasus/repository:
/usr/sbin/repupgrade /var/lib/Pegasus/prev_repository /var/lib/Pegasus/repository \
2>> /var/lib/Pegasus/log/install.log || :;
/usr/sbin/repupgrade 2>> /var/lib/Pegasus/log/install.log || :;
mv /var/lib/Pegasus/prev_repository /var/lib/Pegasus/prev_repository_`date '+%Y-%m-%d-%s.%N'`.rpmsave;
fi;
/sbin/service tog-pegasus condrestart >/dev/null 2>&1 || :;
@ -271,6 +272,9 @@ fi
:;
%changelog
* Mon Apr 17 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5.1-3
- Fix repupgrade (make it use correct paths)
* Fri Apr 14 2006 Jason Vas Dias <jvdias@redhat.com> - 2:2.5.1-2
- Apply patches for the two '2.5.2_APPROVED' upstream bugzillas
4934(4943) and 4945 :