-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fixes and improvements to scripts for working with cyclic dependencies #20513
base: master
Are you sure you want to change the base?
Conversation
9b5068d
to
4317575
Compare
59138be
to
c820cc0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It took me an hour to review this and I'm still not clear on what the new behavior is. We should not merge this until the code and comments are clear enough that reading it in one pass leaves you with a truthy understanding of the build order computation.
(I think it's a mistake to keep hacking on this without stepping back to think about how this code should be and how your changes get us closer. Not trying to block, because I think it's possible to get this to a state where it's better to merge it than not, but then we should have that conversation right after this.)
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
3dab149
to
d46835f
Compare
6b39ff1
to
5890600
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work Max.
3d4da7f
to
d9fce7e
Compare
2d349ba
to
2586581
Compare
Hello, I greatly appreciate the work that Maxython has done in this PR to enable the docker container stop termux-package-builder
docker container rm termux-package-builder
docker image rm ghcr.io/termux/package-builder:latest
git clone https://github.com/termux/termux-packages.git
cd termux-packages/
scripts/run-docker.sh ./build-package.sh libepoxy On the other hand, unfortunately, it appears that there might be a problem when using the same command in a clone of the repository that has this PR applied to it (with the exception of the docker container stop termux-package-builder
docker container rm termux-package-builder
docker image rm ghcr.io/termux/package-builder:latest
git clone https://github.com/termux/termux-packages.git
cd termux-packages/
curl https://patch-diff.githubusercontent.com/raw/termux/termux-packages/pull/20513.diff | git apply -v --exclude=packages/glib/build.sh
scripts/run-docker.sh ./build-package.sh libepoxy since when I use those commands, I see this:
It looks to me like the scripts/run-docker.sh ./build-package.sh libx11 libglvnd libepoxy I will troubleshoot this and try to find if there is any alternative or workaround possible to this situation in order to automatically detect the required dependencies at all times. |
2586581
to
52b1cc8
Compare
0db2fc4
to
c8325a0
Compare
c45965f
to
c7976ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This review is only pertaining to commit c7976ec.
This is pretty much unreviewable.
843 lines changed in a single commit is one hell of a lot to ask.
The specific pieces I have commented on in this review are by no means exhaustive, but I do not have 2-3 hours to review one commit.
I may be coming back to this later and do more incremental review,
but the amount of nesting in the code makes it exceedingly difficult to follow.
Please consider inverting some of the deeply nested conditionals into guard clauses so they can be mentally discarded after they are passed.
7e4fff3
to
fa6bcc3
Compare
- remove_char(var): removes unnecessary characters when parsing values - parse_build_file_variable(path, var): returns the value of a variable from the specified source - has_prefix_glibc(pkgname): checks if the package name has the prefix "glibc"
scripts/buildorder.py: - the algorithm of the function `generate_full_buildorder` has been changed, now it can work with cyclic dependencies - added new flag `-l` and function `get_list_cyclic_dependencies` which allows to find cyclic dependencies - for subpackages a new variable `depend_on_parent` has been added which allows disabling dependencies on the parent package (controlled via the variable `TERMUX_SUBPKG_DEPEND_ON_PARENT`) - updated logic of variable `only_installing`, now package dependency (with this variable) from variable `pkg_deps` will be used - added the ability to control the `only_installing` variable for subpackages via the `TERMUX_SUBPKG_DEPEND_ON_PARENT` variable - updated logic of the `recursive_dependencies` function, now only dependencies of the requested package will be returned during non-fast build scripts/build/termux_step_get_dependencies.sh: - removed `-s` flag when compiling dependencies to fix cyclic dependencies - fixed running of `termux_download_repo_file` function when cyclic dependencies are detected build-package.sh: the algorithm that launches the signing key settings has been changed, now it will be launched if the value from the `TERMUX_REPO_PACKAGE` variable and from `TERMUX_APP_PACKAGE` match build-all.sh: removed default `-s` flag when compiling packages and added check for compiled packages
- added the ability to change the package format - added library base check by package name - the method of saving processes in the logo has been changed
Virtual packages are packages that are compiled and installed into the system, but are not assembled into a source package for package managers. One advantage of virtual packages is that they can use sources (including values from configured variables) from regular packages. This will allow us to easily create special virtual packages that will have to resolve cyclic dependencies in regular packages. [no ci]
fa6bcc3
to
45fe9d9
Compare
Perhaps some local functions could be created in some places, but is it worth it to make the code more readable? It is worth noting that the commit highlights a large number of changed lines due to new conditions added to large algorithms (but in essence they did not change that much) for the correct operation of the collector. |
close #20338 - it is not possible to compile all packages using
build-all.sh
becausebuildorder.py
cannot create build orders with circular dependencies.There is also a solution to part of problem #20500:
There are also minor changes, all details are in the commit.
CC @tstein @TomJo2000