Commit Graph

721 Commits (426a12686e6e6dcce11616c774176c01ad0985f9)

Author SHA1 Message Date
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 7b6e44b11b upgrade: reset world dependencies during traversal
This allows us to get apk-tools dependencies get reset at proper
time in world. As a bonus, it reduces code amount.
2011-03-19 14:21:58 +02:00
Timo Teräs 4e72075fba state: lock package late for names specified on command line
This will fix certain scenarios where multiple packages are
installed with full package files specified on command line
and they depend on each other.
2011-03-19 14:17:02 +02:00
Timo Teräs 93eb38a31a db: relocate from /var/lib/apk
move all files therein to other places. this allows /var to be
mounted from harddisk, but rest of system be run from ramdisk.

this also removes support for historical version of the scripts
database which was obsoleted in 2.0_pre16 (in July 2009).
2011-03-16 16:53:07 +02:00
Timo Teräs 2222a15edd db: move lock file to /var/lock
in accordance with FSH. this also to clear /var of apk related things
as we might want to run /var as harddisk, but rest of system from
ramdisk.
2011-03-16 15:39:36 +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 5d64bc5d8c db: fix cache tmpfs detection
comment out the code that was out for testing. duh.
2011-03-16 15:21:41 +02:00
Timo Teräs 415e230a7f db, cache: automatically remount cache read-write when needed
.. and back to read-only after finishing with modifications.

fixes #512
2011-03-16 14:56:13 +02:00
Timo Teräs 1e17da9d70 db: handle arch similarly to stable branch
if package arch is not set, do not append anything to repository.
if arch is set, it is appended to repository.
2011-03-16 14:56:13 +02:00
Timo Teräs 15badbfd97 db: detect tmpfs better
Use statfs() filesystem type, instead of the device IDs.
2011-03-16 14:56:13 +02:00
Natanael Copa ca85bcb7bd url: try wget from $PATH first and fallback to busybox wget
If GNU wget is available, then we want use it as it gives the user
possibility to set misc options, such as bandwidth limit in wgetrc.

It might also be that busybox is not available in case bootstrapping
alpine from other distros (think debian vserver host creating an
alpine guest)

