Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package zypper-changelog-plugin for
openSUSE:Factory checked in at 2022-11-16 15:43:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/zypper-changelog-plugin (Old)
and /work/SRC/openSUSE:Factory/.zypper-changelog-plugin.new.1597 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "zypper-changelog-plugin"
Wed Nov 16 15:43:54 2022 rev:4 rq:1035960 version:0.2
Changes:
--------
---
/work/SRC/openSUSE:Factory/zypper-changelog-plugin/zypper-changelog-plugin.changes
2021-01-18 11:33:41.284972362 +0100
+++
/work/SRC/openSUSE:Factory/.zypper-changelog-plugin.new.1597/zypper-changelog-plugin.changes
2022-11-16 15:43:56.335964665 +0100
@@ -1,0 +2,5 @@
+Wed Nov 16 06:35:11 UTC 2022 - Zoltan Balogh <[email protected]>
+
+- Update with few fixes after testing on Leap and SLES
+
+-------------------------------------------------------------------
Old:
----
zypper-changelog-plugin-0.1.tar.gz
New:
----
zypper-changelog-plugin-0.2.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ zypper-changelog-plugin.spec ++++++
--- /var/tmp/diff_new_pack.Yvu0oV/_old 2022-11-16 15:43:56.783966866 +0100
+++ /var/tmp/diff_new_pack.Yvu0oV/_new 2022-11-16 15:43:56.787966885 +0100
@@ -1,7 +1,7 @@
#
# spec file for package zypper-changelog-plugin
#
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,19 +17,20 @@
Name: zypper-changelog-plugin
-Version: 0.1
+Version: 0.2
Release: 0
Summary: Changelog listing tool
License: GPL-2.0-only
Group: System/Packages
URL: https://github.com/bzoltan1/zypper-changelog-plugin.git
-Source: zypper-changelog-plugin-0.1.tar.gz
+Source: zypper-changelog-plugin-0.2.tar.gz
Requires: /usr/bin/python3
Requires: python3-requests
BuildArch: noarch
%description
This tool is to show the changelog of packages in the repository
+
%prep
%setup -q
++++++ zypper-changelog-plugin-0.1.tar.gz -> zypper-changelog-plugin-0.2.tar.gz
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/zypper-changelog-plugin-0.1/zypper-changelog
new/zypper-changelog-plugin-0.2/zypper-changelog
--- old/zypper-changelog-plugin-0.1/zypper-changelog 2021-01-17
17:18:31.083301730 +0100
+++ new/zypper-changelog-plugin-0.2/zypper-changelog 2022-11-11
09:02:55.815362460 +0100
@@ -34,11 +34,12 @@
def log_text(text):
- print(text)
+ if args.debug:
+ print(text)
def parse_args():
- p = ArgumentParser(prog='zypper-changelog',
+ p = ArgumentParser(prog='zypper changelog',
description='Shows the changelog' +
'of one ore more packages.',
formatter_class=argparse.RawDescriptionHelpFormatter)
@@ -55,15 +56,15 @@
help="Package name \
or regular expression to match packages.")
p.add_argument("-r", "--repositories",
- dest="repos", default="oss",
- help="Comma separated list of repositores \
+ dest="repos", default="ALL",
+ help="Comma separated list of repositories \
to search for changelogs.")
p.add_argument("-a", "--all",
dest="all", default=False,
action='store_true',
help="Lists changelogs for all packages")
p.add_argument("-u", "--update",
- dest="update", default=False,
+ dest="update", default=True,
action='store_true',
help="Lists changelogs for all packages to be updated")
if len(sys.argv[1:]) == 0:
@@ -145,9 +146,13 @@
for root, dirs, files in os.walk("/var/cache/zypp/raw/"):
for file in files:
if file.endswith("primary.xml.gz"):
- for repository in repository_list:
- if repository in root:
- list_of_xml_files.append(os.path.join(root, file))
+ if args.repos=="ALL":
+ list_of_xml_files.append(os.path.join(root, file))
+ else:
+ for repository in repository_list:
+ log_text("Enabled repository: %s" % repository)
+ if repository in root:
+ list_of_xml_files.append(os.path.join(root, file))
ts = rpm.TransactionSet("", (rpm._RPMVSF_NOSIGNATURES or
rpm.RPMVSF_NOHDRCHK or
@@ -165,10 +170,12 @@
repo_tree = ET.ElementTree(ET.fromstring(stdout_value))
repo_root = repo_tree.getroot()
+
for files in list_of_xml_files:
for repo in repo_root.iter('repo'):
if repo.get('alias') in files:
mirror_url = repo.find('url').text
+ log_text("Mirror URL: %s" % mirror_url)
zcat_process = subprocess.Popen(["zcat",
"%s" % files],
@@ -205,7 +212,7 @@
start = field.get('start')
end = field.get('end')
url = '%s/%s' % (mirror_url, package[10].get('href'))
- log_text(url)
+ log_text("URL to fetch the rpm header from: %s" % url)
try:
# Fetch the rpm header as it contains the changelogs
rpm_header = requests.get(url,
@@ -236,6 +243,14 @@
for (name, time, text) in zip(changelog_name,
changelog_time,
changelog_text):
+ # In some cases the rpm data is in bytes and need to be
+ # converted to strings
+ if type(name) == bytes:
+ name_str = name.decode("utf-8")
+ name = name_str
+ if type(text) == bytes:
+ text_str = text.decode("utf-8")
+ text = text_str
dt = datetime.datetime.fromtimestamp(time).strftime("%a %b " +
"%d %Y")
if args.commits:
@@ -244,6 +259,9 @@
changelog += "* %s %s\n%s\n\n" % (dt, name, text)
if args.update:
local = str(local_changelog(package[0].text))
+ #text_file = open("local-%s" % package , "w")
+ #text_file.write(local)
+ #text_file.close()
diff = difflib.ndiff(local.split('\n'), changelog.split('\n'))
for line in diff:
if line.startswith('+ '):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zypper-changelog-plugin-0.1/zypper-changelog-plugin.changes
new/zypper-changelog-plugin-0.2/zypper-changelog-plugin.changes
--- old/zypper-changelog-plugin-0.1/zypper-changelog-plugin.changes
2021-01-17 17:18:31.083301730 +0100
+++ new/zypper-changelog-plugin-0.2/zypper-changelog-plugin.changes
2022-11-16 07:35:40.361361224 +0100
@@ -1,4 +1,19 @@
-------------------------------------------------------------------
+Wed Nov 16 06:35:11 UTC 2022 - Zoltan Balogh <[email protected]>
+
+- Update with few fixes after testing on Leap and SLES
+
+-------------------------------------------------------------------
+Sun Jan 17 16:46:17 UTC 2021 - Zoltan Balogh <[email protected]>
+
+- Change the default repository to oss instead of repo-oss
+
+-------------------------------------------------------------------
+Mon Jan 4 15:59:59 UTC 2021 - Zoltan Balogh <[email protected]>
+
+- Added python3-requests to the dependencies
+
+-------------------------------------------------------------------
Sun May 31 16:43:10 UTC 2020 - Zoltan Balogh <[email protected]>
- 0.1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/zypper-changelog-plugin-0.1/zypper-changelog-plugin.spec
new/zypper-changelog-plugin-0.2/zypper-changelog-plugin.spec
--- old/zypper-changelog-plugin-0.1/zypper-changelog-plugin.spec
2021-01-17 17:18:31.083301730 +0100
+++ new/zypper-changelog-plugin-0.2/zypper-changelog-plugin.spec
2022-11-16 07:30:01.986726181 +0100
@@ -1,7 +1,7 @@
#
-# spec file for package zypper-changelog
+# spec file for package zypper-changelog-plugin
#
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -17,13 +17,13 @@
Name: zypper-changelog-plugin
-Version: 0.1
+Version: 0.2
Release: 0
Summary: Changelog listing tool
License: GPL-2.0-only
Group: System/Packages
URL: https://github.com/bzoltan1/zypper-changelog-plugin.git
-Source: zypper-changelog-plugin-0.1.tar.gz
+Source: zypper-changelog-plugin-0.2.tar.gz
Requires: /usr/bin/python3
Requires: python3-requests
BuildArch: noarch