[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Relocatable packages: how to install patches into the right directory



I have a simple problem with a relocatable package named
RELOCATABLE_PACKAGE. I need to patch this package in one particular OS,
by substituting one particular shared library of this package. The
problem is, that the package is relocatable. So how do I guarantee, that
the patch goes into the correct directory? The ideal solution would be
to make the pre-install script query for the prefix of
RELOCATABLE_PACKAGE and install the file on the same location. But I
couldn't figure out a way to do it.
Would the following work:

%pre
RPM_INSTALL_PREFIX=$(rpm -q --queryformat '%{INSTALLPREFIX}\n'
RELOCATABLE_PACKAGE)


The solution I'm using now is this simple bash wrapper script that does
exactly the same thing:

#!/bin/bash

RPMFILE=libxyz.so-3.3.4-1.i386.rpm

cd $(dirname $0)
PREFIX=$(rpm -q --queryformat '%{INSTALLPREFIX}\n' RELOCATABLE_PACKAGE)
rpm -Uvh --prefix $PREFIX $RPMFILE


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]