diff options
author | Gyeoungmin Kim <g5.kim@samsung.com> | 2015-05-20 09:43:10 +0900 |
---|---|---|
committer | admin <yuhuan.yang@samsung.com> | 2016-02-04 18:33:04 +0800 |
commit | 29c610feb29f45eb1b2fdb59c2836f5b0b6e3508 (patch) | |
tree | 9e53c55e6e7bf3a8d30ffcebff0509f90b05b059 | |
parent | b2acba1e55b9631b67aba80d40d23435aae3b891 (diff) | |
download | mic-29c610feb29f45eb1b2fdb59c2836f5b0b6e3508.tar.gz mic-29c610feb29f45eb1b2fdb59c2836f5b0b6e3508.tar.bz2 mic-29c610feb29f45eb1b2fdb59c2836f5b0b6e3508.zip |
--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
-rw-r--r-- | plugins/backend/zypppkgmgr.py | 5 |
1 files changed, 4 insertions, 1 deletions
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() |