Did you know ... Search Documentation:
pack.pl
PublicShow source
Source pack_query(+Request)[private]
Handle package query requests from remote installers. Content is of type application/x-prolog. Reply is also a Prolog term.
Source proxy_master(Request)[private]
Proxy the request to the master to make sure the central package database remains synchronised.
Source pack_query(+Query, +Peer, -Reply)[private]
Implements the various queries from the pack_install/1. Currently defined Query values are:
install(+URL, +SHA1, +Info)
User tries to install from URL an object with the indicated hash and Info.
locate(+Pack)
Query download locations for Pack. Same as locate(archive, Pack).
search(+Keyword)
Find packs that match Keyword.
Source pack_delete(+Request)[private]
HTTP handler to delete a pack
Source install_info(+URL, +SHA1, -Info, +Seen) is nondet[private]
Info is relevant information for the client who whishes to install URL, which has the given SHA1 hash. Currently provided info is:
alt_hash(Downloads, URLs, Hash)
Another file with the same (base) name was registered that has a different hash. This file was downloaded Downloads times, resides on the given URLs (a list) and has the given Hash.
downloads(Downloads)
This hash was downloaded Downloads times from a unique IP address
dependency(Token, Pack, Version, URLs, SubSeps)
The requirement Token can be provided by Pack@Version, which may be downloaded from the given URLs (a list). Pack has install info as specified by SubSeps (recursive dependencies)
Source pack_version_hashes(+Pack, -VersionHashesPairs) is semidet
True when HashesByVersion is an ordered list Version-Hashes, latest version first.
Source pack_version_urls(+Pack, -Locations) is nondet
True when Locations is a set of Version-list(URL) pairs used for installing Pack.
Arguments:
Locations- is a list Version-URLs, sorted latest version first.
To be done
- Handle versions with multiple hashes!
Source search_packs(+Search, -Packs) is det[private]
Search packs by keyword, returning a list
pack(Pack, Status, Version, Title, URLs).
Source delete_pack(+PackName) is det[private]
Remove a pack from the database.
Source delete_hash(Hash) is det[private]
Remove Hash from the database
Source save_request(+URL, +SHA1, +Info, +Peer)[private]
Update the database with the given information. We only update if the request is new, which means the same SHA1 has not been downloaded from the same Peer.
Source accept_url(+URL, +Pack, +IsGit) is det[private]
True when URL is an aceptable URL for Pack. We only register this on the first submission of a pack.
Source set_allowed_url(+Request)[private]
Set the URL pattern for a pack.
Source register_pack(+SHA1, +Pack) is det[private]
Source register_url(+SHA1, +IsGIT, +URL) is det[private]
Register we have that data loaded from URL has signature SHA1.
Source is_github_release(+URL) is semidet[private]
True when URL reflects a GitHub release pack download. These have the unpeleasant habbit to change exact content.
Source hash_git_url(+SHA1, -GitURL) is semidet
True when SHA1 was installed using GIT from GitURL.
Source hash_file_url(+SHA1, -FileURL) is nondet
True when SHA1 was installed using GIT from GitURL.
Source pack_url_hash(?URL, ?Hash) is nondet
True when Hash is the registered hash for URL.
Source pack(?Pack) is nondet
True when Pack is a currently known pack.
Source pack_list(+Request)[private]
List available packages.
Source pack_table(+Packs, +Options)// is det
Show a table of packs.
Source current_pack(+Filter:list, -Pack) is nondet
True when Pack is a pack that satisfies Filter. Filter is a list of filter expressions. Currently defined filters are:
author(+Author)
Pack is claimed by this author.
Source sort_packs(+Field, +Packs, -Sorted)
Source pack_latest_version(+Pack, -SHA1, -Version, -OlderCount)[private]
True when SHA1 is the latest version of Pack at the given Version and there are OlderCount older versions.
Source pack_info(+Pack)//[private]
Provided detailed information about a package.
To be done
- provide many more details
- Show dependency for requirements/provides
Source pack_info_table(+Pack)// is det[private]
Provide basic information on the package
Source pack_file_table(+Pack)// is det[private]
Provide a table with the files, sorted by version, providing statistics on downloads.
Source pack_file_details(+Request)[private]
HTTP handler to provide details on a file in a pack