Bug #380

"apk version" only shows up-to-date packages

Added by Ted Trask over 1 year ago. Updated about 1 year ago.

Status:Rejected Start date:07/08/2010
Priority:Normal Due date:
Assignee:Timo Teräs % Done:

0%

Category:Base libraries
Target version:Alpine 1.10.7

Description

I was running off of a 1.10.6 USB and added a web repository to /etc/apk/repositories. When I did "apk version", it didn't show any packages as being out-of-date, but "apk upgrade" installed 10 packages.

t:~# apk update
fetch http://dl-3.alpinelinux.org/alpine/v1.10/packages/main/APKINDEX.tar.gz
alpine 1.10.6 [/media/usb/apks]
main v1.10.6 [http://dl-3.alpinelinux.org/alpine/v1.10/packages/main]
t:~# apk version
Installed: Available:
uclibc-0.9.30.2-r3 = 0.9.30.2-r3
busybox-1.16.1-r1 = 1.16.1-r1
alpine-baselayout-2.0_rc1-r0 = 2.0_rc1-r0
libcrypto-0.9.8o-r1 = 0.9.8o-r1
zlib-1.2.3.7-r1 = 1.2.3.7-r1
apk-tools-2.0.5-r0 = 2.0.5-r0
openrc-0.6.0-r0 = 0.6.0-r0
alpine-conf-2.4-r0 = 2.4-r0
popt-1.15-r0 = 1.15-r0
logrotate-3.7.8-r2 = 3.7.8-r2
openssl-0.9.8o-r1 = 0.9.8o-r1
mini_httpd-1.19-r3 = 1.19-r3
acf-jquery-0.1.0-r1 = 0.1.0-r1
acf-lib-0.1.3-r0 = 0.1.3-r0
acf-skins-0.3.0-r0 = 0.3.0-r0
ncurses-5.7-r1 = 5.7-r1
readline-6.1.001-r0 = 6.1.001-r0
lua-5.1.4-r3 = 5.1.4-r3
haserl-0.9.25-r1 = 0.9.25-r1
lua-posix-5.1.4-r0 = 5.1.4-r0
lua-md5-1.1.2-r0 = 1.1.2-r0
acf-core-0.10.4-r0 = 0.10.4-r0
lua-json4-0.9.20-r0 = 0.9.20-r0
acf-alpine-baselayout-0.7.2-r0 = 0.7.2-r0
acf-apk-tools-0.5.0-r1 = 0.5.0-r1
vim-7.2.284-r0 = 7.2.284-r0
openssh-client-5.3_p1-r0 = 5.3_p1-r0
openssh-5.3_p1-r0 = 5.3_p1-r0
busybox-initscripts-2.0-r10 = 2.0-r10
alpine-base-2.0-r1 = 2.0-r1
device-mapper-2.02.60-r0 = 2.02.60-r0
lvm2-2.02.60-r0 = 2.02.60-r0
t:~# apk upgrade
(1/10) Installing curl (7.19.7-r0)
(2/10) Installing expat (2.0.1-r1)
(3/10) Installing git (1.6.6.1-r0)
(4/10) Installing make (3.81-r1)
(5/10) Installing libuuid (2.17-r0)
(6/10) Installing apr (1.3.9-r0)
(7/10) Installing apr-util (1.3.9-r0)
(8/10) Installing neon (0.28.6-r0)
(9/10) Installing sqlite (3.6.15-r0)
(10/10) Installing subversion (1.6.6-r0)
Executing subversion-1.6.6-r0.pre-install
Executing busybox-1.16.1-r1.trigger
OK: 42 packages, 164 dirs, 2032 files
t:~#

History

Updated by Natanael Copa over 1 year ago

  • Assignee set to Timo Teräs

Updated by Timo Teräs over 1 year ago

All the installed packages are newly installed. This sounds like you had dependencies in 'world' which are not included in the iso image. 'apk upgrade' then would fetch them from http on first run.

But yes, 'apk version' does not detect this, or if package X is upgraded with additional dependencies pulling in new packages. 'apk version' will also report updates being available even if you pinned package X to specific version.

I'm not really sure how 'apk version' algorithm should work here. You can always use 'apk upgrade --simulate' if you want to see the actions it'd do.

Updated by Natanael Copa over 1 year ago

I think apk version does the right thing here. It compares version of installed package with avaiable in index. If package is not installed (in this case subversion) then it shouldnt be compared with index either.

apk upgrade --interactive is also an option if you want check before you actually do.

We might want add a warning or soemthing to apk version when world has a dep that is not yet installed.

Updated by Ted Trask over 1 year ago

Ok, so this really was a problem with the upgrade to 1.10. I rsync'd the iso to the USB stick I boot off of, but not all of the needed packages were included in the iso. So, when I rebooted, not all of the packages were installed. Then, when I added the online repository, they were available to install.

Can we add some kind of warning on boot to say that not all packages were able to be installed (might want to use repository and cache)?

Updated by Natanael Copa about 1 year ago

  • Status changed from New to Rejected

i dont think its worth it.

Also available in: Atom PDF