From 29c610feb29f45eb1b2fdb59c2836f5b0b6e3508 Mon Sep 17 00:00:00 2001 From: Gyeoungmin Kim Date: Wed, 20 May 2015 09:43:10 +0900 Subject: --priority option of *.ks file in mic does not apply I confirm that --priority option of *.ks file in mic does not apply When creating an image file using ks file, Priority is determined by repo name If you check the logs of the mic by applying the repo name below to see what the results are different repo --name=mobile-wayland_arm64 ... repo --name=prerelease ... --priority 1 .............................................. repo --name=2mobile-wayland_arm64 ... repo --name=1prerelease ... --priority 1 Change-Id: I53bb8e96bc8eb06e8075294e56b0cbb4f35afd6b --- plugins/backend/zypppkgmgr.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/backend/zypppkgmgr.py b/plugins/backend/zypppkgmgr.py index 3590edc..9358cbe 100644 --- a/plugins/backend/zypppkgmgr.py +++ b/plugins/backend/zypppkgmgr.py @@ -301,12 +301,15 @@ class Zypp(BackendPlugin): self.to_deselect.append(pkg) def selectGroup(self, grp, include = ksparser.GROUP_DEFAULT): + def compareGroup(pitem): + item = zypp.asKindPattern(pitem) + return item.repoInfo().priority() if not self.Z: self.__initialize_zypp() found = False q = zypp.PoolQuery() q.addKind(zypp.ResKind.pattern) - for pitem in q.queryResults(self.Z.pool()): + for pitem in sorted(q.queryResults(self.Z.pool()), key=compareGroup): item = zypp.asKindPattern(pitem) summary = "%s" % item.summary() name = "%s" % item.name() -- cgit v1.2.3