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
Timo Teras
a93a35eeca
apk: add --never-overwrite flag (ref #197 )
...
to never ever overwrite a while in the filesystem the user knows
about. it gives the impression of extraction succeeding even though
nothing was done. this is inteded to be used only for bootstrapping
with overlay.
2009-11-06 11:31:03 +02:00
Timo Teras
f02f326238
db: prefer local repositories, and implement --no-network
...
this helps boots sequence when network is not available.
2009-08-06 16:00:20 +03:00
Timo Teras
ced1fa83d6
state: indent package lists
2009-08-06 15:34:33 +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
ea90152664
apk: use *at instead of chdir+normal file syscall
...
this way we never change cwd, and relative filenames are always
parsed consistently. this also helps filename construction in many
places. this patch also changes '--root' to override location of
all configuration to be in the new root. previously it depended
on the file which one was used.
2009-07-31 16:08:09 +03:00
Timo Teras
1c92602172
apk: add -i/--interactive option ( fixes #60 )
...
and use that to figure if questions are allowed or not instead
of the verbosity level.
2009-07-24 14:18:45 +03:00
Timo Teras
a388f4bfa6
index: more informative error message
...
when failed to load an existing index.
2009-07-23 11:35:40 +03:00
Timo Teras
90aaa28a95
apk: add --purge option ( fixes #61 )
...
and do not remove modified configuration files unless --purge is
specified.
2009-07-22 21:34:25 +03:00
Timo Teras
5375efac1a
apk: allow-untrusted option
...
to not make hard error of untrusted or missing signatures
2009-07-22 16:06:34 +03:00
Timo Teras
93f0b3524c
various: more informative error messages
2009-07-22 14:56:27 +03:00
Timo Teras
0a7991f70d
various: misc fixes
...
- error codes for verification failure types
- fix some fdb corruption on file migration
- combine some dependency parsing code
- fix versioned dependencies
2009-07-22 14:24:19 +03:00
Timo Teras
981bc118f8
db: live with sha1 and md5
...
this also convers scripts file to a tar archive.
2009-07-14 19:14:05 +03:00
Timo Teras
b30024d2bd
openssl: register engines, and use oneshot digest when possible
...
to actually get hardware acceleration if available.
2009-07-13 14:28:52 +03:00
Natanael Copa
080fa825dd
implement --update-cache option
...
This will update the repository cache upon db_open.
2009-07-09 06:08:44 +00:00
Timo Teras
a3d19b5c0d
apk: initialize openssl
...
add all ciphers and built-in engines so we get e.g. hw acceleration
of sha1 when available.
2009-07-08 16:19:06 +03:00
Timo Teras
bf094dc5ea
csum: use openssl instead
...
instead of having static md5 implemenation, use the openssl
library for digest functions.
2009-07-08 10:45:49 +03:00
Timo Teras
c84196e0d3
apk: add --wait option to wait for exclusive lock ( fixes #26 )
2009-07-07 10:30:54 +03:00
Timo Teras
9858ffff69
cache: new applet (ref #49 )
...
Administrative tool to download or delete files to/from the cache.
2009-06-29 11:22:55 +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
61213c4018
improve --help output
...
apk --help will list the generic options only and give a list of commands
To get the details for a spefic command, 'apk command --help' should be used.
2009-06-19 15:40:37 +02:00
Timo Teras
9b0c0a2053
Revert "add: replace coffe-cup with starwars"
...
This reverts commit 0906a1c7de
.
Conflicts:
src/add.c
2009-05-25 16:58:32 +03:00
Timo Teras
a9b6d18f7f
state: make package deletion safer
...
Refuse to delete explicitly specified top-level packages unless
--force is specified.
2009-04-15 13:20:35 +03:00
Timo Teras
a23f6f4afb
state: rework changeset calculation algorithm
...
Calculate changesets directly by stabilizating the package graph instead of
recalculating the whole graph and then diffing (similar approach as seen
in 'smart' package manager). The algorithm is not complete: defferred
search space forking is missing. So you don't always get a solution on
complex graphs.
Benefits:
- usually the search state tree is smaller (less memory used)
- speed relational to changeset size, not database size (usually faster)
- touch only packages related to users request (can work on partitially
broken state; upgrades only necessary packages, fixes #7 )
Also implemented:
- command prompt to confirm operation if packages are deleted or downgraded
- requesting deletion of package suggests removal of all packages depending
on the package being removed (you'll get list of packages that also get
removed if you want package X removed)
- option --simulate to see what would have been done (mainly for testing)
- an untested implementation of versioned dependencies and conflicts
A lot has changed, so expect new bugs too.
2009-04-14 18:48:02 +03:00
Timo Teras
a62dcf37c1
apk: --force to overwrite files
2009-03-04 08:36:56 +02:00
Timo Teras
457943f83e
apk: --clean-protected option
...
So you will not get .apk-new files of the new configuration files.
2009-03-04 08:27:06 +02:00
Natanael Copa
ca51ec3238
db: allow more than one --repository arg
2009-02-17 12:23:01 +00:00
Natanael Copa
24b424a458
apk: added option --version/-V
...
Both variants should work:
apk --version
apk <applet> --version
2009-01-17 08:51:52 +00:00
Timo Teras
3e6fc1389f
add: --upgrade|-u to control if upgrading is preferred or not
2009-01-16 13:59:36 +02:00
Natanael Copa
d8837aa6f4
apk: fix --root/-p option
2009-01-16 09:57:53 +00:00
Natanael Copa
33cb598bdf
apk: short option for --root is -p
...
Used to be so in the really old days of apk.
2009-01-16 09:44:49 +00:00
Natanael Copa
50daa05773
info: only show package desc when --verbose
...
also introduce apk_verbosity. --quiet reduce verbosity and --verbose
increases it.
Default verbosity is 1.
2009-01-16 09:33:55 +00:00
Timo Teras
4c7f1e0dec
apk: isalnum() takes only unsigned char values add explicit check for that
2009-01-15 11:10:14 +02:00
Timo Teras
3755e1cde3
apk: per applet options
2009-01-13 14:09:45 +02:00
Timo Teras
d16b424385
apk: honour --root command line switch
...
Was broken by earlier ROOT environment commit.
2009-01-13 09:31:27 +02:00
Natanael Copa
b8940df6b9
apk: support for ROOT environment variable
2009-01-12 21:03:20 +00:00
Timo Teras
052fbe3f86
various: make fancy progress bar and update todo
2009-01-07 21:45:11 +02:00
Timo Teras
354b6e4631
log: eliminate fortified build warning
2009-01-06 21:23:26 +02:00
Timo Teras
219a1b2ee8
Overwriting of bb files, apk_create (from old apk-tools), chdir changes,
...
other stuff.
2008-04-22 08:16:26 +00:00
Timo Teras
384c2f1d94
Preserve uid and gid. Quiet flag to print dots on progress.
2008-04-22 06:04:20 +00:00
Timo Teras
823283edca
Argument parsing. Some other stuff too.
2008-04-21 16:30:10 +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