summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu@debian.org>2023-03-20 13:53:53 +0100
committerEmilio Pozuelo Monfort <pochu@debian.org>2023-03-27 10:25:24 +0200
commitccd6a86f9f51249032e087827f7b381d9c412a8e (patch)
tree365a6aa4e1f91c38b8e76852d4a7976346011b97 /bin
parent50ddeb9a96b1dbd198e927461f52ccf24122b14e (diff)
grab-cve-in-fix: add a bug variable
Diffstat (limited to 'bin')
-rwxr-xr-xbin/grab-cve-in-fix18
1 files changed, 11 insertions, 7 deletions
diff --git a/bin/grab-cve-in-fix b/bin/grab-cve-in-fix
index 79465f098d..109fdf3e7b 100755
--- a/bin/grab-cve-in-fix
+++ b/bin/grab-cve-in-fix
@@ -12,6 +12,7 @@ grab-cve-in-fix - #1001451
#
# Copyright 2021-2022 Neil Williams <codehelp@debian.org>
+# Copyright © 2023 Emilio Pozuelo Monfort <pochu@debian.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -167,7 +168,10 @@ class ParseChanges:
self.source_package,
)
continue
- for line in self.bugs[cve].annotations:
+
+ bug = self.bugs[cve]
+
+ for line in bug.annotations:
if not isinstance(line, PackageAnnotation):
continue # skip notes etc.
if line.release: # only update unstable
@@ -186,10 +190,10 @@ class ParseChanges:
if vcompare < 0:
self.logger.info("Updating %s to %s", line.version, self.unstable_version)
mod_line = line._replace(version=self.unstable_version)
- index = self.bugs[cve].annotations.index(line)
- bug_list = list(self.bugs[cve].annotations)
+ index = bug.annotations.index(line)
+ bug_list = list(bug.annotations)
bug_list[index] = mod_line
- mod_bug = Bug(self.bugs[cve].file, self.bugs[cve].header, tuple(bug_list))
+ mod_bug = Bug(bug.file, bug.header, tuple(bug_list))
modified.append(mod_bug)
elif vcompare > 0:
self.logger.error(
@@ -207,10 +211,10 @@ class ParseChanges:
)
else:
mod_line = line._replace(version=self.unstable_version)
- index = self.bugs[cve].annotations.index(line)
- bug_list = list(self.bugs[cve].annotations)
+ index = bug.annotations.index(line)
+ bug_list = list(bug.annotations)
bug_list[index] = mod_line
- mod_bug = Bug(self.bugs[cve].file, self.bugs[cve].header, tuple(bug_list))
+ mod_bug = Bug(bug.file, bug.header, tuple(bug_list))
modified.append(mod_bug)
if not modified:
return 0

© 2014-2024 Faster IT GmbH | imprint | privacy policy