Skip to content

WIP: coreos-assembler analyze#121

Closed
Promaethius wants to merge 16 commits intocoreos:mainfrom
Promaethius:patch-1
Closed

WIP: coreos-assembler analyze#121
Promaethius wants to merge 16 commits intocoreos:mainfrom
Promaethius:patch-1

Conversation

@Promaethius
Copy link
Copy Markdown

New coreos-assembler command.
Should be run after coreos-assembler init.
Loads a dependency tree to analyze packages to be committed:

Will:

  • Throw exceptions if an interpreted language is detected similar to chromium emerge.
  • Throw warnings if packages existing in minimal/base-layer are dependencies of other packages existing in minimal/base-layer.
  • Provide total package size.
  • Provide misc statistics of packages.

Will-not:

  • Provide package change diffs.
  • Make persistent changes to packages or repos.

Add dnf bindings for python
@jlebon
Copy link
Copy Markdown
Member

jlebon commented Sep 24, 2018

Did you forget a git add maybe? :)

@Promaethius
Copy link
Copy Markdown
Author

@jlebon Possibly! This PR is formatted like a placeholder while I work on the tooling; kind of like how PR113 was created.

@jlebon jlebon added the WIP PR still being worked on label Sep 24, 2018
Promaethius added 7 commits September 24, 2018 15:47
shell script to act as interface between init filesystem and the dnf python program.
analyze.py will take a list of comma separated packages, repos, and output formatting flags.
Added analyze to the build command list
This script uses the libdnf library to download repo metadata into a sack and run queries off of the packages.
Specifically, the tree sizes, repetition, and interpreted language dependencies.
Flesh out the arguments required for dnf-analyze
Continuation
Finished base.conf which searches for .repo files to add in the passed --repo-dir.
Fill sack based off those repos.
@cgwalters
Copy link
Copy Markdown
Member

If you're trying to have this answer questions like "what would the size increase be if I added package foo"...that's going to create a lot of overlap with what rpm-ostree is doing.

I think the best technical approach here is to have an analyze process run on ostree commits. So rather than asking "what if", you just add the package, then do a diff of the resulting ostree commits afterwards.

There's some code for doing things like this in ostree-releng-scripts which we actually include in coreos-assembler today.

rpm-ostree also has a gobject-introspectable shared library for gathering the rpmdb from an ostree commit.

@Promaethius
Copy link
Copy Markdown
Author

Size is just some extra functionality I wanted to throw in. In designing this tool, I'm trying to focus on analyzing package dependencies before they're pulled and committed.

As an example, I found it frustrating using the old SDK to test packages. If there was a perl or python dependency, there'd be a mask rule to block it through ./build_image.sh. Here, we have the chance to run a dependency check before performing a build. This would save time and effort since rpm-ostree wouldn't have to perform work.

Promaethius added 8 commits September 26, 2018 14:28
Implement a node tree which prevents infinite recursive dependency loops.
Class type contains a list of children, a generation number (for printed tree indentation), and pkg_meta which contains dnf.package.Package class.
Display the children in a tree
Reformatted how the hawkey objects are handled.
Query is now global which saves memory space per package.
Miscellaneous corrections.
Global variables and classes.
Changed printChildren to printTree for a cleaner traversal.
Print:
Base packages introduce interpreted dependencies.
Packages which require interpreted dependencies.
Added validation for CLI inputs except for the string representing the package list.
Added exit commands for CLI exceptions and --exit-on
Change log-dir logic to default during validation.
Changed cache dir to system default (prevents having to download metadata twice).
@darkmuggle
Copy link
Copy Markdown
Contributor

@Promaethius what's the status on this PR? Do you want to update this, or should we close it out?

@openshift-ci-robot
Copy link
Copy Markdown

@Promaethius: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

3 similar comments
@openshift-ci-robot
Copy link
Copy Markdown

@Promaethius: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown

@Promaethius: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot
Copy link
Copy Markdown

@Promaethius: PR needs rebase.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@nikita-dubrovskii
Copy link
Copy Markdown
Contributor

nikita-dubrovskii commented Apr 18, 2024

Closing because no updates since 2020

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

Labels

needs-rebase WIP PR still being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants