Try to automate grml-live pool handling
authorMichael Prokop <devnull@localhost>
Thu, 25 Oct 2007 07:54:00 +0000 (09:54 +0200)
committerMichael Prokop <devnull@localhost>
Thu, 25 Oct 2007 07:54:00 +0000 (09:54 +0200)
debian/changelog
etc/grml/fai/apt/sources.list
etc/grml/grml-live.conf
grml-live

index 0747b6c..ce27751 100644 (file)
@@ -9,7 +9,9 @@ grml-live (0.0.7) unstable; urgency=low
     - buildd/functions.sh: do not mv files if there was an error
       during grml-live execution
   * Added new grml-repository named grml-live which is intented
-    to fix issues from Debian for grml-live builds.
+    to fix issues from Debian for grml-live builds. It is automatically
+    activated if you are building against unstable/sid and should
+    be used manually only if you realy know what you are doing. :)
   * Use apt-pinning via /etc/grml/fai/config/hooks/instsoft.GRMLBASE
     already and remove it from /etc/grml/fai/config/scripts/GRMLBASE/33-aptsetup
   * Display version number of grml-live.
index 3e31f01..4bf5efd 100644 (file)
@@ -1,4 +1,3 @@
 deb http://deb.grml.org/            grml-stable  main
 deb http://deb.grml.org/            grml-testing main
-deb http://deb.grml.org/            grml-live    main
 deb http://ftp.de.debian.org/debian etch         main contrib non-free
index 920f9ad..7a3044f 100644 (file)
@@ -44,7 +44,6 @@ CLASSES="GRMLBASE,GRML_MEDIUM,I386"
 #deb http://192.168.1.112/debian     etch         main contrib non-free
 #deb http://deb.grml.org/            grml-stable  main
 #deb http://deb.grml.org/            grml-testing main
-#deb http://deb.grml.org/            grml-live    main
 #deb http://ftp.de.debian.org/debian etch         main contrib non-free
 #"
 
index 1ec32e5..171457f 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -252,6 +252,11 @@ if [ -n "$SUITE" ] ; then
    DIST="\|\ etch\ \|\ stable\ \|\ lenny\ \|\ testing\ \|\ sid\ \|\ unstable\ "
    sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" $LIVE_CONF
    sed -i "s/\(deb .\+\)\([ \t]+\)$DIST\([ \t]+\)\(main \)/\1\2 $SUITE \3\4/" /etc/grml/fai/apt/sources.list
+   # notice: activate grml-live pool only if we are building against unstable:
+   if grep -qe unstable -qe sid /etc/grml/fai/apt/sources.list ; then
+      grep grml-stable /etc/grml/fai/apt/sources.list | \
+           sed 's/grml-stable/grml-live/' >> /etc/grml/fai/apt/sources.list
+   fi
 
    sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $LIVE_CONF
    sed -i "s|FAI_DEBOOTSTRAP=\"[a-z]* |FAI_DEBOOTSTRAP=\"$SUITE |" $NFSROOT_CONF