From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 08/12] ts-guests-nbd-mirror: purge old packages first Date: Tue, 11 Feb 2014 15:25:50 +0000 Message-ID: <1392132354-7594-9-git-send-email-ian.jackson@eu.citrix.com> References: <1392132354-7594-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WDFDy-00080p-K7 for xen-devel@lists.xenproject.org; Tue, 11 Feb 2014 15:26:14 +0000 In-Reply-To: <1392132354-7594-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Purge any old nbd-client and nbd-server _before_ we make their config. This only has any effect if the packages are installed before this script starts, which isn't the case in any of the automatically-run recipes. But it can occur when the script is being tested by hand. Signed-off-by: Ian Jackson --- ts-guests-nbd-mirror | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ts-guests-nbd-mirror b/ts-guests-nbd-mirror index 89508dd..c0a021a 100755 --- a/ts-guests-nbd-mirror +++ b/ts-guests-nbd-mirror @@ -52,6 +52,8 @@ sub findvols () { } sub configserver () { + target_cmd_root($sho, "dpkg --purge nbd-server ||:"); + my $scfg= <{Ix}]=$sho->{Name} NBD_PORT[$v->{Ix}]=$v->{Port} END } - target_cmd_root($cho, "dpkg --purge nbd-client ||:"); target_putfilecontents_root_stash($cho,10,$ccfg,"/etc/nbd-client"); target_install_packages($cho, qw(nbd-client)); } -- 1.7.10.4