LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-25-2007, 04:32 AM   #1
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Rep: Reputation: 24
Question how to resolve dependancy programatically


helo frnds,

Currently i m facing very critical problem.

I am using RHEL5 and programming language is C.

My problem is how to resolve the package depandancy list.

For example I have a xxx-1.2.2 package currently installed on my system,
and I want to install xxx-1.2.6 package.

Then I must have to install xxx-1.2.3, xxx-1.2.4, xxx-1.2.5 and then after I can install the desired xxx-1.2.6 package.

Dependancy tree like :
===================
xxx-1.2.2 --> xxx-1.2.3--> xxx-1.2.4--> xxx-1.2.5 --> xxx-1.2.6


yum does this exact things. yum first resolves the dependancy list and then after it downlodas all the required package list need to install the dsired packge.

So how can I achive this programatically ?

Yum resolves the dependancy tree but from where ? and how ?

or is there any other way to resolve the package dependancy problem ?

any kind of help is appriciated.

Last edited by vdx; 09-25-2007 at 04:50 AM.
 
Old 09-25-2007, 09:36 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
"Yum resolves the dependancy tree but from where ? and how ?"

Each rpm package contains a list of other packages that this rpm depends on. The rpm command does the same thing. So you could find out how to do the things that you want to do by reading the rpm source code.

Rather than reinventing the rpm command you could try issuing the rpm command from within your C program.

-------------
Steve Stites
 
Old 09-26-2007, 12:50 AM   #3
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Original Poster
Rep: Reputation: 24
Question

thnx jailbait

let me describe in some detail...(Its like version dependency)

(what i mean to say is version dependency not package dependency)
for example,
A "xxx-1.2.4" package is installed on my system. and further I wannna just upgrade this package by installing higher version "xxx-1.2.6".

For tht I have 2 questions.

(1) Is it require all the in between packages versions ? (over here is it necessary to install "xxx-1.2.5").

(2)
If it is then how can I know the inbetween versions ? and where can I get ?


thnx for ur replay...once again...

Last edited by vdx; 09-26-2007 at 12:51 AM.
 
Old 09-26-2007, 09:30 AM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Virginia, USA
Distribution: Debian 12
Posts: 8,337

Rep: Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548Reputation: 548
Quote:
Originally Posted by vdx View Post
thnx jailbait

let me describe in some detail...(Its like version dependency)

(what i mean to say is version dependency not package dependency)
for example,
A "xxx-1.2.4" package is installed on my system. and further I wannna just upgrade this package by installing higher version "xxx-1.2.6".

For tht I have 2 questions.

(1) Is it require all the in between packages versions ? (over here is it necessary to install "xxx-1.2.5").

(2)
If it is then how can I know the inbetween versions ? and where can I get ?


thnx for ur replay...once again...


(1) No


---------------
Steve Stites
 
Old 09-27-2007, 12:42 AM   #5
vdx
Member
 
Registered: Aug 2007
Location: The Greate INDIA
Distribution: CentOS, RHEL, Fedora
Posts: 102

Original Poster
Rep: Reputation: 24
Smile thnk you jailbait

thnx jailbait

ur answer is really very-very much helpfull to me.

thnk u very much 1s again.

thnx a lot.
 
  


Reply



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
Find patterns programatically ... Four Programming 1 02-16-2007 09:41 PM
How to detect usb programatically? rahul_kulkarni Linux - Newbie 1 11-07-2006 06:09 AM
DNS can't resolve gmail.com but can resolve everything else? TongueTied Linux - Networking 2 01-24-2006 03:39 AM
Background a process (programatically) podollb Linux - Software 1 11-03-2005 06:28 AM
Programatically downloading file. ugenn Linux - General 1 05-13-2002 09:57 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:08 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