Commit Graph

633 Commits (64e5a64442194a73e75ef11039f7d1e18d60c15e)

Author SHA1 Message Date
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
Timo Teräs 4a21764ee1 state: fix deletion of obsoleted dependencies
In addition to autocleaning dependencies on deletion, we need to
autoclean the old package on upgrade too. This is to make sure that
obsoleted dependencies (existed previously, but not in new package)
are removed where appropriate.
2010-05-27 11:34:17 +03:00
Timo Teräs fe55da7074 package: don't leak signing key file fd
openssl BIO does not close the fd unless we explicitly tell it to
do so.
2010-05-26 14:30:08 +03:00
Timo Teräs d9bf4aabff search: add search for reverse dependencies in index
So it'll be easier to rebuild affected packages. Fixes #349.
2010-05-19 16:49:32 +03:00
Natanael Copa 47bac8c29c upgrade: reset versioned deps in world when doing upgrade -a
Doing "apk add file.apk" adds a versioned dependency to allow
downgrading, and sticky version. Most often this is to install
single packages from newer repository. So it would make sense
to reset them to non-versioned if doing:

 apk upgrade -a

fixes #346
2010-05-12 06:08:18 +00:00
Timo Teras 87420aaf29 info: fix querying of removed, but referenced packages
Check that package name has packages associated with it before
dereferencing the pointer. Fixes #345.
2010-05-05 08:56:06 +03:00
Timo Teras f024add886 apk-tools-2.0.2 2010-03-16 10:24:55 +02:00
Timo Teras e3f919a4f5 state: virtual packages are always installable
they do not have any package associated. this is indicated by
package with zero installed_size.
2010-03-15 09:16:14 +02:00
Timo Teras b40b2f0429 state: check package availability always
even if we have only one package as candidate, we need to check
it's availability. otherwise we can endup with bad changeset
referring to unavailable package.
2010-03-10 14:55:31 +02:00
Timo Teras 73cbc38794 apk-tools-2.0.1 2010-03-04 16:40:54 +02:00
Timo Teras ef7d467083 fetch: do not include installed non-repository files in search
we do not create mirror repositories from other valid repositories,
not from what was installed locally.
2010-03-04 14:01:37 +02:00
Timo Teras 4b29ea2a08 cache: do not download files existing in local repository
wget:ing local files results in error and is useless.
2010-03-01 11:27:27 +02:00
Timo Teras 49f5d8cb01 db: fix previous commit
add the missing variable.
2010-03-01 11:26:45 +02:00
Timo Teras fcdb316ab7 db: read also non-repository package index if reading repository indexes
otherwise regeneration of non-repository index might go wrong or we
might delete too many files from cache when doing 'cache clean'.
2010-03-01 11:20:17 +02:00
Natanael Copa 2d7171b2e7 Merge branch 'master' into prog 2010-02-26 13:35:45 +00:00
Natanael Copa 028990d576 state: write status for each package change
prints like:
(1/12) Installing...
(2/12) Installing...
etc...
2010-02-26 13:27:09 +00:00
Natanael Copa 69b5357390 state: show percent in progress bar
This makes things a little bit nicer when installing from network with
slow lines.
2010-02-26 13:26:16 +00:00