[Rpm-maint] [rpm-software-management/rpm] Add "local_generator" (PR #2734)
Panu Matilainen
notifications at github.com
Tue Feb 13 13:57:42 UTC 2024
@pmatilai commented on this pull request.
> if (rpmGlob(attrPath, NULL, &files) == 0) {
- nattrs = argvCount(files);
- fc->atypes = xcalloc(nattrs + 1, sizeof(*fc->atypes));
- for (int i = 0; i < nattrs; i++) {
- char *bn = basename(files[i]);
- bn[strlen(bn)-strlen(".attr")] = '\0';
- fc->atypes[i] = rpmfcAttrNew(bn);
- }
- fc->atypes[nattrs] = NULL;
- argvFree(files);
+ nfiles = argvCount(files);
+ }
+ for (int i = 0; i < nfiles; i++) {
+ char *bn = basename(files[i]);
+ bn[strlen(bn)-strlen(".attr")] = '\0';
+ argvAddUniq(&all_attrs, bn);
The files coming out of rpmGlob() are unique already, you don't need argvAddUniq() here. What I meant is that you could simply use the argv coming from rpmGlob() and argvAddUniq() the local stuff to that.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2734#pullrequestreview-1878019777
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/2734/review/1878019777 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20240213/31136fe7/attachment.html>
More information about the Rpm-maint
mailing list