LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-17-2010, 04:59 PM   #1
taby2b
LQ Newbie
 
Registered: Feb 2010
Posts: 4

Rep: Reputation: 0
Conditional RPM installation


Hey Guys,

Essentially I want to install an RPM that can performs certain actions upon a conditional flag.

Basically, what I want is only one RPM that will (1) perform some base actions + rebuild all databases by default OR (2) perform same base actions + leave databases intact if I were to specify a flag of some sort. This is best illustrated by the following pseudocode:

e.g.

Rebuild databases (default installation):
rpm -ivh myrpm.rpm

Leave databases intact (conditional installation):
rpm -ivh --define "rebuild no" myrpm.rpm

I know this is possible when building an RPM by using %define tags in the .spec file but is it possible when installing an RPM ?

Any help appreciated
 
Old 02-18-2010, 11:02 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by taby2b View Post
I know this is possible when building an RPM by using %define tags in the .spec file but is it possible when installing an RPM ?
Maybe you could use some sort of environment variable or emtpy file serving as trigger but as far as I know using some sort of custom --flag is not possible.
 
  


Reply

Tags
rpm



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
rpm -ihv hp_qla2x00src-8.01.07.25-1.linux.rpm during Qlogic driver installation Dennisliu Linux - Software 5 09-10-2008 05:08 PM
Hosed my rpm installation (i.e. "rpm -e rpm") Mad Scientist Fedora 6 03-02-2007 12:42 AM
How to use conditional #define? kranti Programming 3 09-20-2006 09:06 AM
Conditional Compilation oulevon Programming 3 02-26-2006 08:21 PM
CASE conditional la_mafia63 Linux - General 3 07-24-2005 01:02 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration