Skip to content

Commit

Permalink
FIXED: Package manager, swipl pack publish .
Browse files Browse the repository at this point in the history
Broken detection of git directory and failure do deal with

     requires(prolog:flag(_Value)).

to test for _existence_ of a Prolog flag.
  • Loading branch information
JanWielemaker committed Sep 24, 2024
1 parent 2f19749 commit 4eb3482
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions library/prolog_pack.pl
Original file line number Diff line number Diff line change
Expand Up @@ -1688,7 +1688,9 @@
% system.

is_prolog_token(Token), cmp(Token, prolog, _Cmp, _Version) => true.
is_prolog_token(prolog:_Feature) => true.
is_prolog_token(prolog:Feature), atom(Feature) => true.
is_prolog_token(prolog:Feature), flag_value_feature(Feature, _Flag, _Value) =>
true.
is_prolog_token(_) => fail.

%! prolog_satisfies(+Token) is semidet.
Expand Down Expand Up @@ -1716,7 +1718,8 @@

flag_value_feature(Feature, Flag, Value) :-
compound(Feature),
compound_name_arguments(Feature, Flag, [Value]).
compound_name_arguments(Feature, Flag, [Value]),
atom(Flag).


/*******************************
Expand Down Expand Up @@ -1810,7 +1813,6 @@
dir_metadata(GitDir, Info) :-
directory_file_path(GitDir, 'pack.pl', InfoFile),
read_file_to_terms(InfoFile, Info, [encoding(utf8)]),
must_be(ground, Info),
maplist(valid_term(pack_info_term), Info).

%! download_file_sanity_check(+Archive, +Pack, +Info) is semidet.
Expand Down Expand Up @@ -2156,7 +2158,8 @@
url_scheme(URL, Scheme) :-
atom(URL),
uri_components(URL, Components),
uri_data(scheme, Components, Scheme).
uri_data(scheme, Components, Scheme),
atom(Scheme).

download_scheme(http).
download_scheme(https).
Expand Down

0 comments on commit 4eb3482

Please sign in to comment.