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/package.cxx | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bpkg/package.cxx') diff --git a/bpkg/package.cxx b/bpkg/package.cxx index 894051a..9a8068c 100644 --- a/bpkg/package.cxx +++ b/bpkg/package.cxx @@ -60,6 +60,13 @@ namespace bpkg return !s.empty () ? name.string () + ' ' + s : name.string (); } + bool config_package:: + operator< (const config_package& v) const + { + int r (name.compare (v.name)); + return r != 0 ? (r < 0) : (db < v.db); + } + // available_package // const version* available_package:: -- cgit v1.1