'-e' flag applies to everything that exists, which is not ideal.
This can, for example, also show README files on personal repositories.
Since our target is user-scripts and package directories, checking
if the target is executable is the best overall solutions as most
directories are also marked executable. This change makes sure we
get what we want while keeping other files out of pkg_find.
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
This removes the previous arguments when calling kiss help so that
they are not listed as extensions. This is not a big issue, but
someone can type
kiss help please
and 'please' would be shown as an available extension.
Signed-off-by: Dylan Araps <dylan.araps@gmail.com>
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.
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>
- Sped up conflict resolution by removing a tar call.
- More portable tar usage in source extraction.
- The same decompressor detection is now used when
extracting sources.
This allows you to swap between gzip and xz compression via
the new environment variable ('KISS_COMPRESS'). As of this
commit, new builds will use xz compression (making use of
all cores on the machine).
Other compression methods can easily be added by adding two
simple lines to the script. Your existing package cache will
continue to be used as the package manager will use whatever
tarball is available (for the package and version it is
looking for).
Was only useful in confirming whether or not
a specific issue was environment related.
The mentioned issue has been resolved and
this feature is no longer of any use.
Bye.
This will allow for new hook additions to be single
line changes. I don't know how many additional hooks
we'll add or what they'll be but it's a good idea
regardless.
pre-update(?), post-update(?), pre-install(?), etc
I'm going to re-implement this feature in a
smarter way. It doesn't currently work for
partial updates nor does it work at all for
some users.
Some kind of persistent logging would be
far better as we'll be able to view a diff
regardless of the current pull's status.
The best way of doing this will be to grab
a diff of each package pending an update.
This way it's only information useful to
the user.
Fun stuff.
Removes the use of multiple temporary files and the
number of times they're shuffled around. POSIX sort
is neat.
This should bring minor speedups to the dependency
finder on top of installing GNU grep. I'm sure this
can be further simplified.
I'll be tackling the reduction of checked files
next. Wish me luck.
We never want this. KISS_RM used to remove it
unconditionally but seeing as this is no longer
the case, let's do it post-build.
This is a file related to intltool/gettext and
is installed by multiple packages under the same
name causing endless conflicts.
We have no use for this and nor do I want to
handle this kind of file installation in the
package manager.
It's ugly and I'm glad it's gone.
I never really liked how this was implemented and it's
rather limited in its use. It was cumbersome to edit
the list to make even a minor change.
Instead, I now recommend using 'KISS_HOOK'. It gives
you total control. KISS_RM can be implemented on a
per-package basis, for all packages overall or
conditionally.
You're also not limited to a simple list of removals.
You can do whatever you like pre- and post- build.
Here's an example script to get you started. There
is more information in the manual and README.
case $TYPE in
pre-build)
case $PKG in
zlib) export CFLAGS="-Os -static" ;;
curl) export CFLAGS="-O3" ;;
esac
;;
post-build)
: "${DEST:?DEST is unset}"
rm -rf "$DEST/usr/share/doc"
rm -rf "$DEST/usr/share/gettext"
;;
esac