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

Explicit error for compressed Artifacts #84

Merged
merged 2 commits into from
Sep 30, 2024

Conversation

danielskinstad
Copy link
Collaborator

No description provided.

Copy link
Collaborator

@larsewi larsewi left a comment

Choose a reason for hiding this comment

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

🚀

core/src/mender-artifact.c Outdated Show resolved Hide resolved
Copy link
Collaborator

@vpodzime vpodzime left a comment

Choose a reason for hiding this comment

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

Looks good to me otherwise.

core/src/mender-artifact.c Outdated Show resolved Hide resolved
@@ -204,6 +221,12 @@ mender_artifact_process_data(mender_artifact_ctx_t *ctx,
/* Parse data */
do {

/* We do not support compressed artifacts */
if (is_compressed(ctx->file.name)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this derived from the URL?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The file name? That comes from the payload

core/src/mender-client.c Outdated Show resolved Hide resolved
Ticket: MEN-7528

Signed-off-by: Daniel Skinstad Drabitzius <[email protected]>
Avoids division by zero errors if you're e.g. using a really small dummy
artifact

Ticket: None

Signed-off-by: Daniel Skinstad Drabitzius <[email protected]>
if (((index * 10) / size) > download_progress) {
download_progress = (index * 10) / size;
mender_log_info("Downloading '%s' %zu0%%... [%zu/%zu]", type, download_progress, index, size);
if (size > 0) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Thanks

@danielskinstad danielskinstad merged commit 4e1c4e8 into mendersoftware:main Sep 30, 2024
1 check passed
@danielskinstad danielskinstad deleted the compression-error branch September 30, 2024 13:56
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.

4 participants