summaryrefslogtreecommitdiffstats
path: root/devel
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-08-01 03:27:43 +0200
committerDan McGee <dan@archlinux.org>2012-08-04 22:11:27 +0200
commita64bbbd4139d91cbbca10d804067cbd87a95872d (patch)
tree51f46c613f4eec820c9dacd432e7329e9721f3f9 /devel
parent566a9803dd4928fa2145ef14da2d59d2631eeb05 (diff)
downloadarchweb-a64bbbd4139d91cbbca10d804067cbd87a95872d.tar.gz
archweb-a64bbbd4139d91cbbca10d804067cbd87a95872d.tar.xz
Make adjustments for optional -> deptype conversion
Very little dealt directly with this field. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'devel')
-rw-r--r--devel/management/commands/reporead.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py
index aaa9812..a3bf3e0 100644
--- a/devel/management/commands/reporead.py
+++ b/devel/management/commands/reporead.py
@@ -145,8 +145,8 @@ class RepoPackage(object):
DEPEND_RE = re.compile(r"^(.+?)((>=|<=|=|>|<)(.+))?$")
-def create_depend(package, dep_str, optional=False):
- depend = Depend(pkg=package, optional=optional)
+def create_depend(package, dep_str, deptype='D'):
+ depend = Depend(pkg=package, deptype=deptype)
# lop off any description first
parts = dep_str.split(':', 1)
if len(parts) > 1:
@@ -257,7 +257,7 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None):
dbpkg.depends.all().delete()
deps = [create_depend(dbpkg, y) for y in repopkg.depends]
- deps += [create_depend(dbpkg, y, True) for y in repopkg.optdepends]
+ deps += [create_depend(dbpkg, y, 'O') for y in repopkg.optdepends]
batched_bulk_create(Depend, deps)
dbpkg.conflicts.all().delete()