Comment 14 for bug 1574113

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: No way to inject apt archive/mirror key 'in-target' before apt starts processing packages

Paolo,

Again, we highly recommend you create a mirror properly to not have this issue, however, Scott Moser suggested this may work if you wanted to inject the key:

# This is an example of a yaml 'anchor' that allows you to reference
# a string which makes typing things more easily read and reduces
# need for escaping. 'myscript' is defined as an anchor here in the
# arbitrarily named 'bucket' and then referenced as the argument to
# sh below via '*myscript'.
bucket:
 - &myscript |
   echo "hi mom. i'm running in your target"

# curtin's 'curthooks' stage installs packages into the target
# the default entry in this dictionary is:
# builtin: [curtin, curthooks]
#
# entries added to the curthooks_commands dictionary are executed
# in C locale sorted order. So to run before 'builtin', you
# need to start with something before that.
curthooks_commands:
  aa_pre_curthooks01: [curtin, in-target, "--", sh, -c, *myscript]