From fa002aac4c3cb75722d973d199a73231062b890c Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 23 Sep 2021 20:51:45 +0300 Subject: Make database ordering consistent across runs --- bpkg/database.hxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'bpkg/database.hxx') diff --git a/bpkg/database.hxx b/bpkg/database.hxx index 889f8a0..c9ef590 100644 --- a/bpkg/database.hxx +++ b/bpkg/database.hxx @@ -518,10 +518,11 @@ namespace bpkg inline bool operator< (const database& x, const database& y) { - // Note that if we ever need the ordering to be consistent across runs, - // then we can compare the config paths or uuids. + // Note that we used to compare the database addresses here (as for the + // equality operator) until we needed the database ordering to be + // consistent across runs (to support --rebuild-checksum, etc). // - return &x < &y; + return x.config < y.config; } inline ostream& -- cgit v1.1