Fix an issue related to searching anaconda repo 60/1560/3
authorvalentin.radulescu <valentin.radulescu@enea.com>
Tue, 10 Sep 2019 09:11:00 +0000 (09:11 +0000)
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>
Fri, 13 Sep 2019 15:00:24 +0000 (17:00 +0200)
Packages with anaconda repo are installed during Centos
installation. For aarch64, because the Centos image is old,
there are some packages which have anaconda as "From repo:".
Use localrepo for these packages.

Change-Id: I1aa39f3716d5d4cdc71f18155b7d5f953b4bdb7d
Signed-off-by: valentin.radulescu <valentin.radulescu@enea.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
tools/script/create_rpm_data.py

index 82beabf..28133c0 100755 (executable)
@@ -33,6 +33,8 @@ from tools.log import set_logging
 from tools.io import read_from, write_to, read_json
 from tools.convert import to_json, CsvConverter
 
+LOCAL_REPOS = ['localrepo', 'anaconda']
+
 
 class RpmDataBuilder(object):
     def __init__(self, build_config, yum_info_installed, rpm_info_installed,
@@ -254,7 +256,7 @@ class RpmDataBuilder(object):
 
     def _get_rpm_available_in(self, rpm, available_rpms):
         if 'From repo' in rpm.keys():
-            if rpm['From repo'] == 'localrepo':
+            if rpm['From repo'] in LOCAL_REPOS:
                 return 'localrepo'
             available_repo_rpms = available_rpms[rpm['From repo']]
             for a_rpm in available_repo_rpms: