summaryrefslogtreecommitdiff
path: root/src/database.c
AgeCommit message (Collapse)AuthorFilesLines
2011-10-19pkg: convert struct apk_install_package flags to bitfieldTimo Teräs1-2/+2
2011-10-19pkg: introduce "replaces_priority"Timo Teräs1-10/+30
If two packages replace each other, the one with highes priority will keep the file. Additionally, if we have a package overriding another's file it's remembered and handled properly. This is essentially to allow "policy packages" which just overwrite certain (configuration) files from other package(s).
2011-10-18pkg, info: remember installed packages "replaces"Timo Teräs1-19/+24
"replaces" is now turned to a full dependency type list, so you can make package overwrite files only certain versions of the package (though, we should probably take this into account already at solution calculation phase). Also make 'info --replaces' print the "replaces" of the package. This is in preparation for the policy package support, which still requires "replacement priority" field to decide which packages' files get the preference.
2011-09-14solver, db: run triggers in dependency orderTimo Teräs1-8/+5
fixes #738
2011-09-13all: update copyright year statementTimo Teräs1-1/+1
2011-09-09applets: start using solver codeTimo Teräs1-6/+1
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
2011-07-16apk_database: move APK_DEFAULT_ARCH to headers so that we can use it in ↵William Pitcock1-8/+0
version().
2011-06-28index: handle errors instead of silently failingTimo Teräs1-6/+13
Make indexer keep noise about errors that prevent index generation. Detect certain errors in the APKs better. And also have the applet return error in these scenarios.
2011-05-27db: more fix for read-only cache remountingTimo Teräs1-17/+14
remount to read-write before trying to create the cache directory subdirs. fix a fd leak that might prevent remounting back to rw.
2011-05-27db: remount read-only after the file handles have been closedNatanael Copa1-6/+6
The apk cache might be on the readonly media so we need wait with remounting til after atleast this filehandle is closed.
2011-05-23db: fix post-install script error message formattingTimo Teräs1-2/+2
2011-04-22db: remount ro cache to rw earlier for update to workTimo Teräs1-15/+16
2011-04-14db: Allow override arch when using --rootNatanael Copa1-2/+5
This is so we can do x86 --root installs on x86_64 hosts. Using --arch without --root can make great damage so we only enable it if --root is used.
2011-04-07fetch: fix fetching of packages with archTimo Teräs1-16/+20
2011-03-27apk: fix gcc 4.6 warningsTimo Teräs1-2/+1
2011-03-16db: relocate from /var/lib/apkTimo Teräs1-47/+59
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-16db: move lock file to /var/lockTimo Teräs1-2/+4
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-16db: fix cache tmpfs detectionTimo Teräs1-1/+1
comment out the code that was out for testing. duh.
2011-03-16db, cache: automatically remount cache read-write when neededTimo Teräs1-13/+100
.. and back to read-only after finishing with modifications. fixes #512
2011-03-16db: handle arch similarly to stable branchTimo Teräs1-14/+23
if package arch is not set, do not append anything to repository. if arch is set, it is appended to repository.
2011-03-16db: detect tmpfs betterTimo Teräs1-1/+4
Use statfs() filesystem type, instead of the device IDs.
2011-01-21db: fix package cachingTimo Teräs1-2/+2
2011-01-05add: use default arch instead of noarch, improve errorsTimo Teräs1-3/+3
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-04db: check and initiailize required package fields before addition to dbTimo Teräs1-0/+5
The atomization change broke virtual packages because they don't have license or arch set.
2011-01-04pkg: recognize install_ifTimo Teräs1-4/+15
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-03pkg, db: allow index with unsupported features to be loadedTimo Teräs1-19/+32
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.
2010-12-14various: use 'atoms' for certain package field and misc fixesTimo Teräs1-33/+20
- 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-14pkg, db: add preliminary support for arch fieldTimo Teräs1-6/+20
Architecture is now: - parsed from .PKGINFO - written to index and installed db - appended to repository URL when fetching files
2010-12-10db: remove support for unsigned repository indexTimo Teräs1-33/+7
Unsigned indexes should not be needed anymore anyway.
2010-12-09db: print full url/filename of the failing packageTimo Teräs1-24/+27
.. instead of the pkgname-pkgver string.
2010-10-08db: fix the previous commitTimo Teräs1-2/+2
id cache needs to be initialized early. and group database filename is surprisingly 'group'.
2010-10-08io, db: id cache should be specific to database root, not system rootTimo Teräs1-9/+13
Otherwise we end up using wrong uid/gid mappings when doing install to alternate system root. Fixes #434.
2010-09-22db: optionally remove dirs when unrefNatanael Copa1-13/+15
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 c7ffc96a16c6963fe0a07be7ee75e8f1f7426882. fixes #406
2010-08-30Fix building on eglibcNatanael Copa1-0/+1
Seems like recent eglibc requires that you include sys/stat.h
2010-06-15db: reinitialize trigger_pkg_list node after deletionTimo Teräs1-0/+1
The trigger list can be reused after it's cleared, make sure the list node is initialized all the time.
2010-06-12db: --simulate never needs write access to dbTimo Teräs1-0/+4
So open the db in read-only mode instead. This allows --simulate to be run as non-root user.
2010-06-11various: use O_CLOEXEC and add some error checkingTimo Teräs1-10/+12
2010-06-11db: make apk_wait a part of dboptsNatanael Copa1-4/+3
2010-06-11First steps for libapkNatanael Copa1-1/+6
2010-06-10db: do not free trigger list after package is unpackedNatanael Copa1-6/+6
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 ce3cf8bff901e7fcacbca640ffedaeea2b3bdf7f
2010-06-07db: fix usage of apk_name_array in install_ctxTimo Teräs1-4/+4
got broken to the previous array cleanup and grepping struct definition only from headers.
2010-06-05all: rework how arrays workTimo Teräs1-34/+26
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-01db, pkg: fix triggers related crashTimo Teräs1-8/+10
clean up the triggers properly, in proper order.
2010-03-04fetch: do not include installed non-repository files in searchTimo Teras1-2/+3
we do not create mirror repositories from other valid repositories, not from what was installed locally.
2010-03-01db: fix previous commitTimo Teras1-0/+1
add the missing variable.
2010-03-01db: read also non-repository package index if reading repository indexesTimo Teras1-8/+8
otherwise regeneration of non-repository index might go wrong or we might delete too many files from cache when doing 'cache clean'.
2009-12-25db: keep packages with no files with installed statusTimo Teras1-6/+10
got broke few commits ago when apk_pkg_installed() call was moved to happen after the package name has been read.
2009-12-22db: make fdb load package description before calling pkg_installTimo Teras1-5/+5
this is now mandatory after the overlay fixes. otherwise the package will not get listed as installed.
2009-12-21db: check the overlay files package name rather than the ovl file itselfNatanael Copa1-1/+1
2009-12-21db: honor overlay file even for protected pathsTimo Teras1-14/+12