Fridrich Strba 2024-10-02 16:12:54 +00:00 committed by Git OBS Bridge
parent bf967b9041
commit 75f0e87337
2 changed files with 0 additions and 58 deletions

View File

@ -1,36 +0,0 @@
From ee0c9644f137d697fc598a3f7bb974787e820731 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 29 Sep 2024 10:59:57 +0200
Subject: [PATCH 1/2] Fix tests with python 3.4
---
test/test_rpmbuild.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/test/test_rpmbuild.py b/test/test_rpmbuild.py
index d64e40d2..8f2d45b7 100644
--- a/test/test_rpmbuild.py
+++ b/test/test_rpmbuild.py
@@ -4,7 +4,6 @@ import re
import sys
import subprocess
import shutil
-import glob
from textwrap import dedent
@@ -101,8 +100,9 @@ class Package(object):
os.remove('tmperr')
# RPM 4.19 and 4.20 use different BUILD directory structure, thus we search the filesystem
# to find the actual location of build subdir without reliance on particular structure
- self.buildpath = glob.glob('rpmbuild/BUILD/**/{name}-subdir'.format(name=self.__name),
- recursive=True)[0]
+ self.buildpath = [os.path.join(dirpath, d)
+ for dirpath, dirnames, files in os.walk('rpmbuild/BUILD')
+ for d in dirnames if d.endswith('{name}-subdir'.format(name=self.__name))][0]
return (out, err, ret)
def set_env(self, name, value):
--
2.46.1

View File

@ -1,22 +0,0 @@
From 5f5164c230f7a0bea9d727fd45dccb787b3ef653 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
Date: Sun, 29 Sep 2024 11:48:03 +0200
Subject: [PATCH 2/2] Allow missing components with abs2rel
---
bin/abs2rel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bin/abs2rel b/bin/abs2rel
index b0b85048..a06bab76 100755
--- a/bin/abs2rel
+++ b/bin/abs2rel
@@ -36,4 +36,4 @@ if [ $# -ne 2 ]; then
exit 1
fi
-exec realpath -s --relative-to="$2" "$1"
+exec realpath -m -s --relative-to="$2" "$1"
--
2.46.1