From a329e692c9ac316ebacc183dd90d985a66a62cc5 Mon Sep 17 00:00:00 2001 From: kitsunyan Date: Wed, 9 May 2018 11:56:25 +0300 Subject: Filter upgrade options for removing build dependencies --- src/feature/syncinstall.nim | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/feature/syncinstall.nim b/src/feature/syncinstall.nim index 59a6081..c046df4 100644 --- a/src/feature/syncinstall.nim +++ b/src/feature/syncinstall.nim @@ -711,9 +711,11 @@ proc confirmViewAndImportKeys(config: Config, basePackages: seq[seq[seq[PackageI proc removeBuildDependencies(config: Config, commonArgs: seq[Argument], unrequired: HashSet[string], unrequiredOptional: HashSet[string]): int = if unrequired.len > 0 or unrequiredOptional.len > 0: (block: + let removeArgs = commonArgs.keepOnlyOptions(commonOptions, transactionOptions) + let code = if unrequired.len > 0: (block: printColon(config.color, tr"Removing build dependencies...") - pacmanRun(true, config.color, commonArgs & + pacmanRun(true, config.color, removeArgs & ("R", none(string), ArgumentType.short) & toSeq(unrequired.items).map(t => (t, none(string), ArgumentType.target)))) @@ -722,7 +724,7 @@ proc removeBuildDependencies(config: Config, commonArgs: seq[Argument], if code == 0 and unrequiredOptional.len > 0: printColon(config.color, tr"Removing optional build dependencies...") - pacmanRun(true, config.color, commonArgs & + pacmanRun(true, config.color, removeArgs & ("R", none(string), ArgumentType.short) & toSeq(unrequiredOptional.items).map(t => (t, none(string), ArgumentType.target))) -- cgit v1.2.3-70-g09d2