summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2010-12-22 04:34:40 +0100
committerDan McGee <dan@archlinux.org>2011-02-22 23:00:51 +0100
commit4b12255d1cf52fcc1a98c230d940d0c1d3809ad2 (patch)
treeb2a0f99a378f0b700538546cc69b431a0861cdc2 /devel
parenteeff0749d86ec403e55dc626034991638edad619 (diff)
downloadarchweb-4b12255d1cf52fcc1a98c230d940d0c1d3809ad2.tar.gz
archweb-4b12255d1cf52fcc1a98c230d940d0c1d3809ad2.tar.xz
Use new split package file fields everywhere
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index f3ec50e..72595c6 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -237,8 +237,14 @@ def populate_files(dbpkg, repopkg, force=False):
dbpkg.packagefile_set.all().delete()
logger.info("adding %d files for package %s",
len(repopkg.files), dbpkg.pkgname)
- for x in repopkg.files:
- dbpkg.packagefile_set.create(path=x)
+ for f in repopkg.files:
+ dirname, filename = f.rsplit('/', 1)
+ if filename == '':
+ filename = None
+ dbpkg.packagefile_set.create(
+ is_directory=(filename is None),
+ directory=dirname + '/',
+ filename=filename)
dbpkg.files_last_update = datetime.now()
dbpkg.save()