summaryrefslogtreecommitdiff
path: root/devel/management
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2012-07-31 20:27:43 -0500
committerDan McGee <dan@archlinux.org>2012-08-04 15:11:27 -0500
commita64bbbd4139d91cbbca10d804067cbd87a95872d (patch)
tree51f46c613f4eec820c9dacd432e7329e9721f3f9 /devel/management
parent566a9803dd4928fa2145ef14da2d59d2631eeb05 (diff)
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/management')
-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 aaa9812e..a3bf3e0c 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()