Ticket #4234 (closed defect: wontfix)

Opened 13 months ago

Last modified 13 months ago

Sort by version idiosyncrasy

Reported by: birdie Owned by:
Priority: minor Milestone:
Component: mc-core Version: 4.8.26
Keywords: Cc:
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

It looks like sort by version doesn't always work correctly. Consider this listing:

libpango-1.0.so
libpango-1.0.so.0
libpango-1.0.so.0.4800.4
libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangocairo-1.0.so.0.4800.4
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoft2-1.0.so.0.4800.4
libpangomm-1.4.so.1
libpangomm-1.4.so.1.0.30
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpangoxft-1.0.so.0.4800.4

This is exactly what you see when you sort by name.

However when you change the sorting mode to "by version" then something weird happens:

libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangocairo-1.0.so.0.4800.4
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoft2-1.0.so.0.4800.4
libpangomm-1.4.so.1
libpangomm-1.4.so.1.0.30
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpangoxft-1.0.so.0.4800.4
libpango-1.0.so
libpango-1.0.so.0
libpango-1.0.so.0.4800.4

This doesn't look right and seems rather illogical. Why has "libpango-1.0.so" become the last one on the list?

Change History

comment:1 Changed 13 months ago by andrew_b

$ ls -1
libpango-1.0.so
libpango-1.0.so.0
libpango-1.0.so.0.4800.4
libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangocairo-1.0.so.0.4800.4
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoft2-1.0.so.0.4800.4
libpangomm-1.4.so.1
libpangomm-1.4.so.1.0.30
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpangoxft-1.0.so.0.4800.4
$ ls -1 | sort --version-sort
libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangocairo-1.0.so.0.4800.4
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoft2-1.0.so.0.4800.4
libpangomm-1.4.so.1
libpangomm-1.4.so.1.0.30
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpangoxft-1.0.so.0.4800.4
libpango-1.0.so
libpango-1.0.so.0
libpango-1.0.so.0.4800.4

comment:2 Changed 13 months ago by andrew_b

Or just

$ ls -1 -v
libpangocairo-1.0.so
libpangocairo-1.0.so.0
libpangocairo-1.0.so.0.4800.4
libpangoft2-1.0.so
libpangoft2-1.0.so.0
libpangoft2-1.0.so.0.4800.4
libpangomm-1.4.so.1
libpangomm-1.4.so.1.0.30
libpangoxft-1.0.so
libpangoxft-1.0.so.0
libpangoxft-1.0.so.0.4800.4
libpango-1.0.so
libpango-1.0.so.0
libpango-1.0.so.0.4800.4

comment:3 Changed 13 months ago by birdie

So, the problem affects ls as well.

comment:5 Changed 13 months ago by andrew_b

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone Future Releases deleted

If you convince the authors of coreutils to change the current behavior, feel free to reopen this ticket.

Note: See TracTickets for help on using tickets.