Directory

If you are trying to figure out how to build 1 artifact that includes your package install script and the 2 packages see this post Mender-convert - Include state scripts in the artifact

You can put everything into the artifact using the directory module and mender-artifact cmd. Mender-client runs scripts if they match certain names @lluiscampos mentioned in the link https://docs.mender.io/artifact-creation/state-scripts#transitions-and-ordering e.g. ArtifactInstall_Leave_01_install_hitesh53G_pkg