From 7f0ae7928a3e2bb37c7db20d23251fdd156c8f0a Mon Sep 17 00:00:00 2001
From: Steven Armstrong <steven@icarus.ethz.ch>
Date: Mon, 19 Nov 2012 13:04:57 +0100
Subject: [PATCH] fix state explorer to properly detect already existing ppa

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
---
 cdist/conf/type/__apt_ppa/explorer/state | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cdist/conf/type/__apt_ppa/explorer/state b/cdist/conf/type/__apt_ppa/explorer/state
index 2d8ca7c5..2bb4f65a 100755
--- a/cdist/conf/type/__apt_ppa/explorer/state
+++ b/cdist/conf/type/__apt_ppa/explorer/state
@@ -26,7 +26,7 @@ name="$__object_id"
 . /etc/lsb-release
 
 repo_name="${name#ppa:}"
-repo_file_name="$(echo "$repo_name" | sed "s:\/:\-:")-${DISTRIB_CODENAME}.list"
+repo_file_name="$(echo "$repo_name" | sed -e "s|[/:]|-|" -e "s|\.|_|")-${DISTRIB_CODENAME}.list"
 
 [ -s "/etc/apt/sources.list.d/${repo_file_name}" ] \
    && echo present || echo absent