* [PATCH 2/2] Warn properly when cannot find peer RPM
2016-01-01 0:00 [PATCH 1/2] Read Koji config via Koji API cqi
@ 2016-01-01 0:00 ` cqi
2016-01-01 0:00 ` Dodji Seketeli
2016-01-01 0:00 ` [PATCH 1/2] Read Koji config via Koji API Dodji Seketeli
1 sibling, 1 reply; 4+ messages in thread
From: cqi @ 2016-01-01 0:00 UTC (permalink / raw)
To: libabigail; +Cc: Chenxiong Qi
From: Chenxiong Qi <cqi@redhat.com>
* tools/fedabipkgdiff: (RPMCollection.get_peer_rpm): Return None
when cannot find peer RPM due to nonexistent arch.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
---
tools/fedabipkgdiff | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
index 894ca2a..0584bf1 100755
--- a/tools/fedabipkgdiff
+++ b/tools/fedabipkgdiff
@@ -482,6 +482,8 @@ class RPMCollection(object):
def get_peer_rpm(self, rpm):
"""Get peer rpm of rpm from this collection"""
+ if rpm.arch not in self.rpms:
+ return None
for _rpm in self.rpms[rpm.arch]:
if _rpm.is_peer(rpm):
return _rpm
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 2/2] Warn properly when cannot find peer RPM
2016-01-01 0:00 ` [PATCH 2/2] Warn properly when cannot find peer RPM cqi
@ 2016-01-01 0:00 ` Dodji Seketeli
0 siblings, 0 replies; 4+ messages in thread
From: Dodji Seketeli @ 2016-01-01 0:00 UTC (permalink / raw)
To: cqi; +Cc: libabigail
cqi@redhat.com a écrit:
> From: Chenxiong Qi <cqi@redhat.com>
>
> * tools/fedabipkgdiff: (RPMCollection.get_peer_rpm): Return None
> when cannot find peer RPM due to nonexistent arch.
>
> Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This has been applied to master, thanks!
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] Read Koji config via Koji API
2016-01-01 0:00 [PATCH 1/2] Read Koji config via Koji API cqi
2016-01-01 0:00 ` [PATCH 2/2] Warn properly when cannot find peer RPM cqi
@ 2016-01-01 0:00 ` Dodji Seketeli
1 sibling, 0 replies; 4+ messages in thread
From: Dodji Seketeli @ 2016-01-01 0:00 UTC (permalink / raw)
To: cqi; +Cc: libabigail
cqi@redhat.com a écrit:
> From: Chenxiong Qi <cqi@redhat.com>
>
> Besides reading Koji config via Koji API read_config, option --topdir is
> also renamed to --topurl that is the correct one should be used.
>
> * tools/fedabipkgdiff: Read DEFAULT_KOJI_TOPURL and
> DEFAULT_KOJI_SERVER from Koji config via Koji API read_config.
> (build_commandline_args_parser): --topdir is renamed to
> --topurl.
> * doc/manuals/fedabipkgdiff.rst: Rename --topdir to --topurl.
This is cleanup is OK and has been applied to master, thanks!
Cheers,
--
Dodji
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] Read Koji config via Koji API
@ 2016-01-01 0:00 cqi
2016-01-01 0:00 ` [PATCH 2/2] Warn properly when cannot find peer RPM cqi
2016-01-01 0:00 ` [PATCH 1/2] Read Koji config via Koji API Dodji Seketeli
0 siblings, 2 replies; 4+ messages in thread
From: cqi @ 2016-01-01 0:00 UTC (permalink / raw)
To: libabigail; +Cc: Chenxiong Qi
From: Chenxiong Qi <cqi@redhat.com>
Besides reading Koji config via Koji API read_config, option --topdir is
also renamed to --topurl that is the correct one should be used.
* tools/fedabipkgdiff: Read DEFAULT_KOJI_TOPURL and
DEFAULT_KOJI_SERVER from Koji config via Koji API read_config.
(build_commandline_args_parser): --topdir is renamed to
--topurl.
* doc/manuals/fedabipkgdiff.rst: Rename --topdir to --topurl.
Signed-off-by: Chenxiong Qi <cqi@redhat.com>
---
doc/manuals/fedabipkgdiff.rst | 2 +-
tools/fedabipkgdiff | 13 +++++++------
2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/doc/manuals/fedabipkgdiff.rst b/doc/manuals/fedabipkgdiff.rst
index e4ea3eb..d4535ab 100644
--- a/doc/manuals/fedabipkgdiff.rst
+++ b/doc/manuals/fedabipkgdiff.rst
@@ -85,7 +85,7 @@ Options
Specifies the URL of the `Koji`_ XMLRPC service the tool talks to.
The default value of this option is http://koji.fedoraproject.org/kojihub.
- * ``--topdir`` <URL>
+ * ``--topurl`` <URL>
Specifies the URL of the package store the tool downloads RPMs
from. The default value of this option is https://kojipkgs.fedoraproject.org.
diff --git a/tools/fedabipkgdiff b/tools/fedabipkgdiff
index c32ff9e..894ca2a 100755
--- a/tools/fedabipkgdiff
+++ b/tools/fedabipkgdiff
@@ -56,8 +56,9 @@ import koji
# something wrong.
-DEFAULT_KOJI_SERVER = 'http://koji.fedoraproject.org/kojihub'
-DEFAULT_KOJI_TOPDIR = 'https://kojipkgs.fedoraproject.org'
+koji_config = koji.read_config('koji')
+DEFAULT_KOJI_SERVER = koji_config['server']
+DEFAULT_KOJI_TOPURL = koji_config['topurl']
# The working directory where to hold all data including downloaded RPM
# packages Currently, it's not configurable and hardcode here. In the future
@@ -1207,11 +1208,11 @@ def build_commandline_args_parser():
help='URL of koji XMLRPC service. Default is {0}'.format(
DEFAULT_KOJI_SERVER))
parser.add_argument(
- '--topdir',
+ '--topurl',
required=False,
metavar='URL',
- dest='koji_topdir',
- default=DEFAULT_KOJI_TOPDIR,
+ dest='koji_topurl',
+ default=DEFAULT_KOJI_TOPURL,
help='URL for RPM files access')
parser.add_argument(
'--abipkgdiff',
@@ -1257,7 +1258,7 @@ def main():
global_config = args
global pathinfo
- pathinfo = koji.PathInfo(topdir=global_config.koji_topdir)
+ pathinfo = koji.PathInfo(topdir=global_config.koji_topurl)
global session
session = get_session()
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-12-19 11:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-01 0:00 [PATCH 1/2] Read Koji config via Koji API cqi
2016-01-01 0:00 ` [PATCH 2/2] Warn properly when cannot find peer RPM cqi
2016-01-01 0:00 ` Dodji Seketeli
2016-01-01 0:00 ` [PATCH 1/2] Read Koji config via Koji API Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).