diff options
author | merakor <cem@ckyln.com> | 2020-11-01 18:32:21 +0000 |
---|---|---|
committer | merakor <cem@ckyln.com> | 2020-11-01 18:32:21 +0000 |
commit | e6c3a8bb955ad76aaf2f40472f3d675e494106a8 (patch) | |
tree | e5750399fa919ea4abd7a3943a03d3ecb869ceb2 /tools/cpt-install | |
parent | c5843a6907de84fad553cb3e4d3f080f55e78945 (diff) | |
download | cpt-e6c3a8bb955ad76aaf2f40472f3d675e494106a8.tar.gz |
Make cpt accept package paths (*/package)
This new implementation idea makes it possible for a user to specify a full-path
(or a relative path) to a package directory in order to use it as the main
package directory. This will hopefully make it to the next version, while at
this point I don't have any issues with packages, I am sure this will require
some fixes until it will be merged to the master branch.
Overall, this shouldn't add some extra complexities to the package manager, the
only "big" change was on 'pkg_find()', and returning a full path is much faster
than going through all of the repositories to find a match.
Core functionality change:
pkg_find():
If pkg_find receives a path to some package, instead of searching for the
$CPT_PATH, it will echo it back.
NOTE:
Even if there is a package on the current directory, 'pkg_find package' will
search the $CPT_PATH. If you want to use the package on the current directory,
you will need to run 'pkg_find ./package' instead.
IDEA:
The 'cd -P' approach can be replaced with cpt-readlink, but even though
cpt-readlink is faster than 'cd -P', we don't want to call a new process for
such a simple thing.
FossilOrigin-Name: 90298fa52d7bef136aaf50fa900ba79b94abe32903955b043d959d9dcb6706ec
Diffstat (limited to 'tools/cpt-install')
0 files changed, 0 insertions, 0 deletions