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

Add support for --updates to mkksiso #1366

Closed

Conversation

jkonecny12
Copy link
Contributor

It would be great way to avoid requirement for HTTP server for local development.

@coveralls
Copy link

coveralls commented Jan 22, 2024

Pull Request Test Coverage Report for Build 7732724437

  • -4 of 8 (50.0%) changed or added relevant lines in 1 file are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 43.665%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/bin/mkksiso 4 8 50.0%
Files with Coverage Reduction New Missed Lines %
src/bin/mkksiso 1 63.96%
Totals Coverage Status
Change from base Build 7700282223: 0.2%
Covered Lines: 1621
Relevant Lines: 3507

💛 - Coveralls

@bcl
Copy link
Contributor

bcl commented Jan 22, 2024

You should already be able to do this by passing --add /path/to/updates/ which will add the updates/ directory and all of its content to the root of the iso.

Having a dedicated command is slightly nicer of course, but it also skips the CheckBigFiles function.

@jkonecny12
Copy link
Contributor Author

Yes, I know but it means that you have to document the approach of how to use this command and it's prone to typos. For that reason I think separate option is better and could be promoted as easy way to develop / debug Anaconda.

I'll add the CheckBigFiles support.

@jkonecny12 jkonecny12 force-pushed the master-mkksiso-updates_image branch 2 times, most recently from f8670dd to d219d3f Compare January 24, 2024 15:13
@jkonecny12
Copy link
Contributor Author

Updated to resolve pending issues.

src/bin/mkksiso Outdated
if updates_image:
cmd.extend(["-map", updates_image, "updates/updates.img"])

if CheckBigFiles(add_paths + [updates_image]):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to check if updates_img is empty, otherwise you end up with [""] (which the tests caught, woo hoo!)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be fixed. Feel free to say if you don't like to have this kind of expression. I like it but might be harder to read for someone.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually like those, but I think having it as an argument to a function call makes the function it harder to read. Even just moving it up and giving it a new variable:

check_paths = add_paths if not updates_image else add_paths + [updates_image]
if CheckBigFiles(check_paths):

is easier, I think.

It would be great way to avoid requirement for HTTP server for local
development.
@jkonecny12 jkonecny12 force-pushed the master-mkksiso-updates_image branch from d219d3f to 6dae539 Compare January 31, 2024 21:39
@bcl
Copy link
Contributor

bcl commented Feb 2, 2024

I tweaked the CheckBigFiles call and rewrote the commit message to be a bit clearer about what this does and merged it locally.
Thanks!

@bcl bcl closed this Feb 2, 2024
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