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

Invalid name prevents install/upgrade #4

Open
erlanger opened this issue Oct 10, 2018 · 2 comments
Open

Invalid name prevents install/upgrade #4

erlanger opened this issue Oct 10, 2018 · 2 comments

Comments

@erlanger
Copy link

Hi @olsky,

Installs of the pack are failing:

?- pack_install('https://github.com/olsky/swi-mqtt-pack/archive/1.0.7.zip',[upgrade(true)]).
false.

The main problem is that SWI prolog (when using github) expects the repository name to match the pack name, and therefore it fails because swi-mqtt-pack is different from mqtt which is the pack name.

Either the repository or the pack name needs to be renamed. The only characters allowed in a pack name are 0-9a-zA-Z and _ (to prevent shell injection). So the dashes in swi-mqtt-pack also cause problems.

A solution:

Perhaps mqtt_pl would be a good choice for both the repository and the pack.

  • To rename the repository: Go to the settings tab of the repository, put mqtt_pl and click rename.
  • To rename the pack: change the name in pack.pl: name(mqtt_pl).
  • To enable automatic upgrades, update the download link (in pack.pl) to:
    download('https://github.com/olsky/mqtt_pl/releases/*.zip').
@olsky
Copy link
Owner

olsky commented Oct 10, 2018

Hi, I was not aware of problems with naming. Changing repo name will lead to changes on the swi-prolog packs side.

How about to change the pack name from 'mqtt' to 'swi-mqtt-pack' in the pack.pl file?

@erlanger
Copy link
Author

erlanger commented Oct 10, 2018

That won't work, because dashes '-' are not allowed in a pack name.

I can't see any way to solve it without causing changes on the swi-prolog packs side.

Even if you change the repo name form swi-mqtt-pack to mqtt, it will need manual intervention on the swi-prolog pack side because the url has changed and the security checks will not allow the change.

@JanWielemaker, do you see any other way to fix this?

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

No branches or pull requests

2 participants