LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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: Slackware
Posts: 89

Rep: Reputation: 22
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,758

Rep: Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643Reputation: 643
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: Slackware
Posts: 89

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


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 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/Novell 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


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

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