Capture the repositories from source-repositories.

We try to expose metadata to users about what dib included in the
image and source-repositories was not doing that, so this fixes it. It
also permits easy introspection from other elements (such as an
upcoming PyPI cache layer).

Change-Id: I1e48e65f69ebe1f4556cc3bf35ccf195e99bcc76
This commit is contained in:
Robert Collins 2013-08-02 22:56:48 +12:00
parent 950fa15d64
commit c7c4ec19a3
2 changed files with 7 additions and 1 deletions

View File

@ -38,3 +38,7 @@ it will be renamed to \<destination\>
If mulitple elements register a source location with the same <destination>
then source-repositories will exit with an error. Care should therefore be taken
to only use elements together that download source to different locations.
The repository paths built into the image are stored in
etc/dib-source-repositories, one repository per line. This permits later review
of the repositories (by users or by other elements).

View File

@ -88,7 +88,9 @@ function get_repos_for_element(){
return 1
;;
esac
# Capture the in-instance repository path for later review / other
# elements (like a pypi dependency cache).
echo "$REPOPATH" | sudo dd of=$TMP_MOUNT_PATH/etc/dib-source-repositories oflag=append conv=notrunc
else
echo "Couldn't parse '$line' as a source repository"
return 1