crans_bcfg2/Python/etc/apt/sources.list
Nicolas Dandrimont cbdbfa6993 [sources.list] Miroir local pour les backports
darcs-hash:20100103140619-ffbb2-225b2a0b8a91a78c0c588d2e252c61accba0c426.gz
2010-01-03 15:06:19 +01:00

51 lines
1.5 KiB
Python

# -*- mode: python; coding: utf-8 -*-
include("mode/space")
header()
distro = metadata.categories["debian-version"]
# Dépôt
if has("debian-mirror"):
repo = "file:/mirror"
else:
repo = "ftp://mirror.adm.crans.org"
def source(args):
print "deb " + args
print "deb-src " + args
if has("ovh"):
source("ftp://mir1.ovh.net/debian/ %s main contrib" % distro)
source("ftp://security.debian.org/ %s/updates main" % distro)
@# Paquet construit a la main
source("%s/custom ./" % repo)
else:
# Pour les mises a jour de sécurité on utilise pas de mirroir...
if has("adm-only"):
# ... sauf si le serveur ne voit pas le reste du monde ...
source("%s/debian-security %s/updates main" % (repo, distro))
else:
source("ftp://security.debian.org/debian-security %s/updates main" % distro)
if has("firmware-bnx2"):
source("%s/debian %s main contrib non-free" % (repo, distro))
else:
source("%s/debian %s main contrib" % (repo, distro))
# Pour quand ça sera fait:
if not has("squeeze"): # and has("need-volatile"):
source("%s/debian-volatile %s/volatile main contrib" % (repo, distro))
if has("multimedia"):
@# Mplayer, generation des vignettes
source("%s/debian-multimedia %s main" % (repo, distro))
@# Paquets construits à la main
source("%s/custom ./" % repo)
if has("rouge") or has("owl"):
@# Backports pour dovecot et roundcube
source("%s/debian-backports %s-backports main contrib" % (repo, distro))