Commit Graph

91 Commits (ba7b50c0f8ac7c8a88b03856037d9ca6618cccd5)

Author SHA1 Message Date
Timo Teräs 6542d4ca2c db: allow overriding cache location 2017-02-27 11:14:33 +02:00
Timo Teräs f9b4fb469b apk: don't exit with error code for -V and --print-arch 2016-04-19 08:55:58 +03:00
Timo Teräs a2a5cd9c69 fetch: allow enabling --simulate 2016-02-16 15:59:55 +02:00
Natanael Copa c43bfed8de db: add support for --no-cache
Implement --no-cache. The index is read directly from network and not
cached. This is useful for docker, where you install a set of packages
and directly after purge the cache. (see
1fc9e59d16/builder/scripts/apk-install)

fixes #4905
2015-12-07 12:50:32 +00:00
Timo Teräs 2a6896b2b4 rework error handling for read streams 2015-03-10 13:15:31 +02:00
Timo Teräs 6697ed5e86 fix test mode 2014-12-08 08:30:35 +02:00
Timo Teräs b80aba0b5a move --simulate to commit options group and alias -s for it 2014-11-01 20:29:38 +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 555363f056 url: use libfetch to retrieve http/https/ftp files 2014-10-08 10:10:45 +03:00
Timo Teräs f2d9a14405 cache: delete more aggressively unneeded cached files
Also if --purge is specified delete all uninstalled packages.
Fixes #2889
2014-10-06 15:54:52 +03:00
Timo Teräs 7e64edfad6 test: improve loading of repositories, fix broken install-if test 2014-05-19 11:48:36 +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
Natanael Copa b06a43a465 apk: new option --print-arch
Simply print the default arch and exit.
This is so scripts don't need to parse the output of -V.
2014-01-06 14:52:05 +01:00
Timo Teräs 5173787218 print: use stdout instead of stderr for logging and progress
stdout is the proper place for it. this also fixes the progress
bar in musl, which seems to not support using line buffering for
stderr.
2013-10-11 14:52:34 +03:00
Timo Teräs 1c4223124d apk: new option --no-scripts
to not run any per-package scripts. useful for managing buildroot
when cross-compiling.
2013-09-10 13:51:30 +03:00
Natanael Copa 1fb5f71154 apk: minor fix in help text and a whitespace fix 2013-08-28 14:23:49 +00:00
Timo Teräs 70e45998ad apk: give more space for applet descriptions on generic help 2013-07-08 15:12:35 +03:00
Dubiousjim d035ef60d2 apk: infrastructure for short-option-only synonyms 2013-06-30 11:16:52 +03:00
Dubiousjim ac7616b0a9 various: applet help text and comment fixes
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-28 13:45:41 +03:00
Natanael Copa 956bd5f032 apk: set automatic flags before parsing the opts
Otherwise we cannot override with --no-progress
2013-06-19 10:00:31 +00: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 0a13141889 print: move progress printing to common functions 2013-06-17 16:47:49 +03:00
Timo Teräs aec93ee730 db: unify handling of special packages
make cache a special kind of repository, and automatically cache
special packages (virtual packages, or ones installed from command
line). add test cases for handling virtual packages. fixes #1617.
2013-05-30 08:48:32 +03:00
Timo Teräs 43850a126b apk: implement --progress-fd to write progress to a specified fd 2012-09-20 15:12:15 +03:00
Timo Teräs e145738ace apk: do not enable automatically interactive mode with --simulate 2012-02-24 08:47:37 +02:00
Timo Teräs 4676c5d63a test: improve pinning tests 2012-02-24 08:42:40 +02:00
Timo Teräs 64e5a64442 test: rewrite the testing framework to use the real applets
also merge the expected output to the *.test files.
2012-02-23 22:05:02 +02:00
Timo Teräs 92d6e99144 apk: /etc/apk/interactive enables interactive mode for tty sessions
In case someone prefers extra quesions while running apk in a
terminal. The file is always from the real root; not from --root
so that we will not accidentally enable interactive mode when in
initramfs bootstrap.
2012-02-23 15:53:35 +02:00
Timo Teräs a9d526836e apk: fix some unharmful leaks reported by valgrind 2012-02-17 10:02:44 +02:00
Timo Teräs 6b1a55825a apk: remove unneeded global apk_screen_width 2011-09-14 15:39:53 +03:00
Timo Teräs f95e7e5850 upgrade: --no-self-upgrade option
Use it to avoid self-upgrade loops in case something fails during
the initial upgrade attempt.
2011-09-14 11:07:45 +03:00
Timo Teräs 1817b0a3c3 all: update copyright year statement 2011-09-13 11:53:01 +03:00
Timo Teräs bfd53b59d2 print: minor cleanup to indented writer 2011-09-09 20:06:10 +03:00
Timo Teräs 6b24f3c399 apk: improve indented printing
* fixup the help messages to align up properly
 * refresh screen width on SIGWINCH
