Re: include external file in %pre section

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

 



On Fri, 2005-07-29 at 12:48 +0000, Dick wrote:
> Hello folks,
> 
> We have a RPM which contains a database application which needs to update the
> database structure. We do this from the %pre because the database should be
> updated *before* the new application is installed.
> 
> The new structure is stored in an external textfile which is used by the %pre
> script. At this moment we have a
> cat > newstructure.txt << @EOF
> ...
> @EOF
> construction in which we copy the content of newstructure.txt each time we have
> an update. But we'd really like to directly include an external file, something
> like:
> %pre
> ...
> cat > newstructure.txt << @EOF
> %include db/newstructure.txt
> @EOF
> ...
> 
> Is something like this possible with RPM? We can't use files from %files because
> we are at %pre and we can't use %post because then the new application code is
> already installed.

Something like this should work.

Source1: included.txt
...

%pre
cat > /tmp/included << @EOF
%include %SOURCE1
@EOF

Paul


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux