Re: skip installation by meeting a condition in pre section of Spec file in RPM packaging

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

 



On Thursday 17 February 2011 17:26:37 Fawad Ali wrote:
>  I am new to rpm and to rpm packaging. I was asked to copy a
> war file from one location to another. through rpm. I packaged that.
> So what it does is like below.
> 1) Copy file to AUTODEPLOY folder in tomcat server
> 2) From the AUTODEPLOY folder the tomcat server picks up the war file
> and explodes it in WEBAPPS folder and removes the content from
> AUTODEPLOY.

I'm not sure rpm is the right tool for the job in this situation IMHO.

> 
> Now if I want to REINSTALL, it should first check that whether WEBAPPS
> contains the exploded war file or not. If yes, then it should display
> that package is already installed and skip the installation, if the
> web apps does not contain the exploded war file then it should force
> the installation process.
> 

You can do the testing in the %pre section and exit with an error value if the file is already there although this is a dirty 
workaround.

If I'm not wrong, there are macros like %if, check in /usr/lib/rpm/macros

-- 
Regards,

Marc Deop
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list


[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