[elbe-devel] [PATCH 2/2] rpcaptcache.py: fix development package version in mark_install_devpkgs

Kory Maincent kory.maincent at bootlin.com
Wed Jan 20 18:40:27 CET 2021


The problem was the function mark_install_devpkgs installs all the dev
packages that match the same source name of an installed package but skip
if the version does not match.

This leads to miss development packages. If we build a X package with a
former version than the one available on the repo. If we add the package
with the version specified in the xml file this will not install the X-dev
package because the src_version is the recent version from the repo.

Update it to force the development package version and test if the candidate
is available.

Signed-off-by: Kory Maincent <kory.maincent at bootlin.com>
---
 elbepack/rpcaptcache.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/elbepack/rpcaptcache.py b/elbepack/rpcaptcache.py
index 4d3e9f0dd..cddb6f1cf 100644
--- a/elbepack/rpcaptcache.py
+++ b/elbepack/rpcaptcache.py
@@ -189,12 +189,10 @@ class RPCAPTCache(InChRootObject):
             if src_name not in version_dict:
                 continue
 
-            src_version = pkg.candidate.source_version
-
-            if src_version != version_dict[src_name]:
-                continue
-
-            dev_lst.append(pkg)
+            candidate = pkg.versions.get(version_dict[src_name])
+            if candidate:
+                pkg.candidate = candidate
+                dev_lst.append(pkg)
 
         mark_install(dev_lst, "-dev")
 
-- 
2.17.1



More information about the elbe-devel mailing list