@pmatilai commented on this pull request.


> @@ -1129,3 +1157,26 @@ rpmSpec rpmSpecParse(const char *specFile, 
> rpmSpecFlags flags,
 {
     return parseSpec(specFile, flags, buildRoot, 0);
 }
+
+rpmRC parseGeneratedSpecs(rpmSpec spec)
+{
+    ARGV_t argv = NULL;
+    int argc = 0;
+    int i;
+
+    char * specPattern = rpmGenPath("%{specpartsdir}", NULL, "*.specpart");
+    if (rpmGlob(specPattern, &argc, &argv) == 0) {
+       for (i = 0; i < argc; i++) {
+           rpmlog(RPMLOG_NOTICE, "Reading %s\n", argv[i]);
+           pushOFI(spec, argv[i]);
+           snprintf(spec->fileStack->readBuf, spec->fileStack->readBufLen,
+                    "# Spec part read from %s\n\n", argv[i]);
+           if (parseSpecSection(spec, 1)) {

Yup. Since parseSpecSection() doesn't actually allocate the spec structure, it 
should return a simple 0/1 error code instead of a pointer.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1485#discussion_r1012592935
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/1485/review/1166436...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to