LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 03-18-2013, 06:40 PM   #1
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Rep: Reputation: 25
Question Custom package manager


Greetings!
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
Code:
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
Code:
$ ldd bsdcpio | awk '{print $3}'
/tools/lib64/liblzma.so.5 -> xz-5.0.4
/tools/lib64/libpthread.so.0 -> glibc-2.17
/tools/lib64/libc.so.6 -> glibc-2.17
/tools/lib64/libgcc_s.so.1 -> gcc-4.7.2
Thanks.
 
Old 03-18-2013, 07:11 PM   #2
kbp
Senior Member
 
Registered: Aug 2009
Posts: 3,790

Rep: Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653Reputation: 653
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, 01:14 AM   #3
Refractor
Member
 
Registered: Oct 2008
Location: Rousse, Bulgaria
Distribution: Debian
Posts: 91

Original Poster
Rep: Reputation: 25
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.
 
  


Reply

Tags
lfspkg, package manager, programing



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch

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