Commit Graph

426 Commits (92533beae08fb440625f7ef79ed19226a9bc2e71)

Author SHA1 Message Date
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
Natanael Copa 9f3fbedcc9 add: print all failing packages instead of only first
We want see all packages that fails to install and not only the first
2010-02-26 12:57:06 +00:00
Timo Teras 3f9fe4c28b db: keep packages with no files with installed status
got broke few commits ago when apk_pkg_installed() call was
moved to happen after the package name has been read.
2009-12-25 14:15:10 +02:00
Natanael Copa d67ee300b6 state: Default interactive action is Yes
When pressing only <enter> on the question "..continue [Y/n]?" then
lets take that as a "yes"
2009-12-25 07:17:06 +00:00
Timo Teras 48802be57f apk-tools-2.0 2009-12-23 16:08:44 +02:00
Timo Teras b58ec46f7c db: make fdb load package description before calling pkg_install
this is now mandatory after the overlay fixes. otherwise the
package will not get listed as installed.
2009-12-22 17:33:44 +02:00
Natanael Copa d4f0b2ab70 db: check the overlay files package name rather than the ovl file itself 2009-12-21 16:39:53 +00:00
Timo Teras 884fabbf30 db: honor overlay file even for protected paths 2009-12-21 18:12:45 +02:00