[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tsort 6.9, incorrect output
From: |
Jim Meyering |
Subject: |
Re: tsort 6.9, incorrect output |
Date: |
Thu, 24 Apr 2008 20:56:02 +0200 |
Guillaume Bailey <address@hidden> wrote:
> I have an example of the latest tsort producing invalid output. The
6.9 is over two years old.
The latest coreutils release is coreutils-6.11.
> output clearly disobeys the partial ordering 'i k a h g j', because
> a' precedes both 'i' and 'k'. There may be other errors.
...
>> address@hidden toolDependencies]$ tsort << EOF
>> > b k
>> > b m
>> > k m f
>> > i b f
>> > i k a h g j
>> > b g c
>> > h c
>> > g d
>> > h d
>> > h e
>> > h j l
>> > c l
>> > EOF
Thanks for the report, but you have misunderstood
tsort's input format. From "info tsort",
`tsort' reads its input as pairs of strings, separated by blanks,
indicating a partial ordering. The output is a total ordering that
corresponds to the given partial ordering.
Note the "as pairs of strings".
The placement of newline characters is irrelevant.
So the input above is equivalent to this:
b k b m k m f i b f i k a h g j b g c h c g d h d h e h j l c l
and this:
b k
b m
k m
f i
b f
i k
a h
g j
b g
c h
c g
d h
d h
e h
j l
c l