Age | Commit message (Collapse) | Author | Files | Lines |
|
fixes #10677
src/apk_defines.h:152:15: error: unknown type name 'uint32_t'
static inline uint32_t get_unaligned32(const void *ptr)
^~~~~~~~
|
|
|
|
Related to MR !15
|
|
Instead, to make sure test mode produces same output, redefine
time() for the test mode binary.
Reverts parts of 0b82bcc53e60.
|
|
fixes test suite regression from previous commit
|
|
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.
|
|
This unloads --force as several of the things are really not wanted
together. E.g. --force-refresh is a lot different from --force-broken-world
and doing --force to get the other might introduce unwanted behaviour.
--force is still kept for backwards compatibility and it enables
most things --force was used for.
|
|
This flag skips running hook scripts
This flag *must* be used during initramfs tmpfs initial install.
The reason that this new flag is needed is that the hooks will currently
always fail as musl and /bin/sh is missing at this stage on diskless.
|
|
|
|
|
|
|
|
Currently apk only knows about powerpc and ppc64. I am adding support for ppc64le.
ppc64le is the based on the ABI v2, which defines the endianess as little,
while ppc64 is based on the first 64-bits ABI.
|
|
|
|
|
|
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
https://github.com/gliderlabs/docker-alpine/blob/1fc9e59d1689fc4eaf930ec66389fe58062fccec/builder/scripts/apk-install)
fixes #4905
|
|
|
|
forgot to --amend my changes
|
|
fetch_maperror() translates error codes returned by libfetch to our error
codes. Handle those in apk_error_str(), returning error messages which
advise the user of the most likely fix.
A custom error code, EAPKSTALEINDEX, has been added for cases where
retrieving a package fails due to a HTTP error 404 or similar.
[TimoT: add also EAPKBADURL, as well as organize a bit better where the
EAPKSTALEINDEX is generated]
|
|
|
|
to not run any per-package scripts. useful for managing buildroot
when cross-compiling.
|
|
at least debian and musl do this, so let's go along with that.
|
|
|
|
no need to muldiv all the time, just pass the current amount of bytes
done, and let callbacks use that directly.
|
|
Instead of the dependency oriented logic, switch to print them
for each package or name needed. Might give a bit more readable
errors now. There's still few corner cases that proper error is
not output, which are cought by the test cases.
|
|
Implementing basic dependency handling, install_if and awareness
of pinning.
|
|
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.
|
|
It is faster to just scan the cache directory for existing packages
at startup than trying to faccessat() them on demand. It also makes
quite a few parts of the code more readable and simpler.
|
|
* properly do absolute scoring now, the previous scoring where
preference could get reduced could have caused incorrect early
pruning of search tree
* backtracking is now separated from package state, and first
branching point is the decision if a name is left unassigned
or if something _has_ to be assigned. this allows multiple future
search tree optimizations like handling of common dependencies
early.
* merge common dependency names early to provide deeper forward
checking.
|
|
|
|
The array struct aligned size to 64 bit on x86_64 which caused bad things
to happen.
We use size_t to make sure the size element is correct regardless arch.
Solution found by Timo.
|
|
|
|
still todo:
- 'fix' is missing
- 'del -R' does not work
- 'upgrade' does not do self-upgrade first
... and a lot of testing.
|
|
* fixup the help messages to align up properly
* refresh screen width on SIGWINCH
|
|
* 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
|
|
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.
|
|
Architecture is now:
- parsed from .PKGINFO
- written to index and installed db
- appended to repository URL when fetching files
|
|
|
|
Instead of having a null pointer, use a dummy array which just
says the array is empty. This helps in multiple places of the code
which would otherwise need explicitly need to check first if the
array exists. This has been cause of multiple seg.faults in the
past as the array check is easily omitted.
This also removes (or fixes) all existing checks accordingly.
|
|
turns out the logic does not work with overlays as expected due
to busybox symlinks being unmanaged. remove the useless option.
|
|
get list of overlay files from stdin, so those do not get overwritten.
|
|
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.
|
|
|
|
this helps boots sequence when network is not available.
|
|
and by default just update the world, and dump a lost of packages
that are not removed. fixes #47.
|
|
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.
|
|
and use that to figure if questions are allowed or not instead
of the verbosity level.
|
|
and do not remove modified configuration files unless --purge is
specified.
|
|
to not make hard error of untrusted or missing signatures
|
|
|
|
- error codes for verification failure types
- fix some fdb corruption on file migration
- combine some dependency parsing code
- fix versioned dependencies
|