summaryrefslogtreecommitdiff
path: root/src/database.c
AgeCommit message (Collapse)AuthorFilesLines
2013-05-30index: add sensible error message if metadata is too longTimo Teräs1-4/+4
fixes #1476 Instead of: ERROR: Index generation failed: Success The following is now printed: ERROR: Metadata for package timo-1.0-r0 is too long. ERROR: Index generation failed: No buffer space available
2013-05-30db: unify handling of special packagesTimo Teräs1-56/+55
make cache a special kind of repository, and automatically cache special packages (virtual packages, or ones installed from command line). add test cases for handling virtual packages. fixes #1617.
2013-05-29db, info: allow packages to install files/symlinks to rootTimo Teräs1-20/+40
fixes #1578
2013-05-29db: make dev/null a character device with --initdbTimo Teräs1-1/+1
fixes #1714
2012-09-20apk: implement --progress-fd to write progress to a specified fdTimo Teräs1-0/+1
2012-09-04db: remove AT_SYMLINK_NOFOLLOW for directory permissionsTimo Teräs1-2/+2
fchmodat does not support this flag - symlinks do not have permissions. Sysadmin probably does not expect us to not follow symlinks either: if /var -> /mnt/foo/var, we should be making sure the permissions and ownership is correct on the target directory, not on the symlink. Since fchmodat never returned ENOENT with AT_SYMLINK_NOFOLLOW, this also fixes directory re-creation if it does not exist. fixes #1348.
2012-07-16audit: fix protection mask of non-db directoriesTimo Teräs1-3/+2
If a directory has protection mask, but does not exist in db, we do not handle it right unless we calculate the protection mask by hand, or create temporary db dir entry for it. For simplicity create always the db dir entry -- depending on audit type we likely need to create it anyway. This commit also caches the db dir entry in the audit tree context to avoid duplicate lookups. ref #1241.
2012-05-01db: strip leading and trailing slashes from protected path specTimo Teräs1-0/+6
2012-04-27db: fix has_protected_children setup on leaf path entriesTimo Teräs1-1/+1
Fixes --recurse during audit.
2012-02-24solver, dot: elementary provides fixesTimo Teräs1-2/+11
implementation is still not near finished, but now at least it can handle it to a minimum degree. many cases are not done right yet, though. ref #574.
2012-02-24all: introduce apk_provides and use it in apk_nameTimo Teräs1-7/+12
in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
2012-02-24pkg, db: use 's' for source repository tags instead of 'p'Timo Teräs1-1/+2
Will use 'p' for provides.
2012-02-23db: keep architecture in $ROOT/etc/apk/archTimo Teräs1-6/+19
This we use proper arch in case modifying chroot installation.
2012-02-23audit, db: add etc/apk/protected_files.d and new audit featuresTimo Teräs1-46/+125
fixes #607. audit is now mostly rewritten for the new functionality. And has new features like --check-permissions, --recursive and --packages. $ROOT/etc/apk/protected_files.d/*.list can now contain additional protected paths, one path per line: +etc @etc/init.d -tmp + will include the directory as protected configuration directory. @ considers the directory protected, but will backup only symlinks. - removes any protection lbu should be modified to put include and exclude paths in etc/apk/protected_files.d/lbu.list. Additionally, some packages might provide their own listings. E.g. ssh might want to provide ssh.list with something like: +root/.ssh +home/*/.ssh
2012-02-22db: fix repositories.d to be loaded only without --repositories-fileTimo Teräs1-3/+7
2012-02-22db, io: load repositories also from etc/apk/repositories.d/*.listTimo Teräs1-12/+31
Load additional repositories from $ROOT/etc/apk/repositories.d/*.list unless --repositories-file is given as parameter.
2012-02-22db: merge identical repositoriesTimo Teräs1-5/+17
Just in case same repository is mentioned with different tags.
2012-02-22db, solver, io: scan cache items at startupTimo Teräs1-25/+80
It is faster to just scan the cache directory for existing packages at startup than trying to faccessat() them on demand. It also makes quite a few parts of the code more readable and simpler.
2012-02-17apk: fix some unharmful leaks reported by valgrindTimo Teräs1-0/+1
2012-02-15solver, db: repository pinning improvementsTimo Teräs1-12/+8
* solver internally calculates now using tags; not repository masks * installeddb now contains the tag name where the package came from -> we can now handle upgrades properly * the pinning is still a preference, and not strictly enforced; versioned dependencies may overrule preference
2012-02-14db: record file uid/gid/mode in installed dbTimo Teräs1-2/+26
2012-02-10db: allow directory to have sticky bit, and suid/sgid bits setTimo Teräs1-1/+1
2012-02-10db, fix: more secure way to choose effective directory permissionsTimo Teräs1-10/+12
And implement --directory-permissions for fix-applet to reset all directory uid, gid and modes.
2012-02-10db: fix directory permissions recalculationTimo Teräs1-5/+8
2012-02-10db: smarter handling of directory owner, group and modeTimo Teräs1-14/+69
2012-02-08blob: optimize spn and cspnTimo Teräs1-2/+7
2012-02-08db: increase hash sizesTimo Teräs1-4/+4
2012-02-01db: do not abort on bad repositoriesNatanael Copa1-5/+0
Only show a warning if we have a non-existing repository or bad repository signature but don't abort. This is not to break compat with behaviour in previous releases.
2012-02-01db: fix bug with --repositoryNatanael Copa1-9/+9
The 'r' variable is overwritten and no longer holds the repository number.
2012-01-31pkg, db: fix signature checking for files without control partTimo Teräs1-20/+23
Also clean up handling of signature failures for index files.
2012-01-17solver, upgrade: properly detect missing repository tagsTimo Teräs1-15/+24
* upgrade needs explicit check so we don't try self-upgrade (which would print additional messages on screen) * add can fix problems, so check against the new world * merge the code in few places
2012-01-17db: print dependencies referring to missing tags instead of tagsTimo Teräs1-6/+11
2012-01-16db: fix loading of world after previous commitsTimo Teräs1-3/+3
2012-01-12db: support line feed as 'world' dependency separatorTimo Teräs1-4/+8
* default writing the world with spaces if a space is found (for backwards compatibility) for now
2012-01-12solver: print repository tag when committing package changesTimo Teräs1-0/+11
2012-01-12db, solver: refuse committing changes if there is missing tagsTimo Teräs1-1/+9
2012-01-06db: properly detect when pkg install trigger needs executingTimo Teräs1-1/+1
call apk_pkg_install() and hlist_tail_ptr() only once. the latter is O(n) and can get very slow.
2011-12-27solver: report number of (mega)bytes usedTimo Teräs1-12/+14
2011-10-29solver, db: implement repository pinningTimo Teräs1-11/+42
Improves /etc/apk/repositories format so you can say: http://nl.alpinelinux.org/alpine/v2.3/main @edge http://nl.alpinelinux.org/alpine/edge/main @testing http://nl.alpinelinux.org/alpine/edge/testing After which you can pin dependencies to these tags using: apk add stableapp newapp@edge bleedingapp@testing Apk will now by default only use the untagged repositories, but adding a tag to specific dependency: 1. will prefer that tag for the name 2. allowing pulling in dependencies from that tag (though, it prefers untagged packages to satisfy deps if possible) fixes #575
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