[Rpm-maint] [rpm-software-management/rpm] rpmte: Move dependencies into an unordered_map (PR #3538)
Panu Matilainen
notifications at github.com
Wed Feb 5 07:53:57 UTC 2025
@pmatilai commented on this pull request.
> @@ -85,22 +77,22 @@ struct rpmte_s {
rpmfs fs;
};
+/* Does not include RPMTAG_NAME as it needs special handling */
Doing it with a magic flag certainly looks wrong, it does nothing but obfuscates. The way to put such a thing into a data structure is putting all the data into the structure, including functions to call (in this case the function signatures match) , eg:
```
{ { RPMTAG_NAME, RPMTAG_PROVIDENAME, RPMSENSE_EQUAL, rpmdsThisPool},
{ RPMTAG_PROVIDENAME, RPMTAG_PROVIDENAME, 0, rpmdsNewPool },
{ RPMTAG_REQUIRENAME, RPMTAG_REQUIRENAME, 0, rpmdsNewPool },
...
}
```
It looks dumb and repetitive but then it's just easy to follow data and then the code is really simple and free of any conditionals.
But shrug, I too missed the difference with rpmdsThisPool/rpmdsNewPool entirely, going back to the earlier version is fine - this really isn't worth all this time and energy spent by now.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3538#discussion_r1942392068
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/pull/3538/review/2594878331 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20250204/f1fe3bd6/attachment.htm>
More information about the Rpm-maint
mailing list