Mail archive

[alpine-devel] RFC: apk-tools user interface

From: Natanael Copa <>
Date: Tue, 2 Mar 2010 10:18:08 +0100


The apk-tools user interface have some leftovers from apk-tools-1.x
which had an user interface similar to freebsd's pkg-tools. I don't
see any point in that anymore and i think its time to think over the
user interface for apk tools. I think we want keep 'apk add' and 'apk
del' like they are more or less for compatibility but I think it might
be good redo some of the other applets, at least 'apk info'.

How about we make a new applet called 'apk query' that eventually will
replace the 'apk info' applet?

Some ideas:
list files owned by package(s):
  apk query --list <package>...
  apk query -l <package>...

list installed package:
  apk query --installed
  apk query -I

find package that owns given file(s):
 apk query --owns <file>...
 apk query -o <file>...

list toplevel packages:
 apk query --world
 apk query -w

list dependencies for package(s):
 apk query --depend <package>...
 apk query -d <package>...
 (maybe have recursive option for this...)

list reverse dependencies for package(s):
 apk query --revdep <package>...
 apk query -D <package>...

list orphans (installed packages that is not in world nor have reverse deps)
 apk query --orphans (or --unrequired?)
 apk query -O

list packages installed thats not in index (this useful before doing upgrades):
 apk query --foreign

show information for package (same as 'apk query --description
--homepage --size')

We could have flags for opening either index, installed database or
both (by default only installed db?)

Might also want the stuff thats provided by apk info:
 --homepage, -H (or --url, -u)
 --scripts, -S
 --description (or --summary or --comment?), -c
 --triggers, -t
 --size, -s
 --is-installed, -q (or --query -q or --evaluate, -e or something else)

Maybe we could have a flag for opening a file instead of installed db
or index, so you can:
apk query --info foo-1.9-r0.apk

I'm open to other ideas for apk-tools command line interface.

Natanael Copa
Received on Tue Mar 02 2010 - 10:18:08 UTC