I am performing an update on a few thousand devices. I have an ArtifactInstall_Enter scripts that install a few python packages. Then uses directory-artifact-gen to install a few files. After this it uses ArtifactInstall_Exit to change permissions on a file.
95% of the devices this all works fine, but occasionally the files that are created be directory-artifact-gen produce aero length files. The update comes back as successful.
If I re-run the same deployment on the device, everything is fine.
Any ideas?
John
Hi @jjsteele,
Not sure I can follow. My first take at understanding is that you are kind of nesting updates. Is that correct? If so, no idea if that ever was tested or even thought of.
Greetz,
Josef
Hi @TheYoctoJester, yes. I needed to install some python packages before some new files. I take it that was the wrong way to do it!
John
@jjsteele well its a surprising take at it for sure. But yeah, I’m kinda sure that this will cause issues.
Greetz,
Josef
@TheYoctoJester Is there a correct way to do it? I shouldn’t listen to CoPilot😀
John
@jjsteele
My workaround would be to always include the files, and then either apply or delete them depending on the state of the device in the ArtifactInstall
stage.
Greetz,
Josef
@TheYoctoJester Last question 
So, I’m installing python packages. Should I package up the.whl files and store them on the device using directory then just pip install them in the ArtifactInstall script.
John
@jjsteele I’m not really familiar with python, so can’t really help too much. My approach would, in a nutshell, be to make the artifact fully self-contained. So whatever you need, eventually as dependency should be in there. Where and how to actually install in the scripts, that’s for you to figure out.
Greetz,
Josef