In any case we, fall back to busybox wget in case wget libs are getting
upgraded. (see http://redmine.alpinelinux.org/issues/347)
2011-03-11 08:40:25 +00:00
Timo Teräs 1c6ab67984 db: fix package caching 2011-01-21 09:37:19 +02:00
Timo Teräs 0e450c5fb6 add: use default arch instead of noarch, improve errors
Packages without architecture should get the platforms default
architecture (so we are backwards compatible). Only the virtual
packages should get 'noarch' by default. Also print full path
to the index file which failed.
2011-01-05 14:33:16 +02:00
Natanael Copa d6a40aae53 Makefile: include config.mk if exists
This allows users to have a collection of build variables set without
needing to specify them at build time every time.
2011-01-04 09:48:13 +00:00
Timo Teräs 94ce7f01bf db: check and initiailize required package fields before addition to db
The atomization change broke virtual packages because they don't
have license or arch set.
2011-01-04 11:45:34 +02:00
Timo Teräs 28dcd5d3b3 pkg: recognize install_if
Parse install_if from package metadata and include it in the
indexes. Also setup the reverse install_if dependencies when
loading a database. ref #443.

Actual install_if functionality is not yet implemented.
2011-01-04 10:05:20 +02:00
Timo Teräs d8ba07e484 pkg, db: allow index with unsupported features to be loaded
Just disable installation of packages using the new stuff. Also
flag lower case package info fields as non-critical and allow
installation even if that features is not supported.
2011-01-03 21:06:41 +02:00
Timo Teräs 1f42cc1aed version: fix evaluation order to make valgrind happy
otherwise we get reads from uninitialized/unallocated memory.
2011-01-03 19:15:35 +02:00
Timo Teräs 1c7e8d2617 pkg: dependencies to specific package checksum
When package is installed from commandline, we should always
install that specific instance of package (never favor repository
version if it has difference identity). Otherwise we might not
always end-up installing the .apk given on command line. The
dependency is now against specific checksum identity (marked
with >< dependency comparison). Fixes #492.
2011-01-01 16:58:58 +02:00
Timo Teräs 6582676150 various: use APK_DEPMASK_REQUIRE where applicable
.. instead of the longer flag combo.
2011-01-01 16:04:42 +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 0cc41ba4dc index: remove support of old index format
It's no longer needed or used.
2011-01-01 12:17:06 +02:00
Timo Teräs b01d144c69 various: fix breakage from converting dependency versions to atoms
The version now needs to be initialized atom always, since it's
dereferenced in various places.
2011-01-01 12:11:49 +02:00
Timo Teräs aae0a563ed url: use always busybox wget
I think there used to be problems with using http_proxy on bb wget,
but those have been fixed for quite some time. This fixes #347.
We should probably use libcurl or similar library eventually, but
I'm not entirely sure if/when we want that.
2011-01-01 12:09:42 +02:00
Timo Teräs f126316c79 gunzip: fix ordering of boundary callbacks
The boundary callback should not happen until all the uncompressed
data has been consumed. This previously seems to have worked
because normally gzip library returns "no error" instead of the
"stream end" if we extract exactly the amount of bytes remaining
in the archive. (Perhaps this was changed in new zlib.) In any
case, verification was broken with some apks due to this callback
ordering issue.
2010-12-17 09:47:24 +02:00
Natanael Copa cdeb9caaad info: return error if owning package was not found 2010-12-15 10:33:39 +00: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 fca1c30b80 pkg, db: add preliminary support for arch field
Architecture is now:
 - parsed from .PKGINFO
 - written to index and installed db
 - appended to repository URL when fetching files
2010-12-14 17:06:29 +02:00
Timo Teräs 6e34f048c7 db: remove support for unsigned repository index
Unsigned indexes should not be needed anymore anyway.
2010-12-10 16:42:25 +02:00
Timo Teräs 1f985b9d0f pkg: remove support for obsolete APKv1 (alpine-1.8 and earlier)
should not be needed anymore.
2010-12-10 16:29:40 +02:00
Timo Teräs 0b795531a9 apk-tools-2.0.7 2010-12-09 11:53:13 +02:00
Timo Teräs 6e89c1d5b7 db: print full url/filename of the failing package
.. instead of the pkgname-pkgver string.
2010-12-09 11:10:12 +02:00
Timo Teräs d92df52079 io: enhance istream/bstreams with pipe to forked child
* prunes the child pid to avoid zombies
 * handles the errors so e.g. file-not-found is reported properly
2010-12-09 10:47:09 +02:00
Natanael Copa c9690b0e7c blob: fix segfault on x86_64 with --virtual
blob.ptr might be non-null on empty field in /var/lib/apk/installed
so we compare with blob length.

This fixes a segfault on x86_64.
2010-11-23 09:37:12 +00:00
Timo Teräs 37e8f803a5 db: fix hash lookups on 64-bit machines
The hash is 'unsigned long' everywhere which is 64-bits (on 64-bit
boxes). Fix the one instance of it being 'unsigned int' since that
would be 32-bit and cause lookup failures on 64-bit boxes.
2010-11-23 11:32:42 +02:00
Timo Teräs 6398d338c6 db: fix the previous commit
id cache needs to be initialized early. and group database filename
is surprisingly 'group'.
2010-10-08 16:09:03 +03: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 a31948ae26 apk-tools-2.0.6 2010-09-23 15:58:42 +03:00
Timo Teräs 28745420d0 archive: resolve uid, gid for file information
the uid and gid are used in other places than just changing file
ownership on extraction.
2010-09-23 15:44:46 +03:00
Natanael Copa 5c4583a902 db: optionally remove dirs when unref
We want remove dirs when they are unreferenced so we remove all dirs on
apk del, but we don't want remove dirs when closing database. So we make
removing dir optional when unreferencing it.

This partially reverts commit c7ffc96a16.

fixes #406
2010-09-22 14:34:35 +00:00
Natanael Copa b4adf7645f Fix building on eglibc
Seems like recent eglibc requires that you include sys/stat.h
2010-08-30 13:04:25 +00: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
Natanael Copa fc4c60f233 Makefile: do not require lua pkgconfig unless you intend build lua module 2010-06-16 07:37:17 +00:00
Timo Teräs 9bc7400668 apk-tools-2.0.5 2010-06-16 09:24:21 +03:00
Natanael Copa ac3d149cdd test: check if upgrade works when package is missing in repo 2010-06-15 19:18:36 +00:00
Natanael Copa 92533beae0 test: dont run sh manually but respect #!/bin/sh in each test
That way we can set sh options case by case
2010-06-15 15:53:32 +00:00
Timo Teräs 2dd7ad9a9b upgrade: warn (do not fail) on missing top-level package names
We we can upgrade rest of system just fine then.
2010-06-15 18:34:03 +03:00
Timo Teräs e706f63eda state: handle properly packages which are installed
Installed package does not need to be checked for availability.
Account for packages missing if they get pruned out due to
installability check.
2010-06-15 18:31:45 +03:00
Timo Teräs 7ae592a4fa apk-tools-2.0.4 2010-06-15 16:59:20 +03:00
Natanael Copa 83d859286d test: initial testsuite 2010-06-15 13:31:20 +00:00