I think I posted before about this issue in the forum.
Hopefully, the following is a more complete report.
Behaviour:
I am trying to install bio_db (4.8) which in its pack.pl includes: “requires(lib)”.
I have latest lib installed in my system. But I still get
(a) a request to install it, and
(b) a “fail” if I say i don’t like the installation plan
στοικός;~% swipl
% /home/nicos/.rcpl compiled 0.00 sec, 8 clauses
Welcome to SWI-Prolog (threaded, 64 bits, version 10.1.9-12-g05068fb7d)
SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software.
Please run ?- license. for legal details.
For online help and background, visit https://www.swi-prolog.org
For built-in help, use ?- help(Topic). or ?- apropos(Word).
13 ?- pack_remove(bio_db).
% Removing '/home/nicos/.local/share/swi-prolog/pack/bio_db' and contents
true.
14 ?- pack_property( lib, version(V) ).
V = '2.11'.
15 ?- pack_install('https://stoics.org.uk/~nicos/sware/packs/bio_db/bio_db-4.8.tgz').
Installation plan:
Install bio_db at version 4.8 from https://stoics.org.uk/~nicos/sware/packs/bio_db/bio_db-4.8.tgz
Download packs? Y/n?
% Downloading bio_db ... 217,635 bytes
% Found new dependencies after downloading ([lib]).
% Contacting server at https://www.swi-prolog.org/pack/query ... ok
Installation plan:
Keep bio_db at version 4.8
Install lib at version 2.11 as dependency for [bio_db] from https://stoics.org.uk/~nicos/sware/packs/lib/lib-2.11.tgz (downloaded 126 times)
Download packs? Y/n?
false.
Desired:
(a) the system checks for the installed packs to satisfy dependencies
(b) there is a 3rd option of only installing the requested pack, without the dependencies
(like when removing a pack with dependencies; where is asked for remove all, or just the requested one)
Technical:
According to comment in download_plan/3:
%! download_plan(+Targets, +Plan, +Options) is semidet.
%
% Download or update all packages from Plan. We need to do this as a
% first step because we may not have (up-to-date) dependency
% information about all packs. For example, a pack may be installed at
% the git HEAD revision that is not yet know to the server or it may
% be installed from a url that is not known at all at the server.
This shouldn’t apply here.
The local installation is the official version from the server, the pack will be installed from a published static tgz. So it should not be in the Plan or given that download_plan/2 knows that it is installed at latest version, should not proceed with suggesting request.
At the very least, the user should have an option to ignore dependencies so the requested pack can be installed.
Tiny typo in prolog_pack.pl: “that is not yet know to the server” → “that is not yet known to the server”
Note, that the more annoying scenario is when the local version of “lib” is a private newer version, in which case re-installing the public version needs to be following by re-installing the local version.
Regards,