summaryrefslogtreecommitdiff
path: root/src/apk_applet.h
AgeCommit message (Collapse)AuthorFilesLines
2021-12-14applet: rework APK_DEFINE_APPLET to use constructor attributeAriadne Conill1-5/+1
this allows the applet registration to work in a portable way, without having to weird things with the linker. ref #10794
2020-10-09make apk_database optional for applets that don't need itTimo Teräs1-1/+1
The new v3 applets don't use it, and eventually all applets will use the new formats only. This prepares the code for this, and moves trust, id_cache, and root_fd to apk_ctx which is enough for v3 applets at this time. The generic code is made to not initialize apk_database if it's not needed.
2020-10-09rename apk_db_options to apk_ctx, rework loggingTimo Teräs1-10/+5
makes apk_verbosity non-global fixes #10682
2020-10-09make apk_flags non-global, make progress printing state non-globalTimo Teräs1-1/+1
ref #10682
2020-10-09adb: introduce apk-tools database format, and few appletsTimo Teräs1-1/+1
This is a flat buffers inspired format that allows fast mmaped access to the data with low overhead, signature support and relatively good forward support.
2020-08-24enforce options definitions to bind the enum and the descriptorTimo Teräs1-2/+23
This uses some macro trickery to make sure that there's one-to-one mapping with the option index enum and the descriptor. The down side is that enum's are generated via #define's and editors might not pick them up for auto completion, but the benefits are more: it's no longer possible have mismatching enum value and descriptor index, and the amount of source code lines is less.
2020-05-07use SPDX-License-Identifier in source filesTBK1-3/+1
2020-05-06rewrite option descriptors to be single stringTimo Teräs1-10/+8
This reduces the number of relocations on PIE binaries, and also reduces the executable size. Parsing of the options is slightly sped up as only the exact matching option group parser is called.
2020-05-06add script to autogenerate help from man pagesTimo Teräs1-8/+2
This creates main help like: -- usage: apk [<OPTIONS>...] COMMAND [<ARGUMENTS>...] Package installation and removal: add Add packages to WORLD and commit changes del Remove packages from WORLD and commit changes System maintenance: fix Check WORLD against the system and ensure consistency update Update repository indexes upgrade Install upgrades available from repositories cache Commands related to the management of an offline package cache Querying package information: info Give detailed information about packages or repositories list List packages matching a pattern or other criteria dot Generate graphviz graphs policy Show repository policy for packages Repository maintenance: index Create repository index file from packages fetch Download packages from global repositories to a local directory manifest Show checksums of package contents verify Verify package integrity and signature Miscellaneous: audit Audit directories for changes stats Show statistics about repositories and installations version Compare package versions or perform tests on version strings This apk has coffee making abilities. -- And applet specific help like: -- usage: apk add [<OPTIONS>...] PACKAGES... Description: apk add adds the requested packages to WORLD and installs (or upgrades) them if not already present, ensuring all dependencies are met. Options: --initdb Initialize a new package database -l, --latest Disables normal heuristics for choosing which repository to install a -u, --upgrade When adding packages which are already installed, upgrade them rather -t, --virtual NAME Instead of adding the specified packages to WORLD, create a new --no-chown Do not change file owner or group --
2020-01-26Update apk to make man pages sole source of truthDrew DeVault1-2/+0
Detailed docs have been removed from the apk binaries, in favor of git-style short summaries of each command.
2018-01-09apk: usage: cleanup help text when no applet is selectedWilliam Pitcock1-1/+6
2018-01-04enable automatic update of indexes controlled by --cache-max-ageTimo Teräs1-1/+1
This modifies apk cache for indexes to be automatically refreshed periodically without explicit 'update' or '--update-cache' usage. The default is to do if-modified-since request if the local copy is older than 4 hours. This age can be changed with --cache-max-age. Using --update-cache will change this age to 60 seconds to make sure the cached copy is relatively new. The small age is in order to try to avoid downloading indexes second time when apk-tools is upgraded and apk re-execs after self-upgrade. Accordingly using explicitly 'apk update' will now enforce --force-refresh and request the very latest index by requesting any potential http proxy to do refresh too.
2014-10-08rework option parsing to have a group structureTimo Teräs1-4/+13
Add also a new 'commit' group that is the common options for all applets that can commit package changes.
2014-05-12finally fix building PIE binariesTimo Teräs1-3/+6
the dynamic applet registration never worked with PIE, and as a temporary hack -nopie was added to default link flags in 2008. this commit reworks the applet registration mechanism to something that is compatible with PIE, and removes the hack. finally!
2013-06-18apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs1-1/+1
2011-09-13all: update copyright year statementTimo Teräs1-1/+1
2009-08-06all: implement database open optionsTimo Teras1-11/+5
so user can override trusted keys directory and repositories file.
2009-06-25help: auto construct helpTimo Teras1-3/+12
And add some more verbosity to the help message.
2009-02-17db: allow more than one --repository argNatanael Copa1-1/+8
2009-01-13apk: per applet optionsTimo Teras1-2/+10
2008-04-21Argument parsing. Some other stuff too.Timo Teras1-0/+3
2008-04-21Fixes for hardened environment (and old gcc)Timo Teras1-1/+1
2008-04-17Initial commit of some stuff written so far. Still in state of flux. ExpectTimo Teras1-0/+27
breakage and major changes.