]> git.ipfire.org Git - people/stevee/pakfire.git/commitdiff
db: Don't return filelists in a funny order
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Feb 2023 17:21:59 +0000 (17:21 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 21 Feb 2023 17:21:59 +0000 (17:21 +0000)
Since filelists are now ordered, there is no point in trying to be smart
here. In fact it is more efficient to return it pre-sorted.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/libpakfire/db.c

index 8857647a1ccd7bb257988214519d8bd29fdb8754..0ca3f75239f850a9a4fed5031f443d2e043e77ad 100644 (file)
@@ -2364,9 +2364,8 @@ int pakfire_db_package_filelist(struct pakfire_db* db, struct pakfire_filelist**
                                        "files.pkg != duplicates.pkg"
                        ") "
 
-               // Return the longest paths first
-               "ORDER BY "
-                       "length(path) DESC"
+               // Return ordered by path
+               "ORDER BY path"
                ";";
 
        // Prepare the statement