Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Graphical dependency mapping

  1. Back To Top    #1
    Pan-Galactic Quordlepleen SteveRiley's Avatar
    Join Date
    Jul 2011
    Location
    Seattle, WA, USA
    Posts
    9,636
    Threads
    350
    Local Date
    Jun 5th 2020
    Local Time
    11:56 PM

    Graphical dependency mapping

    (Originally I posted the information here as a reply in another thread. I've moved it to a separate thread because I think it's pretty damn neat and I'm hoping this will enhance discoverability.)

    The apt-rdepends command performs recursive dependency listings similar to apt-cache. However, whereas the "rdepends" in apt-cache means reverse depends, the "rdepends" in apt-rdepends means recursive depends. To confuse you even further, apt-rdepends can be run in both forward and, uh, reverse modes!

    The Hartwork Blog has a very cool post illustrating how to use apt-rdepends to generate graphical dependency maps.

    To generate a forward dependency graph for any package, type the following at a console prompt:

    i=package-name; apt-rdepends -d $i | dot -Tpng > $i.png

    This creates a graphical image of recursive forward dependencies. Blue lines are pre-depends, green lines are conflicts, yellow lines are suggests, orange lines are recommends, red lines are replaces, and black lines are depends. Here's the output of that using libakonadi-kabc4:



    To generate a reverse dependency graph of any package, use this variation:

    i=package-name; apt-rdepends -dr $i | dot -Tpng > $i-r.png

    The differences: an "r" after the "-d" (tells apt-rdepends to run in reverse) and a "-r" to the output filename (just my convention). Here's the result of running that with dolphin:



    They say a picture is worth a thousand words. Well, now we have a way to turn a thousand words into a picture. I hope you find this a useful tool. I certainly have.

  2. Back To Top    #2
    Kubuntu as a Second Language doctordruidphd's Avatar
    Join Date
    Jan 2009
    Location
    Pacific Northwest, USA
    Posts
    1,733
    Threads
    216
    Local Date
    Jun 6th 2020
    Local Time
    12:56 AM

    Re: Graphical dependency mapping

    That's neat.

    I just discovered the debtree command a few days ago, and couldn't wait to try it:

    debtree gimp | dot -Tsvg >gimp.svg

    I have to say, in all honesty, that this is about the most useless thing I have yet done with the system. Good for a laugh, though. See attached for proof of that point (converted to pdf as the board won't allow svg).

    Maybe your method will work better.

    Edit: i did think of a use for this. You could print it out, stick it on your front door, and scare away all the trick-or-treaters on halloween. Then you get to keep all the candy.
    Attached Files Attached Files
    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

  3. Back To Top    #3
    Pan-Galactic Quordlepleen SteveRiley's Avatar
    Join Date
    Jul 2011
    Location
    Seattle, WA, USA
    Posts
    9,636
    Threads
    350
    Local Date
    Jun 5th 2020
    Local Time
    11:56 PM

    Re: Graphical dependency mapping

    I suppose it should come as no surprise that if there's one way to do something in Linux, there's at least 42 other ways.

    Running gimp through apt-rdepends produces an output that's actually uglier than that from debtree.

    I'm curious why you think it's useless...there've been times where I've trawled through hand-written dependency trees trying to track down something or other. I wish I would have known about apt-rdepends then, because the pretty pictures would have helped.

  4. Back To Top    #4
    Ascendant GreyGeek's Avatar
    Join Date
    Feb 2009
    Posts
    16,483
    Threads
    1169
    Local Date
    Jun 6th 2020
    Local Time
    02:56 AM

    Re: Graphical dependency mapping

    Quote Originally Posted by SteveRiley
    ...
    They say a picture is worth a thousand words. Well, now we have a way to turn a thousand words into a picture. I hope you find this a useful tool. I certainly have.
    Easily a thousand words.... This is cool. I knew about apt-cache rdepends and have used it several times. Being able to consult a dependency graph makes relationships a LOT clearer than looking at a vertical list of apps.

    Thanks for the tip. The next time someone has a dependency problem while updating ....

  5. Back To Top    #5
    Kubuntu as a Second Language doctordruidphd's Avatar
    Join Date
    Jan 2009
    Location
    Pacific Northwest, USA
    Posts
    1,733
    Threads
    216
    Local Date
    Jun 6th 2020
    Local Time
    12:56 AM

    Re: Graphical dependency mapping

    I'm curious why you think it's useless
    I meant that with a dose of humor. I don't think anyone could reasonably expect to sort out dependencies for something like gimp (or LO) this way. The lines all merge, therefore it's impossible to trace things out.

    For simpler programs, doing a graphical dependency tree really is quite useful, in a way that a terminal command spewing out pages of text is not.
    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

  6. Back To Top    #6
    Veteran Member Jonas's Avatar
    Join Date
    Dec 2008
    Location
    Stockholm, Sweden
    Posts
    473
    Threads
    54
    Local Date
    Jun 6th 2020
    Local Time
    09:56 AM

    Re: Graphical dependency mapping

    I love it! I fully understand what Druid is saying, yet to me I have trouble to remember blocks of text. Visualizations are much easier for me to remember - GIMPed or not, this is the way I (my mind) work, and this could be a useful tool ... if I only could remember the command
    ASUS M4A87TD | AMD Ph II x6 | 12 GB ram | MSI GeForce GTX 560 Ti (448 Cuda cores)
    Kubuntu 12.04 KDE 4.9.x (x86_64) - Debian "Squeeze" KDE 4.(5x) (x86_64)
    Acer TimelineX 4820 TG | intel i3 | 4 GB ram| ATI Radeon HD 5600
    Kubuntu 12.10 KDE 4.10 (x86_64) - OpenSUSE 12.3 KDE 4.10 (x86_64)
    - Officially free from windoze since 11 dec 2009
    >>>>>>>>>>>> Support KFN <<<<<<<<<<<<<


  7. Back To Top    #7
    Pan-Galactic Quordlepleen SteveRiley's Avatar
    Join Date
    Jul 2011
    Location
    Seattle, WA, USA
    Posts
    9,636
    Threads
    350
    Local Date
    Jun 5th 2020
    Local Time
    11:56 PM

    Re: Graphical dependency mapping

    Quote Originally Posted by Jonas
    if I only could remember the command
    You could always write short shell scripts for them. Call the forward grapher whatitneeds and call the reverse grapher whatneedsit.

  8. Back To Top    #8
    Pan-Galactic Quordlepleen SteveRiley's Avatar
    Join Date
    Jul 2011
    Location
    Seattle, WA, USA
    Posts
    9,636
    Threads
    350
    Local Date
    Jun 5th 2020
    Local Time
    11:56 PM

    Re: Graphical dependency mapping

    Quote Originally Posted by doctordruidphd
    I meant that with a dose of humor. I don't think anyone could reasonably expect to sort out dependencies for something like gimp (or LO) this way. The lines all merge, therefore it's impossible to trace things out.
    True, that.

    Perhaps we should run a little contest: let's see who can discover the prettiest dependency graph. Jerry, would you mind being our judge?

  9. Back To Top    #9
    Ascendant GreyGeek's Avatar
    Join Date
    Feb 2009
    Posts
    16,483
    Threads
    1169
    Local Date
    Jun 6th 2020
    Local Time
    02:56 AM

    Re: Graphical dependency mapping

    With pleasure!
    (Extra points for creating a PDF!)

  10. Back To Top    #10
    Newbie
    Join Date
    Mar 2012
    Posts
    1
    Threads
    0
    Local Date
    Jun 6th 2020
    Local Time
    04:26 AM
    nice
    my brain would blow up if i tried to keep my thought as neat as you do ))))

Page 1 of 2 12 LastLast

Similar Threads

  1. Using Qt for location and mapping apps
    By GreyGeek in forum Coding/Scripting
    Replies: 0
    Last Post: Aug 11th 2011, 03:31 PM
  2. I need to change the keyboard mapping
    By kattandpeist in forum Post-installation
    Replies: 1
    Last Post: May 29th 2010, 04:21 PM
  3. Keyboard Mapping
    By akafish77 in forum Help the New Guy
    Replies: 1
    Last Post: Jan 26th 2009, 10:16 PM
  4. Keyboard mapping?
    By torp in forum Hardware Support
    Replies: 1
    Last Post: Aug 27th 2008, 04:45 PM
  5. Mapping Network Drive Through a VPN
    By prodonjs in forum Network Support
    Replies: 1
    Last Post: Jan 13th 2007, 08:02 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •