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
Timo Teräs
ec6359732d
db: reinitialize trigger_pkg_list node after deletion
...
The trigger list can be reused after it's cleared, make sure
the list node is initialized all the time.
2010-06-15 14:40:46 +03:00
Natanael Copa
efdd2f10f5
Makefile: Don't build or install the libapk and lua module by default
...
Make the libapk and lua module optional at buildtime and off by default.
This is because enabling libapk requires that mkinitfs also copies the
libapk.so or the initramfs will not work.
To build libapk:
make LIBAPK=yes
To build lua module (will enable LIBAPK=yes):
make LUAAPK
To link apk to libapk (will enable LIBAPK=yes):
make SHARED_LIBAPK=yes
All the above applies to make install target as well.
2010-06-14 09:41:06 +00:00
Timo Teräs
8b317678e3
db: --simulate never needs write access to db
...
So open the db in read-only mode instead. This allows --simulate to
be run as non-root user.
2010-06-12 13:48:42 +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
Timo Teräs
43cb554c3f
various: use O_CLOEXEC and add some error checking
2010-06-11 13:42:21 +03:00
Timo Teräs
bcbe575c3b
build: fix CFLAGS, and use pkg-config for lua
2010-06-11 13:41:52 +03:00
Natanael Copa
11925542d8
print: clean up after copy-paste
2010-06-11 07:09:25 +00:00
Natanael Copa
36d1bfb4ed
db: make apk_wait a part of dbopts
2010-06-11 07:02:18 +00:00
Natanael Copa
7aed449427
lua: initial lua module
2010-06-11 07:02:18 +00:00
Natanael Copa
3ec82a5a42
First steps for libapk
2010-06-11 07:02:18 +00:00
Natanael Copa
60b537e356
db: do not free trigger list after package is unpacked
...
The triggers are read during apk_db_unpack_pkg(). If we delete the
triggers list after then unpack we delete the triggers which is not
what we want.
This fixes bug introduced in ce3cf8bff9
2010-06-10 17:50:11 +00:00
Timo Teräs
6b52c5dc84
apk-tools-2.0.3
2010-06-08 15:25:46 +03:00
Timo Teräs
8ac170c49d
info: fix usage of arrays
2010-06-08 14:26:35 +03:00
Timo Teräs
efe90d43c8
state: fix error printing
2010-06-08 10:24:21 +03:00
Timo Teräs
f85d87e5f9
db: fix usage of apk_name_array in install_ctx
...
got broken to the previous array cleanup and grepping struct
definition only from headers.
2010-06-07 17:45:04 +03:00
Timo Teräs
7be853e637
all: rework how arrays work
...
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.
2010-06-05 12:33:54 +03:00
Timo Teräs
069c898984
state: fix a crash in error printing
2010-06-03 22:03:02 +03:00
Timo Teräs
ce3cf8bff9
db, pkg: fix triggers related crash
...
clean up the triggers properly, in proper order.
2010-06-01 16:46:53 +03:00
Timo Teräs
440cffef58
state: print missing package names on error
...
especially important if the package requested from command line
does not exist. otherwise we would not print an error at all.
2010-06-01 15:06:48 +03:00
Timo Teräs
038b672061
state: improve error messages from dependency failures
...
Print more information why installation changeset calculation failed.
Fixes #187 .
2010-06-01 11:49:32 +03:00
Timo Teräs
2165547bad
state: modify reinstallation prints
...
To print upgrading if package is actually being changed instead of
pure reinstall.
2010-05-27 16:19:14 +03:00
Timo Teräs
4fde5f101a
state: show changed packages as upgrades
...
If version is equal, but package contents are different we should
show the package being upgraded.
2010-05-27 16:01:29 +03:00