summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Magorsch <arzano@gentoo.org>2020-05-18 02:20:48 +0200
committerMax Magorsch <arzano@gentoo.org>2020-05-18 02:20:48 +0200
commit1a1d450ead6444322a2daed55143950dd5582a54 (patch)
tree24fa334cfa8ede5c53fdaa4ed8601e5fb87aa6f2
parentHide global useflags that are defined locally (diff)
downloadsoko-1a1d450ead6444322a2daed55143950dd5582a54.tar.gz
soko-1a1d450ead6444322a2daed55143950dd5582a54.tar.bz2
soko-1a1d450ead6444322a2daed55143950dd5582a54.zip
Fix duplicate global useflags
Signed-off-by: Max Magorsch <arzano@gentoo.org>
-rw-r--r--pkg/app/handler/packages/utils.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/pkg/app/handler/packages/utils.go b/pkg/app/handler/packages/utils.go
index c2b22c1..3ea0cd1 100644
--- a/pkg/app/handler/packages/utils.go
+++ b/pkg/app/handler/packages/utils.go
@@ -277,15 +277,15 @@ func getPackageUseflags(gpackage *models.Package) ([]models.Useflag, []models.Us
}
}
}
+ }
- // Only add global useflags that are not present in the local useflags
- for _, useflag := range allGlobalUseflags {
- if !containsUseflag(useflag, localUseflags){
- filteredGlobalUseflags = append(filteredGlobalUseflags, useflag)
- }
+ // Only add global useflags that are not present in the local useflags
+ for _, useflag := range allGlobalUseflags {
+ if !containsUseflag(useflag, localUseflags){
+ filteredGlobalUseflags = append(filteredGlobalUseflags, useflag)
}
-
}
+
return localUseflags, filteredGlobalUseflags, useExpands
}