If the checksums file doesn't exist on the package directory, kiss
used as_root regardless of permissions. This checks whether the directory
is writable instead of the checksums file, which should provide proper
permissions.
This patch ignores if the directory has weird permissions. If the
directory is writable but the checksums file isn't, kiss will exit
with error. This ignorance is intentional as ideally a package dir
should have identical permissions.
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
It is now possible to do 'kiss f' instead of 'kiss fork' to give
a simple example. In the case where there is a conflict in single
lettering, the first match will be used.
This extends to 'kiss fo', 'kiss for' and so on.
Seeing as how these utilities are now better integrated,
more effort should go into the overall interface between
what should be the "benchmark" or example kiss scripts.
kiss' help output will now include all executables found in $PATH
which begin with kiss-*. A comment string is optionally usable via
setting the second line of the script to a string.
Example:
...
This also means that 'kiss <script name>' is also possible now.
If I have a script in my $PATH called kiss-depends, I can now use
it via kiss with 'kiss depends'.
People seem to have the odd belief that little to no thought has
gone into the installation process of the package manager. The
reality is of course the opposite.
This commit adds comments to the pkg_install() function hopefully
giving insight into _why_ it works as it does.
Additional rationale for rsync is that it allowed us to drop
fakeroot from the repositories and package system entirely.
Changes 'kiss s' to only show the first match if run from a
subshell. Here's a simple example:
-> kiss s zlib
/home/dylan/projects/repo/core/zlib
/var/db/kiss/installed/zlib
-> echo $(kiss s zlib)
/home/dylan/projects/repo/core/zlib
->
This simply modifies as_root() to allow running commands as any
given user and generates checksums according to the owner of the
checksums file and the current user's write permissions.
kiss-repodepends did not honour the user's KISS_PATH and outputted
the last path it found. If the user has the package installed, the
last path will always be the system database, which defeats the whole
purpose of "repodepends". This patch will use the first path it finds,
which will be the user's preferred repository in the KISS_PATH.
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
If the user defines KISS_ROOT to / or anything that ends
with '/', some functions will not work as intended (like fixdeps).
This removes the '/' at the very end, if it exists.
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>