summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-09-18 04:42:48 +0200
committerDan McGee <dan@archlinux.org>2012-09-18 04:42:48 +0200
commitc76e5c768687394b8022883d01edf85dc3c30e7f (patch)
tree42f749fc71dab387e094dc4c3f34e1c0ed510d97 /devel
parentcf5b31952e119d7fe7ad98cd739aa7cc564fe07b (diff)
downloadarchweb-c76e5c768687394b8022883d01edf85dc3c30e7f.tar.gz
archweb-c76e5c768687394b8022883d01edf85dc3c30e7f.tar.xz
Sort package list before inserting it into the database
FS#30323. This will take some time to propagate to all existing packages, but all new and updated packages will start getting filelists in the right order. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index af0a2dc..ac74509 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -303,7 +303,10 @@ def populate_files(dbpkg, repopkg, force=False):
logger.info("adding %d files for package %s",
len(repopkg.files), dbpkg.pkgname)
pkg_files = []
- for f in repopkg.files:
+ # sort in normal alpha-order that pacman uses, rather than makepkg's
+ # default breadth-first, directory-first ordering
+ files = sorted(repopkg.files)
+ for f in files:
if '/' in f:
dirname, filename = f.rsplit('/', 1)
dirname += '/'