Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Linux From Scratch This Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.


  Search this Thread
Old 03-18-2013, 07:40 PM   #1
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Slackware
Posts: 89

Rep: Reputation: 24
Question Custom package manager

Perhaps this is something for the programming section, but since I'm targeting LFS I thought first it'd be better to ask here.
I am writing a custom package manager to use with LFS and I was wondering if `ldd' is something I can count for auto-resolving dependencies, like for instance running
ldd $libs | awk '{print $3}'
for every executable/shared library that a package produces and then searching for the dependencies in a list of files, that belong to packages.
Something like
$ ldd bsdcpio | awk '{print $3}'
/tools/lib64/ -> xz-5.0.4
/tools/lib64/ -> glibc-2.17
/tools/lib64/ -> glibc-2.17
/tools/lib64/ -> gcc-4.7.2
Old 03-18-2013, 08:11 PM   #2
Senior Member
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650Reputation: 650
Ldd would only determine your runtime shared object dependencies, applications are not necessarily that simple and will quite often call external programs to perform work on their behalf. Maybe you could investigate the configure script output/return code to determine what dependencies are required, but even then not all applications have a configure script either.
1 members found this post helpful.
Old 03-19-2013, 02:14 AM   #3
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Slackware
Posts: 89

Original Poster
Rep: Reputation: 24
It seems that `ldd' prints out all dependencies (even the dependencies of the dependencies) which is not what I need. I'll use `readelf -d' to fetch the runtime deps and will try to figure something for finding needed external applications. Thanks for pointing that out.


lfspkg, package manager, programing

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
[SOLVED] Synaptic package manager won't open due to faulty package nine9nine Linux - Software 7 09-15-2011 08:30 PM
Adept package installer not working if not launched by package manager iqbala Ubuntu 3 11-29-2008 07:32 AM
LXer: Simple Package management with Synaptic Package Manager LXer Syndicated Linux News 0 12-05-2006 07:33 PM
Poll: Yast Package Manager vs. Smart Package Manager in 10.1 agentchange SUSE / openSUSE 6 06-02-2006 09:29 AM
synaptic package manager forcing me to delete a broken package mbman Linux - Software 6 04-25-2006 10:30 AM

All times are GMT -5. The time now is 10:34 PM.

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