Bug #428

apk add --root fails

Added by Nathan Angelacos over 1 year ago. Updated over 1 year ago.

Status:Closed Start date:09/09/2010
Priority:Normal Due date:
Assignee:Timo Teräs % Done:

0%

Category:Aports
Target version:Alpine 2.0.2

Description

http://www.alpinelinux.org/wiki/Setting_up_a_basic_vserver#Setting_up_the_guest

mentions

 apk add --initdb --root /tmp/tmpdir alpine-base

however that returns

ERROR: Missing packages:
 alpine-base

turns out that apk tools from at least 1.10.1 onward need to have the keys and repository information in the root:

 mkidr -p /tmp/tmpdir/etc
 cp -a /etc/apk /tmp/tmpdir/etc
 apk add --initdb --root /tmp/tmpdir alpine-base

I would have assumed the initdb would have copied the repository information to the tmp root, or something.

History

Updated by Natanael Copa over 1 year ago

We had this discussion a year ago or so and the conclusion was that in addition to --root you also need:
--keys-dir /etc/apk/keys --repositories-file /etc/apk/repositories

Updated by Nathan Angelacos over 1 year ago

  • Status changed from New to Closed

Updated documentation on wiki to reflect ncopa's comments above.

Closing

Also available in: Atom PDF