How to update a pack with a relocated source location

Greetings!

I’ve cut a 1.0 release for pack(tokenize): https://github.com/shonfeder/tokenize/releases/tag/v1.0.0 .

However, I have changed github accounts since the initial versions were released. Now, when I try to register the new version by installing from the new source, I get:

?- pack_install('https://github.com/shonfeder/tokenize/archive/v1.0.0.zip').
Verify package status (anonymously)
	at "https://www.swi-prolog.org/pack/query" Y/n? 
% Contacting server at https://www.swi-prolog.org/pack/query ...
ERROR: Server reported the following error:
ERROR: No permission to register pack(tokenize) `'https://github.com/shonfeder/tokenize/archive/v1.0.0.zip''

This makes sense, in order to prevent packages form getting overwritten by randos. Fortunately, I still have my original github account. So I forked the pack back to that account, and tried to sync the release by installing from there. That seemed to work:

?- pack_install('https://github.com/aBathologist/tokenize/archive/v1.0.0.zip').
Verify package status (anonymously)
	at "https://www.swi-prolog.org/pack/query" Y/n? 
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
% "v1.0.0.zip" was downloaded 2 times
Package:                tokenize
Title:                  A simple tokenization library
Installed version:      1.0.0
Author:                 Shon Feder <shon.feder@gmail.com>
Maintainer:             Shon Feder <shon.feder@gmail.com>
Packager:               Shon Feder <shon.feder@gmail.com>
Home page:              https://github.com/shonfeder/tokenize
Download URL:           https://github.com/shonfeder/tokenize/release/*.zip
Install "tokenize-1.0.0.zip" (16,003 bytes) Y/n? 
% % PL-Unit: tokenize 

In fact, the first time I did this, the swi pack(tokenize) page was even updated, and I could see the new version and the changes to the source etc.

However, shortly thereafter, the pack page was reverted.

Could someone provide some guidance on how I can update the pack to point to the new location and get the new release to stick?

Thanks!

It takes a while before both backend servers and the CDN pick up the new value. I see consistent 1.0.0 now. I necessary it is possible to change the URL of the package.

1 Like

Thanks, @jan. I see it now too! It threw me off that it had propagated at first, but then seemed to disappear. Perhaps it was just taking some time to work itself out. I apologize for noise from my impatience!

The latest version does indeed seem to reflect the changes source URL, so I am hopeful future updated will go through without a hitch.

Many thanks for the quick reply!

@jan I was hoping that once I had updated the pack information with the newer github url, I would be able to use the new home for updates. But I still get the error:

No permission to register pack(tokenize) `'https://github.com/shonfeder/tokenize/archive/v1.0.1.zip''

I’m therefore guessing that additional steps are needed, and that your last sentence reads

indicating that it is possible to change the URL of the package, but that it will take some extra work on the side of the swi website.

Is it possible to make this change? If there’s something I can do to effect it (or to make effecting it easy), I’m happy to help any way I can.

The new URL should be the one associated with the shonfeder (Shon Feder) · GitHub account (as listed on the current package page for Home page and Download URL: "tokenize" pack for SWI-Prolog

Set to https://github.com/shonfeder/tokenize/*

1 Like

Perfect. It’s working as expected now. Thanks, @jan!