Standardise manifest creation and retrieval

Bring in line with the manifest standardisation in review
I37eff5a13a14564e1adc33eb4f0144d571267617

This:
    * Removes the pip-manifest cleanup script and corresponding
      README documentation
    * Adds a dependency on the manifests element
    * Uses the manifests element for manifest location and copy to
      build area
    * Standardises the manifest naming

Change-Id: I8ab0796a8e19419bf40c1ebc94a7eb04e3ba9180
This commit is contained in:
Jon-Paul Sullivan 2014-03-28 18:06:28 +00:00
parent ed48d6d271
commit cdb8b49f5d
6 changed files with 10 additions and 17 deletions

View File

@ -55,9 +55,3 @@ into the image chroot environment.
### 01-pip-manifest
Installs the scripts in this element into the image for later use by other elements.
## cleanup.d
### 01-copy-pip-manifests
Runs outside of the chroot and copies created manifests back to the
build environment for re-use in repeating the image build.

View File

@ -18,7 +18,8 @@
set -eux
name=${1:?"Usage: ${0} <name>"}
build_manifest=/etc/dib-pip-manifests/dib-pip-build-manifest-${name//[^A-Za-z0-9]/_}
build_manifest=${DIB_MANIFEST_PIP_DIR}/dib-pip-build-manifest-${name//[^A-Za-z0-9]/_}
if [[ -f "${build_manifest}" ]]; then
echo "${build_manifest}"

View File

@ -19,4 +19,6 @@ set -eux
name=${1:?"Usage: ${0} <name>"}
pip freeze -l | tee /etc/dib-pip-manifests/dib-pip-manifest-${name//[^A-Za-z0-9]/_}
manifest_name=dib-manifest-pip-${name//[^A-Za-z0-9]/_}
pip freeze -l | tee ${DIB_MANIFEST_PIP_DIR}/${manifest_name}

View File

@ -0,0 +1 @@
manifests

View File

@ -15,10 +15,6 @@
# License for the specific language governing permissions and limitations
# under the License.
#
set -eux
set -eu
if [ -d $TMP_MOUNT_PATH/etc/dib-pip-manifests ]; then
mkdir -p ${IMAGE_NAME}-manifests
cp --no-preserve=ownership -rv $TMP_MOUNT_PATH/etc/dib-pip-manifests \
${IMAGE_NAME}-manifests/
fi
export DIB_MANIFEST_PIP_DIR=${DIB_MANIFEST_PIP_DIR:-${DIB_MANIFEST_IMAGE_DIR}/dib-manifests-pip}

View File

@ -17,11 +17,10 @@
#
set -eux
dib_pip_manifest_dir=$TMP_MOUNT_PATH/etc/dib-pip-manifests
sudo mkdir $dib_pip_manifest_dir
sudo mkdir -p $TMP_MOUNT_PATH/$DIB_MANIFEST_PIP_DIR
# Find all of the pip manifests and copy them into the image for use in install.d
for manifest in ${!DIB_PIP_MANIFEST_*}
do
sudo cp ${!manifest} $dib_pip_manifest_dir/dib-pip-build-manifest-${manifest##DIB_PIP_MANIFEST_}
sudo cp ${!manifest} $TMP_MOUNT_PATH/$DIB_MANIFEST_PIP_DIR/dib-pip-build-manifest-${manifest##DIB_PIP_MANIFEST_}
done