45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From 693c9549280b78860b756b593b5922bf3be46888 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ville=20Skytt=C3=A4?= <ville.skytta@iki.fi>
|
|
Date: Wed, 15 Feb 2017 11:19:29 +0200
|
|
Subject: [PATCH] bumpspec, checksig: Avoid python 3.6 regex related
|
|
deprecations
|
|
|
|
---
|
|
rpmdev-bumpspec | 6 ++++--
|
|
rpmdev-checksig | 2 +-
|
|
2 files changed, 5 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/rpmdev-bumpspec b/rpmdev-bumpspec
|
|
index ea2ddd9..35e6c9c 100755
|
|
--- a/rpmdev-bumpspec
|
|
+++ b/rpmdev-bumpspec
|
|
@@ -44,8 +44,10 @@ class SpecFile(object):
|
|
|
|
# supported release value macro definitions
|
|
_macro_bump_patterns = (
|
|
- re.compile(r"^%(?:define|global)\s+(?i)release\s+(\d+.*)"),
|
|
- re.compile(r"^%(?:define|global)\s+(?i)baserelease\s+(\d+.*)"),
|
|
+ re.compile(r"^%(?:define|global)\s+"
|
|
+ r"[Rr][Ee][Ll][Ee][Aa][Ss][Ee]\s+(\d+.*)"),
|
|
+ re.compile(r"^%(?:define|global)\s+"
|
|
+ r"[Bb][Aa][Ss][Ee][Rr][Ee][Ll][Ee][Aa][Ss][Ee]\s+(\d+.*)"),
|
|
)
|
|
# normal "Release:" tag lines
|
|
_tag_bump_patterns = (
|
|
diff --git a/rpmdev-checksig b/rpmdev-checksig
|
|
index 0e90fe5..76b5967 100755
|
|
--- a/rpmdev-checksig
|
|
+++ b/rpmdev-checksig
|
|
@@ -44,7 +44,7 @@ def lookupKeyID(ts, keyid):
|
|
mi.pattern('version', rpm.RPMMIRE_STRCMP, keyid)
|
|
for hdr in mi:
|
|
sum = hdr['summary']
|
|
- mo = re.search(b'\<.*\>', sum)
|
|
+ mo = re.search(rb'\<.*\>', sum)
|
|
email = mo.group().decode(errors='replace')
|
|
return email
|
|
|
|
--
|
|
2.17.1
|
|
|