LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 06-14-2005, 12:02 PM   #1
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Rep: Reputation: 31
checking if a package is used by other apps


Hi All,

I'm using Slack 10, but this seems to be sufficiently general to go here:

I was doing some updates with a Slackware package manager called swaret (there's also slapt-get!). I noticed a package related to CORBA is installed which I don't think I am using. anything from.

If I'm not using it then I'd like to remove the package.

I was wondering how to check that no app installed is dependent on this package at all. Kind of the reverse of ldd.

"ldd" finds packaged which the stated package depends on. I want to find what depends on the stated package.

I did think of running ldd against all installed binaries and then grepping the output for the CORBA libraries. I got as far as "ldd -v `locate /bin` | grep ORB" but this seems suboptimal

Surely there's a better way?

Any suggestions?
 
Old 06-15-2005, 09:03 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
"ldd" finds packaged which the stated package depends on.
Doesn't it find shared libs which the executable depends on?

In Debian (and thus most likely slapt-get) each package has a reverse-depends section (i.e. x reverse-depends on y iff y depends on x).

Then it becomes a trivial matter of checking if any package in reverse-depends(x) is installed.

hth --Jonas
 
Old 06-18-2005, 04:58 PM   #3
pbhj
Member
 
Registered: Dec 2002
Location: UK
Distribution: Slackware 12; Ubuntu 7.10
Posts: 358

Original Poster
Rep: Reputation: 31
Yeah, you're right of course on the ldd front (it's executables and libraries).

However, slapt-get doesn't do what I want as Slackware packages don't (by default) include dependency information.

>>>slapt-get can only attempt to resolve dependencies and
conflicts for those packages that were built with this
information. Vanilla Slackware packages (ie official
Slackware packages) do not contain this data, thus slapt-
get performs with --no-dep on by default.

Anyone else ...
 
Old 06-18-2005, 09:51 PM   #4
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 46
Quote:
don't (by default) include dependency information... Vanilla Slackware packages (ie official Slackware packages) do not contain this data
:O

... doesn't that defeat (at least half of) the purpose of a package manager?

And I wouldn't know of a smarter algorithm that solves your problem than you got yourself

Sorry

--Jonas
 
Old 06-18-2005, 10:27 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 22,962
Blog Entries: 11

Rep: Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865Reputation: 865
In terms of package management, that's how Pat has done
it/is doing it (and Slack *is* the oldest living distro). The
approach I would take if I faced the problem would be
slightly less brute-force...
Code:
for i in `egrep -e "(bin/.+|lib/.+)" <package> | sed 's@^@/@'|xargs -i ldd {} | grep -v " not "|awk '{print $1}' |sort -u `;do grep $i /var/log/packages/* ; done


Cheers,
Tink
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Uninstalling package apps Slayer097 Linux - Newbie 5 02-25-2005 06:13 PM
How to use MD5 checksum for checking package? hus Linux - Newbie 3 01-24-2005 09:38 AM
Slack 9.1 - PHP apps can't access MySQL but Perl Apps can tallship Linux - Software 1 06-13-2004 08:41 AM
checking versions of apps bigeeguy Linux - Newbie 4 04-08-2004 05:32 PM
Checking the version of a package _maco_ Linux - Newbie 4 02-04-2004 05:37 PM


All times are GMT -5. The time now is 07:27 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration