LinuxQuestions.org
Visit Jeremy's Blog.
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 09-15-2009, 11:23 AM   #1
raghuhb
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Rep: Reputation: 0
Creating Dependent RPMs


Hi,

I am facing an issue while installing the dependent RPM.

Please see if anyone has any thoughts on this.

I have one RPM Storage-xxx.rpm (Main RPM) and this RPM functionalities are depending on the some files packaged in the RPM Utilities-yyy.rpm (dependent RPM).

Now my requirement is to install the dependent RPM when i install the Main RPM.
Assume both the RPM's are packaged in a zip file.
when the zip file is extracted both the RPM's will be present in the same directory. (user can extract the zip to any directory).

Now when i execyte rpm -ivh Storage-xxx.rpm (installing main RPM).
the dependent RPM Utilities-yyy.rpm (will be there in the same directory) should be installed first and then main RPM installation.

I know this can be done in pre-install (%pre) section in SPEC file.
But i am not getting the PWD (current working directory) location in
%pre section.

Please help me if anyone has idea on this....

Thanks,
Raghu H B
 
Old 09-15-2009, 08:38 PM   #2
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 34 x86_64
Posts: 518

Rep: Reputation: 59
Hullo raghuhb,

Quote:
Originally Posted by raghuhb View Post
Hi,

[snip]

I have one RPM Storage-xxx.rpm (Main RPM) and this RPM functionalities are depending on the some files packaged in the RPM Utilities-yyy.rpm (dependent RPM).

Now my requirement is to install the dependent RPM when i install the Main RPM.
Assume both the RPM's are packaged in a zip file.
when the zip file is extracted both the RPM's will be present in the same directory. (user can extract the zip to any directory).

Now when i execyte rpm -ivh Storage-xxx.rpm (installing main RPM).
the dependent RPM Utilities-yyy.rpm (will be there in the same directory) should be installed first and then main RPM installation.

[snip]

Thanks,
Raghu H B
There may be better ways of doing this, but this is how I would do it on Fedora 11.
Cd to the dir where you have your rpms,
Code:
sudo yum localinstall --nogpgcheck Utilities-yyy.rpm Storage-xxx.rpm
This will force both packages to be installed and yum will sort out the dependency stuff and install them in the correct order.

Hope this helps.

Cheers,
Terry
 
Old 09-16-2009, 03:59 AM   #3
raghuhb
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Hi Terry,

Thanks for your response.

I am trying to avoid using yum while installing RPM's.

Is there a way i can trigger the dependent RPM installation while installing the Main RPM?

I am trying this in preinstall script but the only problem i am facing is,
I am unable to get the "PWD" (Current working directory) location in the preinstall script, it is always get reset to "/" while installing RPM.

If anyone has idea on how to get the "PWD" (Current working directory) location from where the main RPM is located it would be great help.

My idea is to keep the main RPM and dependent RPM in the same directory.
start installing the main RPM, then in the preinstall script install the dependent RPM located in the same directory.

Here the catch is i am not getting the value of current directory location.

I hope you understood the problem, please revert back to me if this is not clear, i can give the detailed description..

Thanks in advance..
Raghu H B
 
Old 09-16-2009, 08:46 PM   #4
terry-duell
Member
 
Registered: Jan 2007
Location: Melbourne, Australia
Distribution: Fedora 34 x86_64
Posts: 518

Rep: Reputation: 59
Quote:
Originally Posted by raghuhb View Post
Hi Terry,

Thanks for your response.

I am trying to avoid using yum while installing RPM's.

[snip]

My idea is to keep the main RPM and dependent RPM in the same directory.
start installing the main RPM, then in the preinstall script install the dependent RPM located in the same directory.

Here the catch is i am not getting the value of current directory location.

I hope you understood the problem, please revert back to me if this is not clear, i can give the detailed description..

Thanks in advance..
Raghu H B
I don't know of a solution that exactly matches your requirement.
The only other approach that occurs to me is to set up a local repository (i.e. a dir on your hard disc) and put the dependent rpm in there. See 'createrepo'...but that would also mean using yum, so back where we started!
I guess you must be seeking a solution other than simply installing the rpm, to want to avoid using yum.
Hopefully someone else will know an approach you can use.

Cheers,
Terry
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Installing RPM by specifying dependent RPMs path anjanesh Linux - Newbie 3 08-24-2006 12:05 AM
Creating binary RPMS statically! Sunilsbjoshi Linux - Software 2 10-12-2005 12:10 AM
two dependent rpms pasalacqua128 Linux - Software 1 06-14-2004 02:54 PM
Creating RPMs Kemp100 Red Hat 1 09-22-2003 05:17 PM
Creating RPMS from scratch for Redhat 8 Paul Parr Linux - Newbie 2 04-10-2003 10:01 PM

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

All times are GMT -5. The time now is 04:27 AM.

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