parent
5e1559b286
commit
12e6fb9375
@ -0,0 +1,57 @@
|
||||
From 02a8058b3ab0fb695c528c56b51fef3df3815de1 Mon Sep 17 00:00:00 2001
|
||||
From: Sergey Cherevko <s.cherevko@msvsphere-os.ru>
|
||||
Date: Tue, 3 Dec 2024 12:19:02 +0300
|
||||
Subject: [PATCH] Consider x86_64_v2 as x86_64
|
||||
|
||||
---
|
||||
build/parsePreamble.c | 4 ++++
|
||||
build/parseSpec.c | 17 +++++++++++++++++
|
||||
2 files changed, 21 insertions(+)
|
||||
|
||||
diff --git a/build/parsePreamble.c b/build/parsePreamble.c
|
||||
index de205d5..cdd36a4 100644
|
||||
--- a/build/parsePreamble.c
|
||||
+++ b/build/parsePreamble.c
|
||||
@@ -425,6 +425,10 @@ static int isMemberInEntry(Header h, const char *name, rpmTagVal tag)
|
||||
return -1;
|
||||
|
||||
while ((str = rpmtdNextString(&td))) {
|
||||
+ if (!rstrcasecmp(str, "x86_64") && !rstrcasecmp(name, "x86_64_v2")) {
|
||||
+ found = 1;
|
||||
+ break;
|
||||
+ }
|
||||
if (!rstrcasecmp(str, name)) {
|
||||
found = 1;
|
||||
break;
|
||||
diff --git a/build/parseSpec.c b/build/parseSpec.c
|
||||
index 3929c0a..445c994 100644
|
||||
--- a/build/parseSpec.c
|
||||
+++ b/build/parseSpec.c
|
||||
@@ -425,7 +425,24 @@ do { \
|
||||
return PART_ERROR; \
|
||||
} \
|
||||
match = matchTok(exp, s); \
|
||||
+ /* Additional check for x86_64_v2 */ \
|
||||
+ char *s_copy = strdup(s); \
|
||||
+ if (s_copy == NULL) { \
|
||||
+ rpmlog(RPMLOG_ERR, _("Memory allocation error\n")); \
|
||||
+ return PART_ERROR; \
|
||||
+ } \
|
||||
+ char *newline = strchr(s_copy, '\n'); \
|
||||
+ if (newline) *newline = '\0'; \
|
||||
+ char *token_ptr = strtok(s_copy, " "); \
|
||||
+ while (token_ptr != NULL) { \
|
||||
+ if (!match && strcmp(token_ptr, "x86_64") == 0 && strcmp(exp, "x86_64_v2") == 0) { \
|
||||
+ match = 1; \
|
||||
+ break; \
|
||||
+ } \
|
||||
+ token_ptr = strtok(NULL, " "); \
|
||||
+ } \
|
||||
free(exp); \
|
||||
+ free(s_copy); \
|
||||
} while (0)
|
||||
|
||||
|
||||
--
|
||||
2.43.5
|
||||
|
Loading…
Reference in new issue