Skip to content

Conversation

@ghost
Copy link

@ghost ghost commented Jan 14, 2024

Related to #416, but don't explain it.
This PR just handle a system image as invalid instead of crashing when :

For now, only IMG-e-1.18-t-20231207360613-stable-FP5.zip is known to be in the second case, and it's a very strange installation package, OAI cannot handle that for now (related to #288 ?), so the file is shown as invalid.
Maybe we can explain it with more details to the user?

@tsterbak
Copy link
Member

Nice! I updated the branch to be in sync with the refactoring of the logic of image validation and error messages. Can you have a quick look again, if this is in your sense. Then I merge it :)

@ghost
Copy link
Author

ghost commented Jan 14, 2024

Uh, your commit broke it. I will investigate.
PS : I was not aware of this other PR, I like it!

@tsterbak
Copy link
Member

tsterbak commented Jan 14, 2024

Uh, your commit broke it. I will investigate.

Ah sorry for breaking it... I guess I know what went wrong: it should return dict() and not dict. I missed to add this correctly...

@ghost
Copy link
Author

ghost commented Jan 14, 2024

I looked at it. The problem comes from the fact that the first instruction of image_works_with_device() is calling retrieve_image_metadata() : it tries to find metadata, then fails in the case it's not a zip file.
It's written in the logs, but there is no way to send this information to the first called function : then, the showed message is the same as a file without metadata (because the second function only send an empty dictionary)... But it shouldn't.

How do we handle that?

@tsterbak
Copy link
Member

I tried to handle it, now it should work smoothly.

Let me know what you think :)

@ghost
Copy link
Author

ghost commented Jan 15, 2024

Yes, it works, !

@tsterbak tsterbak requested review from tsterbak and removed request for tsterbak January 15, 2024 17:34
@tsterbak tsterbak merged commit 40c9838 into openandroidinstaller-dev:dev Jan 15, 2024
@ghost ghost deleted the zip branch January 23, 2024 20:15
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.

1 participant