[Rpm-maint] [rpm-software-management/rpm] Move checks and package initialization after build (PR #2646)
Panu Matilainen
notifications at github.com
Tue Oct 10 11:56:48 UTC 2023
@pmatilai commented on this pull request.
> + rpmRC rc = RPMRC_FAIL;
+
+ /* XXX Skip valid arch check if not building binary package */
+ if (!(spec->flags & RPMSPEC_ANYARCH) && checkForValidArchitectures(spec)) {
+ goto exit;
+ }
+
+ fillOutMainPackage(spec->packages->header);
+ /* Define group tag to something when group is undefined in main package*/
+ if (!headerIsEntry(spec->packages->header, RPMTAG_GROUP)) {
+ headerPutString(spec->packages->header, RPMTAG_GROUP, "Unspecified");
+ }
+
+ char *platform = rpmExpand("%{_target_platform}", NULL);
+ char *os = rpmExpand("%{_target_os}", NULL);
+ char *optflags = rpmExpand("%{optflags}", NULL);
These are still causing the warnings I mentioned earlier:
```
/home/pmatilai/repos/rpm/build/parseSpec.c: In function ‘finalizeSpec’:
/home/pmatilai/repos/rpm/build/parseSpec.c:1160:5: warning: ‘platform’ may be used uninitialized [-Wmaybe-uninitialized]
1160 | free(platform);
| ^~~~~~~~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1121:11: note: ‘platform’ was declared here
1121 | char *platform = rpmExpand("%{_target_platform}", NULL);
| ^~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1161:5: warning: ‘os’ may be used uninitialized [-Wmaybe-uninitialized]
1161 | free(os);
| ^~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1122:11: note: ‘os’ was declared here
1122 | char *os = rpmExpand("%{_target_os}", NULL);
| ^~
/home/pmatilai/repos/rpm/build/parseSpec.c:1162:5: warning: ‘optflags’ may be used uninitialized [-Wmaybe-uninitialized]
1162 | free(optflags);
| ^~~~~~~~~~~~~~
/home/pmatilai/repos/rpm/build/parseSpec.c:1123:11: note: ‘optflags’ was declared here
1123 | char *optflags = rpmExpand("%{optflags}", NULL);
| ^~~~~~~~
```
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2646#pullrequestreview-1667419879
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2646/review/1667419879 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20231010/698f1ecb/attachment-0001.html>
More information about the Rpm-maint
mailing list