Content-type: text/html
Man page of DEP-TRACE
DEP-TRACE
Section: User Commands (1)
Updated: 20 Feb 2012
Index
Return to Main Contents
NAME
dep-trace - dependancy tracing and sorting tool
SYNOPSIS
dep-trace [-l num] -f file -a action -a action ...
DESCRIPTION
dep-trace sorts an input dependancy list or table and prints it, and can do other actions. It's default operation is to act like tsort except that it sorts by dependancy (tsort sorts by grapical topology: see notes about differences).
Text table file has format: left right right ...
L are labels (for Unsigned: natural numbers)
R are other lefts that the L depends on
(any R must be an L in the table somewhere)
File's column 1 must be pre-sorted unless L's are natural and increasing, see below (prevents waste of incl. sort).
- -f
-
File input general format: Left Right Right ...
- -a
-
Actions (use -a for each). These add or remove actions on input and printing. For example reverse dependancies can be printed without Sifting.
- -h
-
help
- -l linenum
-
lines after num treated as virual dependancy lines (Unfold sees them as reference only) (every R still must have an L, SkipMissing aside). Example: cat deps + virts | sort | dep-trace -l `wc -l virts`
- -L
-
Virtual table File. -l count is automatic but other rules apply. see -l. see NOTES.
- -e linestoread
-
Binary read option requires this as it does no other check.
DEFAULTS
- -a ReadStrings -a Unfold -a RDeps -a Sift -a PrintSift -a PrintSiftLoops (are inverted like tsort, but not AddUnknownR, see notes)
-
ACTIONS
- -a ReadStrings
-
How file is imported. The Easiest, the default, least balky. Imports strings labels as dependancy lines (can be names or numbers). Duplicate L lines are allowed (like tsort). HOWEVER PRE-SORT with 'sort -k1,1 File'. Expect an exit if un-sorted. Options AddUnknownR, SkipMissing widen it.
- -a ReadUnsigned
-
Reads lines of plain text numbers. Virtual can be appended at end. However note that all L's in column 1 must be natural, consecutive, increasing. (this older simple read left in code just incase)
- -a Unfold, PrintUnfold
-
This flattens table by tracing all dependancies of dependancies, so each left has a complete R list. Sorting, Sifting, detecting Loops, are improper without.
- -a RDeps, PrintRDeps (def. items which pend upon left)
-
Re-orders table to show reverse dependancies and Prints full table (L's and R's). Unfold and Sift is done first if asked, and also before Print.
- -a Sift
-
Dependancy Sort current table. Sorts by number of relations and also required order of relations.
- -a PrintSiftLoop
-
Print loops detected while Sifting on stderr. Does NOT show all loops since not all need sifting, see PrintLoops for more.
- -a Loops, PrintLoops, PrintLoopsList (use with Sift)
-
Loops detects loops in dependancies. PrintLoops shows details of each Loop found and ranges. Prints to stdout and stderr separately. PrintLoopsList shows only a flat list of L's that were in any loop.
- -a PrintResult
-
Prints the whole resulting table at exit rather than just the order of L's.
- -a AddUnknownR
-
This adds any R with no definition as an L with no R's. This is for tsort compatibility I don't suggest it for non-graphics / dependancies. An error would be better. Why is if R is undefined the output should not give it a false definition and the program should stop so you are aware of an empty definition. Notes this does NOT add unknown Rs in virtual tables.
- -a SkipMissing
-
If this is set an R with no L (thus no rule or definition) is simply ignored when seen. Maybe one generated input relying that SkipMissing will cruft it (see -l). This Acts after AddUnknownR, thus will includes Skipping unknown virtuals too.
- -a SkipClean
-
but don't (turns off certain input cleaning, if input is not perfect program will fault)
- -a PrintNumName
-
More for coders. After reading file, print a table relating labels to interal representation being used. May help read some output.
- -a no action
-
would just read table in and quit (note you'd have to unset the defaults to simulate giving no actions)
- -a ReadBinary
-
no instructions
--long-options
help, file, lines, lines_read, action
NOTES
Virtuals supply look-ups only / are not promoted as an L or R. The -L file needs to sort with -f file (ie, cat f1 f2 | sort [-n]) (all virtuals must end up sort below all dependancies). README describes prepending L's in col 1. A SIMPLE way is AddUnknownR, SkipMissing and -L are together, files can be sorted separately, and dep-trace should use this successfully: but is a "new" feature.
see: tsort-dep-trace-example for a short talk and output example about topology sorting versus dependancy sorting, where they are same and where they differ.
tsort(1) accepts one L, one R per line (must repeat L and vary R). tsort may get strange and pauses when loops are encountered, output varies. tsort Unfolds. tsort does -a AddUnknownR (non-default, for pkg deps is all wrong). In the end tsort and dep-trace are not meant to "be the same" output but design is they should remain similar when usege is the same. dep-trace is forward, does not use tac.
shmake(1) dep-sort.sh' makes total dep table(s) from /var/lib/dpkg/available, show-all(1) shows resulting order.
LIMITS
Deferrs to sort(1), use busy-box to avoid depends on /usr/lib.
dep-trace is made to quickly solve huge table dep problems in a pre-install environment (before higher level software is available to get pkg deps resolved). dep-trace itself should not have dependancies (libc6 / static issues aside).
LICENSE
pre-release; not yet licensed
AUTHOR
John D. Hendrickson
SEE ALSO
sort(1), tac(1), tsort(1), dotty(1), dpkg(1), tsort-dep-trace-example
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- DEFAULTS
-
- ACTIONS
-
- NOTES
-
- LIMITS
-
- LICENSE
-
- AUTHOR
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 15:56:45 GMT, February 29, 2012