1 |
|
### RPM cms xcmsi-compatibility 1.0 |
2 |
+ |
Requires: gcc-wrapper |
3 |
|
# This spec is used to link the old scramdb to the new one. |
4 |
|
Source: none |
5 |
|
Requires: SCRAM SCRAMV1 cms-env |
6 |
|
|
7 |
|
%prep |
8 |
|
%build |
9 |
+ |
## IMPORT gcc-wrapper |
10 |
|
%install |
11 |
+ |
|
12 |
|
%post |
13 |
< |
[ -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] || { echo "XCMSI installation not found. Quitting without doing anything." ; exit 0} |
14 |
< |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
15 |
< |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
13 |
> |
echo "Linking old XCMSI scram database to the new one..." |
14 |
> |
if [ ! -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] |
15 |
> |
then |
16 |
> |
echo "XCMSI installation not found. Quitting without doing anything." |
17 |
> |
else |
18 |
> |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
19 |
> |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
20 |
> |
scramv0 db link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
21 |
> |
fi |
22 |
> |
|
23 |
|
%preun |
24 |
< |
[ -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] || { echo "XCMSI installation not found. Quitting without doing anything." ; exit 0} |
25 |
< |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
26 |
< |
scramv1 db -link $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
24 |
> |
echo "Unlinking old XCMSI scram database from the new one..." |
25 |
> |
if [ ! -f $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup ] |
26 |
> |
then |
27 |
> |
echo "XCMSI installation not found. Quitting without doing anything." |
28 |
> |
exit 0 |
29 |
> |
else |
30 |
> |
source $RPM_INSTALL_PREFIX/cmsset_default.sh |
31 |
> |
scramv1 db -unlink $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
32 |
> |
scramv0 db unlink $RPM_INSTALL_PREFIX/Releases/SCRAM/scramdb/project.lookup |
33 |
> |
fi |