~alpine/devel

2 2

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

Details
Message ID
<95408c821003020118v437a7a55j9f6200c70cc06e6f@mail.gmail.com>
Sender timestamp
1267521488
DKIM signature
missing
Download raw message
Hi,

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)
 --pre-install
 --post-install
 --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


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Timo Teräs <timo.teras@iki.fi>
Details
Message ID
<4B8CDF44.30909@iki.fi>
In-Reply-To
<95408c821003020118v437a7a55j9f6200c70cc06e6f@mail.gmail.com> (view parent)
Sender timestamp
1267523396
DKIM signature
missing
Download raw message
Natanael Copa wrote:
> 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'.

If you have strong arguments why to do it, then sure. I remember we
decided to clone old shell interface to maintain compatibility with
scripts.

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

Yes, this would be the way to do it.

I'm not against this, as the old style is slightly non-obvious and
strange at points.

However, doing this will require updating all scripts and have the
users learn a new set of commands. Is it worth it? -- If the new
commands are same as in e.g. apt, dpkg, rpm or some other popular
package manager, then I think it's a good direction.

- Timo


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<95408c821003020254p33cb16eake83f2171a9f22233@mail.gmail.com>
In-Reply-To
<4B8CDF44.30909@iki.fi> (view parent)
Sender timestamp
1267527293
DKIM signature
missing
Download raw message
2010/3/2 Timo Teräs <timo.teras@iki.fi>:
> Natanael Copa wrote:
>>
>> 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'.
>
> If you have strong arguments why to do it, then sure. I remember we
> decided to clone old shell interface to maintain compatibility with
> scripts.
>
>> How about we make a new applet called 'apk query' that eventually will
>> replace the 'apk info' applet?
>
> Yes, this would be the way to do it.
>
> I'm not against this, as the old style is slightly non-obvious and
> strange at points.

This is the main reason.

There are also some missing features. Like finding top level packages
and orphans. Been thinking that the output format could be different
too. Then I thought, if we decide to break compat then we should
probably do things correctly.

> However, doing this will require updating all scripts and have the
> users learn a new set of commands. Is it worth it?

I think we want keep the most common stuff as is, i.e 'apk add' and
'apk del' to not make it a too big chock.

> -- If the new
> commands are same as in e.g. apt, dpkg, rpm or some other popular
> package manager, then I think it's a good direction.

i picked some ideas from pacman, but i'm open to other suggestions.
The point is that it might be a good time to rethink the command line
interface now, before alpine-2.0

>
> - Timo
>



-- 
Natanael Copa


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)