Hello @pmatilai,
I work at Meta with @chantra and @malmond77 . I am implementing the new API for
the RPM CoW plugin based on your comment. This is what I have implemented so
far:
I defined 2 new fields of type `rpmPlugin` (with associated getters and
setters) in `rpmte` structure:
-
[`customArchiveReader`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/rpmte.c#L85)
-
[`customFileInstaller`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/rpmte.c#L86)
When a plugin wants to register as an archive reader for a package, it sets the
field `customArchiveReader` in the [`psm_pre`
](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/plugins/reflink.c#L165)stage.
Similarly, if it wants to register as a file installer it sets the
`customFileInstaller` field.
Then in
[`fsm.c`](https://github.com/rphibel/rpm/blob/8de078508954e005ba0c974389979070cfe9431d/lib/fsm.c#L849),
if these fields are set, archive reading, file installation is deferred to the
plugin.
Here is the code:
https://github.com/rphibel/rpm/compare/cow_denylist_rebased...cow_denylist_refactoring
Could you please let me know if this is what you had in mind?
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/discussions/2057#discussioncomment-4633129
You are receiving this because you are subscribed to this thread.
Message ID:
<rpm-software-management/rpm/repo-discussions/2057/comments/4633...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint