From 8fbf27aa417408a00462e8709b6a32d47f15fc26 Mon Sep 17 00:00:00 2001
From: Andreas Loibl <andreas@andreas-loibl.de>
Date: Sat, 24 Sep 2011 20:25:19 +0200
Subject: Fix: sources.list didn't get combined when
 chroot_local-packages/*.deb were present

---
 config/chroot_local-hooks/sources.list-format | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/config/chroot_local-hooks/sources.list-format b/config/chroot_local-hooks/sources.list-format
index 7fcf14e..115cb71 100755
--- a/config/chroot_local-hooks/sources.list-format
+++ b/config/chroot_local-hooks/sources.list-format
@@ -1,6 +1,17 @@
 #!/bin/bash
 # update sources.list
 
+# Remove local package repository
+rm -f /etc/apt/sources.list.d/local-packages.list
+rm -rf /root/local-packages
+
+# Remove local packages key if it exists
+if apt-key list | grep -q "live-build-local-key@invalid"
+then
+	apt-key del "live-build-local-key@invalid"
+fi
+
+# Combine sources.list.d/*.list into a single sources.list file
 if [ -d /etc/apt/sources.list.d ]; then
 	for repo in /etc/apt/sources.list.d/*
 	do
-- 
cgit v1.0