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

Avoid unnecessary package building with -b by removing duplicate options and dependencies #1064

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

patmaddox
Copy link
Contributor

Duplicate options e.g. "+FOO +FOO" was causing the wanted and remote options comparison to fail, causing poudriere to build packages unnecessarily.

Duplicate dependencies e.g. "foo/bar foo/bar" was causing the wanted and remote deps comparison to fail, causing poudriere to skip packages.

Building this list of 59 ports with -n:

before:

[131amd64-default] [2023-07-27_00h07m28s] [load_priorities:] Queued: 721 Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 263 Tobuild: 458 Time: 00:00:41

after:

[131amd64-default] [2023-07-27_00h21m24s] [load_priorities:] Queued: 716 Built: 0 Failed: 0 Skipped: 0 Ignored: 0 Fetched: 701 Tobuild: 15 Time: 00:03:40

ftp/curl is a good example:

[00:00:12] [Dry Run] Package fetch: Skipping libssh2-1.11.0,3: options wanted: -GCRYPT -TRACE +ZLIB
[00:00:12] [Dry Run] Package fetch: Skipping libssh2-1.11.0,3: options remote: -GCRYPT -GCRYPT -TRACE -TRACE +ZLIB +ZLIB
...
[00:00:13] [Dry Run] Package fetch: Skipping meson-1.1.1: deps wanted: ninja-1.11.1,2 python39-3.9.17
[00:00:13] [Dry Run] Package fetch: Skipping meson-1.1.1: deps remote: ninja-1.11.1,2 ninja-1.11.1,2 python39-3.9.17 python39-3.9.17

@patmaddox patmaddox changed the title Avoid unnecessary package building with -b by removing duplicate options and dependencies from respective variables Avoid unnecessary package building with -b by removing duplicate options and dependencies Jul 27, 2023
@patmaddox
Copy link
Contributor Author

This issue is not due to an error in the script, but because pkg-rquery is returning duplicates:

$ pkg rquery '%n %Ok %Ov' libssh2 # src/share/poudriere/common.sh:3834
libssh2 GCRYPT off
libssh2 TRACE off
libssh2 ZLIB on
libssh2 GCRYPT off
libssh2 TRACE off
libssh2 ZLIB on

$ pkg rquery '%n %dn-%dv' meson # src/share/poudriere/common.sh:3838
meson python39-3.9.17
meson ninja-1.11.1,2
meson python39-3.9.17
meson ninja-1.11.1,2

Duplicate options e.g. "+FOO +FOO" was causing the wanted and remote
options comparison to fail, causing poudriere to build packages
unnecessarily.

Duplicate dependencies e.g. "foo/bar foo/bar" was causing the wanted
and remote deps comparison to fail, causing poudriere to skip packages.
@igalic
Copy link
Contributor

igalic commented Jul 29, 2023

see freebsd/pkg#2164

@bapt bapt merged commit b4c9458 into freebsd:master Nov 7, 2023
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants