Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move run-depends out of bulk and into testport #1192

Open
1 task done
svmhdvn opened this issue Dec 11, 2024 · 0 comments
Open
1 task done

Move run-depends out of bulk and into testport #1192

svmhdvn opened this issue Dec 11, 2024 · 0 comments

Comments

@svmhdvn
Copy link
Contributor

svmhdvn commented Dec 11, 2024

Prerequisites

  • Have you checked for an existing issue describing your idea?

What is your proposal?

As I understand from #522 and #524, the reason why poudriere bulk installs a port's (say X) RUN_DEPENDS (say Y) before building it is to prevent producing a broken X when Y fails to install, thereby preventing the issue from occurring on consumers of the repo produced by Poudriere.

As I see it, these RUN_DEPENDS are not actually used to build the ports, only to ensure that the port installs correctly (at install time for the consumers of the repo). If X is never used as a BUILD_DEPENDS for another port, then Y will never really be required at poudriere bulk build time. The success of Y's installation as a prerequisite for installing X is essentially a "runtime test", which I believe can be handled by the poudriere testport or by the -t option of poudriere bulk.

The proposal is to move run-depends out of bulk and instead move this behaviour to poudriere testport or poudriere bulk -t (as an opt-in mechanism), which can be used to ensure that the port is not broken due to installation issues of its RUN_DEPENDS.

What is the existing behavior, if any?

The existing behaviour is to do the run-depends target before building. As I understand, the behaviour starts at this line:

# XXX: run-depends can come out of here with some bsd.port.mk
# changes. Easier once pkg_install is EOL.
targets="check-sanity pkg-depends fetch-depends fetch checksum \
extract-depends extract patch-depends patch build-depends \
lib-depends configure build run-depends stage package"

What is the motivation / use case for the change?

poudriere-bulk performance improvement in the following cases:

  • It is significantly more common for dependent ports to install correctly after they have successfully been built. Thus, this would avoid a common unnecessary step in most cases (and can be easily recovered by using the opt-in poudriere testport and poudriere bulk -t methods proposed, or by the opt-out alternative discussed below.
  • This avoids running pkg-post-install and pkg-pre-deinstall scripts, which have performance penalties of their own due to running arbitrary commands inside the jail environment (or in some cases, are broken due to assuming certain preconditions about the runtime installation environment that are possibly different than the intended user/consumer environment)
  • Installation commands are usually single-threaded/serialized and therefore add delay to the bulk build.

Did you consider any alternatives?

Another more conservative alternative is to make poudriere bulk -k opt-out of run-depends and instead keep the existing behaviour of running run-depends in default invocations of poudriere bulk.

Is this really a ports feature request?

Not as far as I understand it, correct me if I'm wrong.

Example

N/A

Additional context

N/A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant