aboutsummaryrefslogtreecommitdiff
path: root/src/common.nim
diff options
context:
space:
mode:
authorkitsunyan2018-03-17 20:55:48 +0000
committerkitsunyan2018-03-17 20:55:48 +0000
commit75b2f60bf15a9d49859b262a47da30ec70614a5e (patch)
tree5de302585fb93359f2427e5a2acbdf1162edbab2 /src/common.nim
parent8d0508a73cd984fa532ff9f29cbedba5d0e0aa81 (diff)
Check conflicting targets before building
Diffstat (limited to 'src/common.nim')
-rw-r--r--src/common.nim12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/common.nim b/src/common.nim
index 0dc73f3..23ef7f3 100644
--- a/src/common.nim
+++ b/src/common.nim
@@ -25,18 +25,6 @@ type
FullPackageTarget*[T] = object of SyncPackageTarget
pkgInfo*: Option[T]
-proc toPackageReference*(dependency: ptr AlpmDependency): PackageReference =
- let op = case dependency.depmod:
- of AlpmDepMod.eq: some(ConstraintOperation.eq)
- of AlpmDepMod.ge: some(ConstraintOperation.ge)
- of AlpmDepMod.le: some(ConstraintOperation.le)
- of AlpmDepMod.gt: some(ConstraintOperation.gt)
- of AlpmDepMod.lt: some(ConstraintOperation.lt)
- else: none(ConstraintOperation)
-
- let description = if dependency.desc != nil: some($dependency.desc) else: none(string)
- ($dependency.name, description, op.map(o => (o, $dependency.version)))
-
proc checkAndRefresh*(color: bool, args: seq[Argument]): tuple[code: int, args: seq[Argument]] =
let refreshCount = args.count((some("y"), "refresh"))
if refreshCount > 0: