Advertisement
Guest User

systemd-rdeps.sh

a guest
Oct 23rd, 2014
345
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.07 KB | None | 0 0
  1. #!/bin/sh
  2. set -e
  3. #apt-get install debtree
  4. cd /tmp
  5. cp /usr/bin/debtree .
  6. patch -d/ -p0 <<'EOF'
  7. --- /usr/bin/debtree    2012-06-21 18:30:16.000000000 -0400
  8. +++ /tmp/debtree    2014-10-23 21:32:45.566637008 -0400
  9. @@ -334,6 +334,18 @@
  10.  
  11.     for my $rdep (@{ $$pinfo{RevDependsList} }) {
  12.         my $pname = $$rdep{ParentPkg}{Name};
  13. +       my $last_or = '';
  14. +       my $this_or = '';
  15. +       my $is_alt = 0;
  16. +       for my $fdep (@{ $$rdep{ParentVer}{DependsList} }) {
  17. +           my $fpname = $$fdep{TargetPkg}{Name};
  18. +           $last_or = $this_or;
  19. +           $this_or = (($$fdep{CompType} & AptPkg::Dep::Or) ? '|' : ',');
  20. +           next if $fpname ne $$pinfo{Name};
  21. +           next if $last_or ne '|' and $this_or ne '|';
  22. +           $is_alt = 1;
  23. +       }
  24. +       next if $is_alt == 1;
  25.         my $dtype = get_type(0 + $$rdep{DepType});
  26.  
  27.         next unless grep(/^$dtype$/, @rdtypes);
  28. EOF
  29. /tmp/debtree --show-rdeps --rdeps-depth=10 --max-rdeps=100 --max-depth=0 --no-recommends --no-provides --no-versions --condense systemd >systemd-rdeps.dot
  30. sed -i '/\(gnome\|-dbg\|plugin\|plug-in\)/d' systemd-rdeps.dot
  31. dot -T png -o systemd-rdeps.png systemd-rdeps.dot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement