summaryrefslogtreecommitdiff
path: root/src/info.c
AgeCommit message (Collapse)AuthorFilesLines
2020-01-05info: Remove short options for --install-if, --rinstall-ifMatthew McGill1-4/+4
The "apk info" option --install-if, which had the short option -i, was being shadowed by the apk global option --interactive, which has the same short option. To fix this issue the short option for --install-if was removed, as has been done in other cases where an applet short option would be shadowed by a global short option. The short option for --rinstall-if was also removed for consistency, since it is the complement of --install-if.
2020-01-05Humanize size output of `apk info`Sören Tempel1-4/+8
This commits adds a function for receiving the closet byte unit and the size in that unit for a given size_t. The function doesn't return a string since dynamic memory allocation (or a static buffer) would be required to implement this properly. Discussion: It might be useful to add a command line flag for disabling this behaviour in order to retain compatibility with the previous apk info output format.
2019-06-05fix all applets to return -ENOTSUP if it's unrecognizedTimo Teräs1-1/+1
The return -1 seems to have been left over from earlier code, and could have been treated as -EPERM. This helps to fix the other command line handling that potentially require changing.
2018-01-09apk: usage: cleanup help text when no applet is selectedWilliam Pitcock1-0/+1
2017-09-27info: fix typo in helpDamiano Albani1-1/+1
2017-06-23io: make io vtables const struct, and add accessors for themTimo Teräs1-2/+2
This reduces function pointers in heap, and unifies how the io functions are called.
2016-06-13info: add support for --licenseNatanael Copa1-0/+16
print license with the --license option.
2016-05-31fix info --who-owns to work with relative filenamesTimo Teräs1-5/+12
fixes #5656
2015-11-12info: fix --installed test of conflictsTimo Teräs1-5/+5
2015-03-10rework error handling for write streamsTimo Teräs1-3/+5
2014-12-08make del, fetch, fix and info return errorsTimo Teräs1-19/+18
In case all applet arguments are packages names (that is are not including wildcards), return error if they do not match to some package.
2014-10-08rework option parsing to have a group structureTimo Teräs1-6/+10
Add also a new 'commit' group that is the common options for all applets that can commit package changes.
2014-10-06info who-owns: print symlink target owner as a fallbackTimo Teräs1-3/+15
busybox trigger creates symlinks to itself. This helps user to see where these come from.
2014-03-07info: fix printing of 'replaces' fieldTimo Teräs1-1/+1
2013-06-28various: applet help text and comment fixesDubiousjim1-2/+2
Acked-by: Natanael Copa <ncopa@alpinelinux.org>
2013-06-19all: few behavioural regression fixesTimo Teräs1-1/+3
Wildcard matching with no names should match all packages only for info and search applet. "apk del" would otherwise try to delete everything, etc. Fix also interactive mode to ask questions only if we are actually changing something.
2013-06-19applets: unify help message by removing final dotsTimo Teräs1-1/+1
2013-06-18fix, info, ver: perform wildcard matchingTimo Teräs1-33/+24
ref #511
2013-06-18apk: use string array in applet mains, separate apk_name_foreach_matchingTimo Teräs1-47/+37
2013-06-18all: various conversions to foreach_array_item, and simplifications of codeTimo Teräs1-93/+37
2013-06-17db: refactor repository file constructionTimo Teräs1-1/+1
Fixes also 'fetch' applet to prefer copying/linking to files from cache if possible.
2013-05-29db, info: allow packages to install files/symlinks to rootTimo Teräs1-1/+1
fixes #1578
2012-09-28info: --provides alias -p is reserved for --root, use -PNatanael Copa1-2/+2
fixes #1396
2012-03-30info: fix exit code for -eTimo Teräs1-3/+6
fixes #1069
2012-02-29info: support displaying providesTimo Teräs1-6/+32
2012-02-29solver, test: make conflicts unconditionalTimo Teräs1-1/+1
Solver will now never report partial solution where a conflict constraint is not satisfied. The is because with --force we might install the partial solution; and if conflicted packages were to be installed we might have extra trouble.
2012-02-24all: introduce apk_provides and use it in apk_nameTimo Teräs1-41/+36
in preparation for provides support. implements also some dependency satisfaction helper routines. ref #574.
2012-01-12db: support line feed as 'world' dependency separatorTimo Teräs1-1/+5
* default writing the world with spaces if a space is found (for backwards compatibility) for now
2012-01-06info: display short info if packages are givenNatanael Copa1-0/+10
instead of just list all installed package
2011-12-24info: -e and -W operate on database only (repos not needed)Timo Teräs1-0/+2
.. so do not load them.
2011-10-29solver, db: implement repository pinningTimo Teräs1-16/+18
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-18pkg, info: remember installed packages "replaces"Timo Teräs1-5/+32
"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-13all: update copyright year statementTimo Teräs1-1/+1
2011-09-09applets: start using solver codeTimo Teräs1-1/+0
still todo: - 'fix' is missing - 'del -R' does not work - 'upgrade' does not do self-upgrade first ... and a lot of testing.
2011-03-29state, info: implement install_if (fixes #443)Timo Teräs1-4/+76
Implement the logic for install_if lines. Update info applet to also display the install_if related fields.
2011-01-01pkg: dependencies to specific package checksumTimo Teräs1-2/+1
When package is installed from commandline, we should always install that specific instance of package (never favor repository version if it has difference identity). Otherwise we might not always end-up installing the .apk given on command line. The dependency is now against specific checksum identity (marked with >< dependency comparison). Fixes #492.
2011-01-01various: fix breakage from converting dependency versions to atomsTimo Teräs1-0/+1
The version now needs to be initialized atom always, since it's dereferenced in various places.
2010-12-15info: return error if owning package was not foundNatanael Copa1-3/+6
2010-12-14various: use 'atoms' for certain package field and misc fixesTimo Teräs1-14/+22
- 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-06-11First steps for libapkNatanael Copa1-0/+1
2010-06-08info: fix usage of arraysTimo Teräs1-4/+4
2010-06-05all: rework how arrays workTimo Teräs1-14/+4
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-05-05info: fix querying of removed, but referenced packagesTimo Teras1-1/+1
Check that package name has packages associated with it before dereferencing the pointer. Fixes #345.
2009-09-03index, version: support for repository descriptions (fixes #141)Timo Teras1-1/+1
ability embed description information to repository indexes (e.g. repository name and version) and show it via "apk version -I".
2009-08-13info: clean ups, print triggers (ref #45)Timo Teras1-96/+113
2009-08-12db, pkg: separate structure for fields of installed packagesTimo Teras1-8/+11
this makes the database package entry smaller, and we propbably get more fields to installed_package later too. this cleans up the way scripts are stored and is a preparation for supporting triggers. some parsing for trigger meta-data. ref #45.
2009-08-06all: implement database open optionsTimo Teras1-13/+7
so user can override trusted keys directory and repositories file.
2009-08-05info: fix a --exists to work if the name is non-existantTimo Teras1-0/+3
2009-08-05info: support dependency style tests in package existance checkingTimo Teras1-11/+18
2009-07-14db: speed up fdb creationTimo Teras1-1/+1
avoid recalculating hashes, and store the lengths of names, so we can optimize some operations.