Commit Graph

17 Commits (5d796b567819ce91740fcdea7cbafecbda65d8f3)

Author SHA1 Message Date
TBK 5d796b5678 use SPDX-License-Identifier in source files 2020-05-07 10:45:42 +03:00
Timo Teräs 1d7123d837 rewrite option descriptors to be single string
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-06 13:05:25 +03:00
Timo Teräs 5258b484bf add script to autogenerate help from man pages
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-05-06 13:05:19 +03:00
Drew DeVault b62d252b7b Update apk to make man pages sole source of truth
Detailed docs have been removed from the apk binaries, in favor of
git-style short summaries of each command.
2020-01-26 09:03:18 +02:00
William Pitcock abf7c2838b apk: usage: cleanup help text when no applet is selected 2018-01-09 17:07:13 +00:00
Timo Teräs 8a28c6d0d4 enable automatic update of indexes controlled by --cache-max-age
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.
2018-01-04 10:56:09 +02:00
Timo Teräs 38e3f54638 rework option parsing to have a group structure
Add also a new 'commit' group that is the common options
for all applets that can commit package changes.
2014-10-08 15:29:27 +03:00
Timo Teräs 1e36692a8a finally fix building PIE binaries
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!
2014-05-12 19:45:36 +03:00
Timo Teräs fe41ae07b9 apk: use string array in applet mains, separate apk_name_foreach_matching 2013-06-18 13:02:27 +03:00
Timo Teräs 1817b0a3c3 all: update copyright year statement 2011-09-13 11:53:01 +03:00
Timo Teras ecdacd1503 all: implement database open options
so user can override trusted keys directory and repositories file.
2009-08-06 14:25:03 +03:00
Timo Teras 7a29678aac help: auto construct help
And add some more verbosity to the help message.
2009-06-25 15:14:07 +03:00
Natanael Copa ca51ec3238 db: allow more than one --repository arg 2009-02-17 12:23:01 +00:00
Timo Teras 3755e1cde3 apk: per applet options 2009-01-13 14:09:45 +02:00
Timo Teras 823283edca Argument parsing. Some other stuff too. 2008-04-21 16:30:10 +00:00
Timo Teras 951602e551 Fixes for hardened environment (and old gcc) 2008-04-21 09:41:53 +00:00
Timo Teras d6c7435242 Initial commit of some stuff written so far. Still in state of flux. Expect
breakage and major changes.
2008-04-17 14:09:13 +00:00