1
0
mirror of https://github.com/moparisthebest/pacman synced 2024-12-22 07:48:50 -05:00
pacman/test
Dave Reisner 04bc3a24eb pacsort: parse inputs up front into control struct
This moves most of the parsing work out of the sorting path. The explode
and splitfile functions now call input_new and append input_t structs
to the list of sort candidates instead of raw strings. This lets us
make smarter and easier decisions in the sorting callbacks, which are
now also split into the version and file comparison methods for clarity.

This fixes two bugs:

1) Incorrect ordering with filenames containing epoch in the pkgver
2) Incorrect ordering with package names which are substrings of
each other (e.g. "systemd" and "systemd-sysvcompat").

Performance of the --files mode degrades slightly as a result of this
change, but not unreasonably. Sorting with small inputs (5-10) doubles
in runtime, but larger inputs (4000+) only increase by 20%.

ref: https://bugs.archlinux.org/task/37631

Signed-off-by: Allan McRae <allan@archlinux.org>
2014-11-20 14:40:25 +10:00
..
pacman pmtest: make test paths easily available to tests 2014-11-04 20:11:18 +10:00
scripts add pacman-db-upgrade-v9.py to check_SCRIPTS 2014-11-04 20:11:18 +10:00
util pacsort: parse inputs up front into control struct 2014-11-20 14:40:25 +10:00
.gitignore Push down testing .gitignore entries 2014-01-06 14:38:50 +10:00