From 6632f104c35bcd4daca88211863f4247bca091b0f5ea2d7e4443c2f66afc8131 Mon Sep 17 00:00:00 2001 From: Jordi Massaguer Date: Tue, 15 Mar 2016 11:47:01 +0000 Subject: [PATCH] add last minute changes on the migration process OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=85 --- docker.spec | 32 ++++++++++++++++++++++++++------ 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/docker.spec b/docker.spec index 8979893..d6e8b40 100644 --- a/docker.spec +++ b/docker.spec @@ -88,6 +88,8 @@ Requires: lvm2 >= 2.2.89 Requires: procps Requires: tar >= 1.26 Requires: xz >= 4.9 +# Not necessary, but must be installed to have a smooth upgrade. +Recommends: docker-image-migrator Conflicts: lxc < 1.0 PreReq: %fillup_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -259,8 +261,8 @@ install -p -m 644 man/man5/Dockerfile.5 %{buildroot}%{_mandir}/man5 %pre # We're currently inside rpmlint, which will cause us to fail the tests if it -# happens that the Docker install in the builder requires a migration. $BUILD -if [[ -z "$BUILD_ROOT" && -z "$DOCKER_FORCE_IMAGE_MIGRATION" ]] +# happens that the Docker install in the builder requires a migration. +if [[ -z "$BUILD_ROOT" ]] then # In order to make sure we don't print a scary warning when we shouldn't we # need to test these things (in this order): @@ -272,6 +274,12 @@ then # 4. Check that there are images in the graph/ directory. if [[ -d "%{docker_store}" && ( ! -f "%{docker_migration_testfile}" ) && -d "%{docker_store}" && -n "$(find "%{docker_store}" -maxdepth 1 -type d 2>/dev/null | grep -Ev '_tmp|^%{docker_store}$')" ]] then + + if [ -n "$DOCKER_FORCE_INSTALL" ] + then + echo >&2 "*** IGNORING DOWNTIME WARNING! FORCING INSTALLATION. ***" + else + cat >&2 <