Subject: [alpine-devel] Other questions about apk-tools

From: Dubiousjim <[email-masked]>
Date: Mon, 5 Nov 2012 06:21:18 -0500

1. I don't really understand the rules for the "-a" flag on apk upgrade.

When I say `apk upgrade -a --simulate` I get a list of 16 potential
downgrades (apparently one package has been withdrawn, only an older
version is now in the repos) and replacements (the rest of the list).

Why are just those packages chosen to be replaced? When I say
`apk info | wc -l` I get 180. There are more than 15 items listed in
/etc/apk/world, too. I'm completely unclear on what determines whether a
package should get replaced when using the "-a" flag.

2. Some documentation glitches I noticed: The usage for `apk version`
   lists one option as `-l LIMCHAR`. But this option accepts multiple
   LIMCHARs, so perhaps the usage message should be pluralized.

3. Another? The usage for `apk info` says "Give detailed information
   about PACKAGEs or repositories." But I can't see any way to use `apk
   info` to get information about a repository; is there something I'm
   missing? Perhaps this message should also be changed to specify that
   the information can only be provided for installed packages?

If desired, I'll move these two suggestions to the bugtracker.

-- 
Dubiousjim
[email-masked]
https://github.com/dubiousjim

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Timo Teras <[email-masked]>
Date: Mon, 5 Nov 2012 13:57:40 +0200

On Mon, 5 Nov 2012 06:21:18 -0500 Dubiousjim
<[email-masked]> wrote:

> /etc/apk/world, too. I'm completely unclear on what determines
> whether a package should get replaced when using the "-a" flag.

-a says "make sure the installed package is available from repository
currently - if not reinstall it"

So basically the packages it wants to reinstall are packages that are
not in any of your current repository list. Likely you either compiled
them yourself, or they've been recompiled upstream (e.g. you installed
the package from v2.3 - and upgraded repositories to be only v2.4 where
the version is exactly same, but the package is different due to
rebuild).

>    LIMCHARs, so perhaps the usage message should be pluralized.

Will fix.

>    about PACKAGEs or repositories." But I can't see any way to use
> `apk info` to get information about a repository; is there something
> I'm missing? Perhaps this message should also be changed to specify
> that the information can only be provided for installed packages?
> 

Maybe create a bug about this. This is what we envisioned the yet
unimplemented 'apk policy' for, but some of it should be also in 'apk
info' output too. E.g. from which repositories the package is available
from.

Thanks,
 Timo

---