diff options
Diffstat (limited to 'src/common.nim')
-rw-r--r-- | src/common.nim | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common.nim b/src/common.nim index 3f9013c..618ea42 100644 --- a/src/common.nim +++ b/src/common.nim @@ -233,10 +233,10 @@ proc queryUnrequired*(handle: ptr AlpmHandle, withOptional: bool, withoutOptiona installed.add(pkg.toPackageReference) if pkg.reason == AlpmReason.explicit: explicit &= $pkg.name - dependsTable.add($pkg.name, - depends.map(x => (x, false)) + optional.map(x => (x, true))) + dependsTable[$pkg.name] = + depends.map(x => (x, false)) + optional.map(x => (x, true)) if provides.len > 0: - alternatives.add($pkg.name, provides) + alternatives[$pkg.name] = provides (installed, explicit.toHashSet + assumeExplicit, dependsTable, alternatives) @@ -484,7 +484,7 @@ proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string, if forkWait(() => (block: if not dropPrivileges or dropPrivileges(): - if existsDir(repoPath): + if dirExists(repoPath): let branch = branchOption.get("master") execResult(gitCmd, "-C", repoPath, "fetch", "-q", "--no-tags", "origin", branch & ":" & branch) @@ -665,7 +665,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string, if message.isSome: (1, message) - elif repoPath.existsDir(): + elif repoPath.dirExists(): (0, none(string)) else: let fullName = bareFullName(BareKind.pkg, base) @@ -674,7 +674,7 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string, let cloneBareCode = forkWait(() => (block: if not dropPrivileges or dropPrivileges(): - if existsDir(bareRepoPath): + if dirExists(bareRepoPath): execResult(gitCmd, "-C", bareRepoPath, "fetch", "-q", "--no-tags", "origin", "master:master") else: |