- Adapt to removal of hex attribute in pygit2 v1.15.0 (bsc#1230642)
- Added: * update-for-deprecation-of-hex-in-pygit2-1.15.0-and-a.patch OBS-URL: https://build.opensuse.org/package/show/systemsmanagement:saltstack/salt?expand=0&rev=269
This commit is contained in:
committed by
Git OBS Bridge
parent
e47e46e4aa
commit
fe83a5635c
@@ -1 +1 @@
|
||||
98870a8e1cee671a57d0521efe41dad3d46354c7
|
||||
65d58c89a684cadacf38aba10c83c7a641ab1afd
|
@@ -1,3 +1,11 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Jan 27 11:04:02 UTC 2025 - Alexander Graul <alexander.graul@suse.com>
|
||||
|
||||
- Adapt to removal of hex attribute in pygit2 v1.15.0 (bsc#1230642)
|
||||
|
||||
- Added:
|
||||
* update-for-deprecation-of-hex-in-pygit2-1.15.0-and-a.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jan 23 16:44:42 UTC 2025 - Pablo Suárez Hernández <psuarezhernandez@suse.com>
|
||||
|
||||
|
@@ -505,6 +505,8 @@ Patch149: fix-issues-that-break-salt-in-python-3.12-and-3.13-6.patch
|
||||
Patch150: fix-virtual-grains-for-vms-running-on-nutanix-ahv-bs.patch
|
||||
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/67023
|
||||
Patch151: enhance-find_json-garbage-filtering-bsc-1231605-688.patch
|
||||
# PATCH-FIX_UPSTREAM: https://github.com/saltstack/salt/pull/67105
|
||||
Patch152: update-for-deprecation-of-hex-in-pygit2-1.15.0-and-a.patch
|
||||
|
||||
### IMPORTANT: The line below is used as a snippet marker. Do not touch it.
|
||||
### SALT PATCHES LIST END
|
||||
|
62
update-for-deprecation-of-hex-in-pygit2-1.15.0-and-a.patch
Normal file
62
update-for-deprecation-of-hex-in-pygit2-1.15.0-and-a.patch
Normal file
@@ -0,0 +1,62 @@
|
||||
From 40a7163774879f8291f5d323944a65625a439712 Mon Sep 17 00:00:00 2001
|
||||
From: Joyeta Modak <joyeta.modak@suse.com>
|
||||
Date: Mon, 27 Jan 2025 16:19:45 +0530
|
||||
Subject: [PATCH] Update for deprecation of hex in pygit2 1.15.0 and
|
||||
above (bsc#1230642)
|
||||
|
||||
Co-authored-by: David Murphy <damurphy@vmware.com>
|
||||
---
|
||||
salt/utils/gitfs.py | 14 +++++++++-----
|
||||
1 file changed, 9 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/salt/utils/gitfs.py b/salt/utils/gitfs.py
|
||||
index f3902c1f19a..58fa611db89 100644
|
||||
--- a/salt/utils/gitfs.py
|
||||
+++ b/salt/utils/gitfs.py
|
||||
@@ -1660,7 +1660,7 @@ class Pygit2(GitProvider):
|
||||
return None
|
||||
|
||||
try:
|
||||
- head_sha = self.peel(local_head).hex
|
||||
+ head_sha = str(self.peel(local_head).id)
|
||||
except AttributeError:
|
||||
# Shouldn't happen, but just in case a future pygit2 API change
|
||||
# breaks things, avoid a traceback and log an error.
|
||||
@@ -1721,7 +1721,10 @@ class Pygit2(GitProvider):
|
||||
self.repo.create_reference(local_ref, pygit2_id)
|
||||
|
||||
try:
|
||||
- target_sha = self.peel(self.repo.lookup_reference(remote_ref)).hex
|
||||
+ target_sha = str(
|
||||
+ self.peel(self.repo.lookup_reference(remote_ref)).id
|
||||
+ )
|
||||
+
|
||||
except KeyError:
|
||||
log.error(
|
||||
"pygit2 was unable to get SHA for %s in %s remote '%s'",
|
||||
@@ -1802,10 +1805,11 @@ class Pygit2(GitProvider):
|
||||
else:
|
||||
try:
|
||||
# If no AttributeError raised, this is an annotated tag
|
||||
- tag_sha = tag_obj.target.hex
|
||||
+ tag_sha = str(tag_obj.target.id)
|
||||
+
|
||||
except AttributeError:
|
||||
try:
|
||||
- tag_sha = tag_obj.hex
|
||||
+ tag_sha = str(tag_obj.id)
|
||||
except AttributeError:
|
||||
# Shouldn't happen, but could if a future pygit2
|
||||
# API change breaks things.
|
||||
@@ -2145,7 +2149,7 @@ class Pygit2(GitProvider):
|
||||
blob = None
|
||||
break
|
||||
if isinstance(blob, pygit2.Blob):
|
||||
- return blob, blob.hex, mode
|
||||
+ return blob, str(blob.id), mode
|
||||
return None, None, None
|
||||
|
||||
def get_tree_from_branch(self, ref):
|
||||
--
|
||||
2.48.1
|
||||
|
Reference in New Issue
Block a user