more typo, plural, wording fixes
Signed-off-by: Nils Philippsen <nils@redhat.com>
This commit is contained in:
parent
82374d6739
commit
4a590170b0
2 changed files with 14 additions and 14 deletions
|
@ -69,7 +69,7 @@ def decompress_db(name, archive, location):
|
||||||
|
|
||||||
|
|
||||||
def needs_update(local_file, remote_sha, sha_type):
|
def needs_update(local_file, remote_sha, sha_type):
|
||||||
''' Compare sha of a local and remote file.
|
''' Compare hash of a local and remote file.
|
||||||
Return True if our local file needs to be updated.
|
Return True if our local file needs to be updated.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
|
@ -78,7 +78,7 @@ def needs_update(local_file, remote_sha, sha_type):
|
||||||
# "changed"
|
# "changed"
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# Old old epel5 doesn't even know which sha it is using..
|
# Old epel5 doesn't even know which sha it is using...
|
||||||
if sha_type == 'sha':
|
if sha_type == 'sha':
|
||||||
sha_type = 'sha1'
|
sha_type = 'sha1'
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ def get_primary_xml(destfolder, url, name):
|
||||||
return destfile
|
return destfile
|
||||||
|
|
||||||
|
|
||||||
def get_package_summary():
|
def get_package_summaries():
|
||||||
start = time.time()
|
start = time.time()
|
||||||
|
|
||||||
primary_xml = get_primary_xml(
|
primary_xml = get_primary_xml(
|
||||||
|
@ -201,7 +201,7 @@ def get_package_summary():
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
db = get_package_summary()
|
db = get_package_summaries()
|
||||||
print(f"guake: {db.get('guake')}")
|
print(f"guake: {db.get('guake')}")
|
||||||
print(f"geany: {db.get('geany')}")
|
print(f"geany: {db.get('geany')}")
|
||||||
print(f"kernel: {db.get('kernel')}")
|
print(f"kernel: {db.get('kernel')}")
|
|
@ -52,7 +52,7 @@ from requests.adapters import HTTPAdapter
|
||||||
from urllib3.util import Retry
|
from urllib3.util import Retry
|
||||||
import yaml
|
import yaml
|
||||||
|
|
||||||
from . import package_summary
|
from . import package_summaries
|
||||||
from .config import config, email_overrides, load_configuration
|
from .config import config, email_overrides, load_configuration
|
||||||
|
|
||||||
|
|
||||||
|
@ -598,16 +598,16 @@ class DistgitBugzillaSync:
|
||||||
watchers=pagure_namespace_to_cc[namespace][name],
|
watchers=pagure_namespace_to_cc[namespace][name],
|
||||||
))
|
))
|
||||||
|
|
||||||
def add_branches_product_and_summary(self):
|
def add_branches_products_and_summaries(self):
|
||||||
""" For each project retrieved this method adds branches, products
|
""" For each project retrieved, this method adds branches, products
|
||||||
and summary information.
|
and summary information.
|
||||||
|
|
||||||
The branches are retrieved from PDC
|
The branches are retrieved from PDC.
|
||||||
|
|
||||||
The products are determined based on the branches.
|
The products are determined based on the branches.
|
||||||
|
|
||||||
The summary is coming from the primary.xml file from the repodata
|
The summaries are coming from the primary.xml file of the Rawhide repodata
|
||||||
of the rawhide repository in koji.
|
in Koji.
|
||||||
"""
|
"""
|
||||||
branches_url = "/".join([
|
branches_url = "/".join([
|
||||||
self.env['pdc_url'].split('rest_api')[0].rstrip("/"),
|
self.env['pdc_url'].split('rest_api')[0].rstrip("/"),
|
||||||
|
@ -621,7 +621,7 @@ class DistgitBugzillaSync:
|
||||||
# Summary
|
# Summary
|
||||||
summary = None
|
summary = None
|
||||||
if project["namespace"] == "rpms":
|
if project["namespace"] == "rpms":
|
||||||
summary = self.rpm_summary.get(project["name"])
|
summary = self.rpm_summaries.get(project["name"])
|
||||||
project["summary"] = summary
|
project["summary"] = summary
|
||||||
|
|
||||||
# Branches
|
# Branches
|
||||||
|
@ -735,11 +735,11 @@ class DistgitBugzillaSync:
|
||||||
self.session = retry_session()
|
self.session = retry_session()
|
||||||
|
|
||||||
if self.env["verbose"]:
|
if self.env["verbose"]:
|
||||||
print("Building a cache of the rpm packages' summary")
|
print("Building a cache of the rpm package summaries")
|
||||||
self.rpm_summary = package_summary.get_package_summary()
|
self.rpm_summaries = package_summaries.get_package_summaries()
|
||||||
|
|
||||||
self.get_pagure_projects(self.args.projects)
|
self.get_pagure_projects(self.args.projects)
|
||||||
self.add_branches_product_and_summary()
|
self.add_branches_products_and_summaries()
|
||||||
|
|
||||||
if self.env["verbose"]:
|
if self.env["verbose"]:
|
||||||
print(f"{len(self.pagure_projects)} projects to consider")
|
print(f"{len(self.pagure_projects)} projects to consider")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue