Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 26 Sep 2017, 12:21
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
How do you get rid of orphaned libraries?
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 4 [53 Posts]   Goto page: 1, 2, 3, 4 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Mon 22 Aug 2016, 14:16    Post subject:  How do you get rid of orphaned libraries?
Subject description: OTOH, maybe they're waiting for some parents?
 

Hello all.

As the title says. It's for the Puduan alpha Pup.

I tried "deborphan", but it's no good for Puppies since we don't store our packages
at the same place that the Debian people do. Same thing with "rpmorphan" for
RHLE-derived distros (CentOS, Fedora, etc.).

I remember Iguleder saying that he used one such utility for his LibrePup, but I don't
think that he ever mentioned the source or the name of the utility. OTOH, it's entirely
possible that it was his own script too, given his talent. It trimmed about 10 Mb's off
his LibrePup.

Whatever the case may be, I'll be grateful for any leads. BFN.

_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)

Last edited by musher0 on Wed 24 Aug 2016, 02:24; edited 1 time in total
Back to top
View user's profile Send private message 
ally


Joined: 19 May 2012
Posts: 1498
Location: lincoln, uk

PostPosted: Mon 22 Aug 2016, 14:31    Post subject:  

diffutils?

Smile
Back to top
View user's profile Send private message Visit poster's website 
learnhow2code

Joined: 12 Jun 2016
Posts: 1015

PostPosted: Mon 22 Aug 2016, 14:33    Post subject:  

find all the binaries (except libraries) and run ldd on all of them, then subtract THOSE listed from a list of all libraries. the list remaining is the list of libraries you (probably) dont need. to that i add-- even deborphan makes mistakes.

id try symlinking puppy libs to the place deborphan expects them-- or even copying them if necessary. that wont help if it needs /var/lib/dpkg/info though.
Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1235

PostPosted: Mon 22 Aug 2016, 15:19    Post subject:  

I found an interesting post by 01micko the other day:

01micko wrote:
If you are talking about slacko64 then these missing libs are intentional (well perhaps not all of them).

Some libs are hard dependencies and some are not. Slackware is a bit different Smile

http://www.murga-linux.com/puppy/viewtopic.php?p=866820#866820

So some libraries and binaries are just there, in case you install something later (ie. qt4, gtk3). I guess I should stop deleting random things because "checkdeps /" says they're missing something then, because they might be useful later. Hmmm. Heh.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Tue 23 Aug 2016, 11:38    Post subject:  

Sailor Enceladus wrote:
I found an interesting post by 01micko the other day:

01micko wrote:
If you are talking about slacko64 then these missing libs are intentional (well perhaps not all of them).

Some libs are hard dependencies and some are not. Slackware is a bit different Smile

http://www.murga-linux.com/puppy/viewtopic.php?p=866820#866820

So some libraries and binaries are just there, in case you install something later (ie. qt4, gtk3). I guess I should stop deleting random things because "checkdeps /" says they're missing something then, because they might be useful later. Hmmm. Heh.
Sounds like the twilight zone.
Tah dee tah dum, tah dee tah dum. (Remember the Twilight Zone song?)
https://www.youtube.com/watch?v=XVSRm80WzZk

Prepare your Pup for the return of..., or the coming of... Hm.
The Mamas and the Papas? Laughing
Cleopatra?
Lucy? (You know, the millions-years old skeleton!?) Laughing
The Borgs? Sad

But thanks for your reseach / ideas, Sailor.

@ally:
I know that diff is of no use for this particular purpose.
But I don't remember what else there is in the diffutils package.

@learnhow2code.
Yeah, I thought of doing that.
But I was hoping there would be a ready-made solution for a dev in lazy mode!

Haha! I know!
Run diff on the entire list of libs compared to the whatchamacallit learnhow2code list! Very Happy

If you were girls I'd kiss you! Laughing

BFN.

_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)
Back to top
View user's profile Send private message 
amigo

Joined: 02 Apr 2007
Posts: 2590

PostPosted: Tue 23 Aug 2016, 14:42    Post subject:  

There can be no tool for that, because the necessary (detailed) data does not exist under any puppy.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Tue 23 Aug 2016, 15:23    Post subject:  

amigo wrote:
There can be no tool for that, because the necessary (detailed) data does not exist under any puppy.
Oops. Thanks amigo.
_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 649

PostPosted: Tue 23 Aug 2016, 20:19    Post subject:  

amigo wrote:
There can be no tool for that, because the necessary (detailed) data does not exist under any puppy.


Why wouldn't learhow2code's suggestion work? Which incidently is also what I would have suggested.

Aside from that though we could also interface with some dependency database that could be external to the os.
Back to top
View user's profile Send private message 
learnhow2code

Joined: 12 Jun 2016
Posts: 1015

PostPosted: Tue 23 Aug 2016, 21:08    Post subject:  

s243a wrote:
amigo wrote:
There can be no tool for that, because the necessary (detailed) data does not exist under any puppy.


Why wouldn't learhow2code's suggestion work? Which incidently is also what I would have suggested.


i am fairly confident ldd would do it all, its just a matter of actually running ldd on everything.

if theres a reason this wouldnt suffice, im curious what it is. there are plenty of people here that know more about compiling and deps than i do.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Tue 23 Aug 2016, 21:24    Post subject:  

Hello all.

I'm still in lazy mode, looking for ready-made solutions.

What is the attached script worth in the context of Puppy?
From: http://www.linuxquestions.org/questions/slackware-14/slack-script-to-detect-orphaned-libraries-broken-lib-links-missing-dependencies-794133/
Retrieved: 10 minutes ago.

Is this any good for us?
Could it be adapted? Improved?

Thanks in advance.

~~~~~~~~~~
Found through DucDuckGo using the search phrase:
linux orphaned libraries NOT deborphan
orphans.sh.zip
Description 
zip

 Download 
Filename  orphans.sh.zip 
Filesize  5.44 KB 
Downloaded  39 Time(s) 

_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Tue 23 Aug 2016, 23:29    Post subject:  

Hi gang.

Here is an implementation of the idea.

There's something I'm not doing right and I can't find it. The result is unreal!

Please help, I'm stumped. TIA.
unreal-result.lst.zip
Description 
zip

 Download 
Filename  unreal-result.lst.zip 
Filesize  5 KB 
Downloaded  41 Time(s) 
ldawkgresort.sh.zip
Description 
zip

 Download 
Filename  ldawkgresort.sh.zip 
Filesize  761 Bytes 
Downloaded  40 Time(s) 

_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)
Back to top
View user's profile Send private message 
Sailor Enceladus

Joined: 22 Feb 2016
Posts: 1235

PostPosted: Tue 23 Aug 2016, 23:55    Post subject:  

Wow musher0, even with "basic" that orphan program took quite a while, and says I have 3521 babies with no parents. Shocked

Haha, your twilight video reminded me, I found this really trippy 10 minute song with a Kaleidoscope moving in the background on youtube, but I don't remember what it's called any more.... now I must listen to every trippy Kaleidoscope video on youtube until I find this particular song again! Laughing /random (edit: hahaha I think I found it, or maybe it was a different one in there)
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 649

PostPosted: Wed 24 Aug 2016, 00:33    Post subject:  

I suggest that we sort the orphand libraries into packages so that we know what package they are from. This could help decide if we want to remove it.

So I suggest that once we find an orphin we compare it with the list of files fore each package in the /root/.package/ directory

The only problem I see is that I don't think that built-in packages have a complete list of files in /root/.package/ but I could be wrong.

Another thing is that any file that is in /opt/ should be quite segregated into packages and sperate from most of the system. Files under /opt/ should be easy to identify which package that they belong to.

edit: Related to the above. I think I would do it one package at a time. Figure out which package is least critical for you by what it is supposed to do and then try to build a trimmed down version of it based on the orphaned libraries. Test your system and if it work then move on to trimming the next package if you desire. It might be helpful to know which packages in the package manager (packages not installed) may depend on these libraries in case you plant to install them in the future.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 10838
Location: Gatineau (Qc), Canada

PostPosted: Wed 24 Aug 2016, 02:02    Post subject:  

You seem to have a great logical mind, s243a Smile except... have a look at my "unreal"
list above!!! There are so many orphans in there! And I'm not sure they really are
orphans. There are too many, it's unreal.

Before we put your plan into action, it looks like we'll have to find some real orphans! Wink

BFN.

_________________
musher0
~~~~~~~~~~
« La vraie justice serait d'emm...r pelo autant qu'il nous emm...e. » (Moi) /
"True justice would be to annoy pelo as much as him us." (Me)
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 649

PostPosted: Wed 24 Aug 2016, 02:06    Post subject:  

musher0 wrote:
You seem to have a great logical mind, s243a Smile except... have a look at my "unreal"
list above!!! There are so many orphans in there! And I'm not sure they really are
orphans. There are too many, it's unreal.

Before we put your plan into action, it looks like we'll have to find some real orphans! Wink

BFN.


Perhaps we could try data-mining the puppy package manager since, it lists the dependencies before you install software from it.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 4 [53 Posts]   Goto page: 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0531s ][ Queries: 12 (0.0038s) ][ GZIP on ]