2011-07-22 12:08:35 +03:00
William Pitcock 86a67d4415 apk: use APK_DEFAULT_ARCH in version(). 2011-07-16 04:29:09 -05:00
William Pitcock 1c54d13614 apk: display command descriptions in command list 2011-07-16 04:14:58 -05:00
Timo Teräs 595c66595c apk: default screen width 70 if ioctl says 0 as width 2011-04-22 11:13:32 +03:00
Natanael Copa cec1fa2b0f db: Allow override arch when using --root
This is so we can do x86 --root installs on x86_64 hosts.

Using --arch without --root can make great damage so we only enable it
if --root is used.
2011-04-14 19:59:01 +00:00
Timo Teräs 116d9a0ea7 apk: improve progress bar
* make it as wide as the screen
 * make sure it's drawn after package change
 * and draw it using ansi escapes in line buffered stderr
2011-03-19 15:20:47 +02:00
Timo Teräs 20775276b9 apk: show progress bar by default for tty controlled runs
and make the progress bar disappear on regular runs too.
2011-03-16 15:22:05 +02:00
Timo Teräs 59d222d58c upgrade: perform upgrade of apk-tools first if available
Also re-exec's apk-tools to perform rest of the upgrade using
the new apk-tools. This allows handling of new apk-tools features
properly. Fixes #140.
2011-01-01 15:48:10 +02:00
Timo Teräs 972bec3210 various: use 'atoms' for certain package field and misc fixes
- implement a hash table for commonly shared fields such as
   license, version and architecture
 - use macroes to print blobs or pkgname-pkgver strings
 - fix some old cruft
2010-12-14 19:51:16 +02:00
Timo Teräs 19419f1a88 io, db: id cache should be specific to database root, not system root
Otherwise we end up using wrong uid/gid mappings when doing install
to alternate system root. Fixes #434.
2010-10-08 15:36:54 +03:00
Timo Teräs dd6008995a static build: do not use openssl engines
We want minimal static build. And this now also breaks with our openssl
since it tries to automatically dlopen some of the engine modules.
2010-06-30 16:55:50 +03:00
Timo Teräs 3062d681f9 archive: honor username/groupname instead of uid/gid
Take the uid/gid from passwd and group.
2010-06-12 13:43:29 +03:00
Natanael Copa 36d1bfb4ed db: make apk_wait a part of dbopts 2010-06-11 07:02:18 +00:00
Natanael Copa 3ec82a5a42 First steps for libapk 2010-06-11 07:02:18 +00:00
Timo Teräs efe90d43c8 state: fix error printing 2010-06-08 10:24:21 +03:00
Timo Teras 6417de4d10 apk: remove the unneeded --never-overwrite
turns out the logic does not work with overlays as expected due
to busybox symlinks being unmanaged. remove the useless option.
2009-12-21 16:53:47 +02:00
Timo Teras d0909569c6 apk: --overlay-from-stdin
get list of overlay files from stdin, so those do not get overwritten.
2009-12-21 14:14:02 +02:00