[Rpm-maint] [rpm-software-management/rpm] Clarify %check script use-case by executing it before %install (#1618)
Panu Matilainen
notifications at github.com
Wed Apr 7 13:47:59 UTC 2021
> However it is currently the best (least worst?) place to do that. Any other solution we've been experimenting for the past 2 years is unstable, does not support multiple architectures, and suffers from usability issues.
Ouch. If `%check` is the least worst place to run tests it's a little sorry state of affairs, in this day and age. OTOH, simplicity is a virtue. In Finland we have this proverb "works like the train toilet" meaning something so simple and crude it can barely fail at all. "A hook to run a shell script"... :sweat_smile:
It *is* broken though, just in a different manner. Now, this PR would likely be only half the story (the stick), and the other half would probably have to be the carrot:
We don't want to break the *intended* use of `%check` which is running the in-source tests, but maybe we could add a separate slot (akin to autotools `installcheck`) that by definition runs after `%install` but protects the buildroot one way or the other. One possibility could be automatically copying the buildroot content to some arbitrary location and diverting $RPM_BUILD_ROOT to that directory. Or it could be after finishing the package build, but that has other issues in turn.
Also note that we already have a mechanism to allow inspecting generated packages: `%_build_pkgcheck`. Another notoriously undocumented feature...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/1618#issuecomment-814928475
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210407/83e2a32c/attachment-0001.html>
More information about the Rpm-maint
mailing list