View Single Post
  #1   (View Single Post)  
Old 21st August 2012
IdOp's Avatar
IdOp IdOp is offline
Too dumb for a smartphone
 
Join Date: May 2008
Location: twisting on the daemon's fork(2)
Posts: 1,027
Default finding package dependencies?

Quote:
Originally Posted by ocicat
... complete list of packages installed ...

... list of everything ...
I'm not trying to be overly argumentative , and it's certainly possible my understanding is lacking in experience, but I think the key words there are "complete" and "everything". Let me give an example first.

Suppose I already have 80 packages installed. Now I want to install another 5 packages. Due to dependencies let's suppose another 15 packages are also installed that way. So I installed 20 packages today for a total of 100 overall. And of those 20, I may at first only know what 5 of them are (or maybe a few more, but not all 20).

Now if I use pkg_info to get a complete list of everything, I can't really tell which are the new packages can I ? If I display the install messages for everything, then 4 out of 5 messages are likely to be ones I've already seen; not very efficient.

I could, of course, get a directory of /var/db/pkg, grep it for today's date, and sort things out that way. But that is getting into what I referred to as "doing it by hand", not using pkg_info.

Now one other thing to add. During a pkg_add, there can be errors, failures, etc. It's primarily for this reason that I like to do a large pkg_add inside of script. It gives me a record of all that happened and I can see exactly what went wrong, if anything. So, given that I have the typescript file there, an added benefit is being able to search it for the install messages from only the new packages that were added today.

Does that make sense or am I still missing something? Thank you for your critiques, they are welcome.

Last edited by IdOp; 21st August 2012 at 07:07 PM. Reason: spelling
Reply With Quote