SCIENTIFIC-LINUX-USERS Archives

July 2011

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailling list for Scientific Linux users worldwide <[log in to unmask]>
Date:
Fri, 15 Jul 2011 19:51:05 +0100
Reply-To:
Phil Perry <[log in to unmask]>
Content-Transfer-Encoding:
7bit
Subject:
From:
Phil Perry <[log in to unmask]>
Content-Type:
text/plain; charset=ISO-8859-1; format=flowed
In-Reply-To:
MIME-Version:
1.0
Comments:
To: Scientific Linux Users <[log in to unmask]>
Parts/Attachments:
text/plain (33 lines)
On 15/07/11 19:28, Andrew Z wrote:
> Hello,
>   i just got curios (google is not helping me @ the moment)...
> What is the right way to handle versions of the files during
> installation and removal of the rpm?
> Example:
> ls -l ./
> <no files>
>
> rpm -uhv   lib_andrew-123.rpm:
>   lib_andrew.so ->  lib_andrew.so.123
>
> rpm -uhv   lib_andrew-456.rpm:
>    lib_andrew.so ->  lib_andrew.so.456
>
> ls -l ./
>   lib_andrew.so ->  lib_andrew.so.456
> lib_andrew.so.123
>
> now, what if i want to remove version 123 ???
>
> Andrew
>

You need to have your SPEC file create the symlinks in the buildroot so 
that they are a part of the package, i.e, the symlinks are owned by the 
rpm package. Then when you uninstall or update the package rpm will 
remove/update the symlinks for you rather than leave them dangling as 
per your example above.

Take a look in any relevant package SPEC file from the distro for 
examples of how this should be handled.

ATOM RSS1 RSS2