martinpaljak / GlobalPlatformPro

🌐 🔐 Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
https://javacard.pro/globalplatform
GNU Lesser General Public License v3.0
679 stars 210 forks source link

GPPro now fails for applet reinstall one-liner #251

Closed ph4r05 closed 3 years ago

ph4r05 commented 3 years ago

Feature request

Previous versions of GPPro enabled to reinstall an applet in the following way:

gp --delete PACKAGE_AID --install applet.cap

The GPPro globalplatformpro:20.08.12 fails.

gp --delete APPLET_AID
gp --delete PACKAGE_AID
gp --install applet.cap

I was thinking whether there is a simple way of reinstalling the applet without either listing applets and removing all deps manually or without calling --delete on everything and ignoring the result.

The idea is to use it in scripts (bash, gradle plugins) without adding complicated logic on applet removal when we just need to reinstall the applet.

Would it be maybe possible to add --reinstall switch that would do the removal logic? Or adding something like --ignore-delete-error that would ignore the error and proceed with the --install correctly?

Thanks for the suggestions.

martinpaljak commented 3 years ago

Does this relate to #142 ?

ph4r05 commented 3 years ago

Does this relate to #142 ?

The command returns the exit code properly, so I would say it is not related.

ph4r05 commented 3 years ago

Potential workaround for reinstall one-liner

gp --uninstall applet.cap --install applet.cap