Author: fw Date: 2008-06-17 19:52:51 +0000 (Tue, 17 Jun 2008) New Revision: 9091 Added: lib/python/dist_config.py Log: lib/python/dist_config.py: New file Added: lib/python/dist_config.py ==================================================================--- lib/python/dist_config.py (rev 0) +++ lib/python/dist_config.py 2008-06-17 19:52:51 UTC (rev 9091) @@ -0,0 +1,75 @@ +# dist_config.py -- describe how the Debian package database is assembled +# Copyright (C) 2008 Florian Weimer <fw at deneb.enyo.de> +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +""" +This Python moule describes how different views of the Debian package +database are assembled from a set of on-disk files. + +Each view is labeled by a purpose. Currently defined purposes are: + + overview: Used to generate the release overview web page. This + should not contain vulnerabilities which the security team + considers processed. + + debsecan: Used to generate the "fix is available" data for debsecan. + This should reflect the recommended set of sources.list + entries for the release. +""" + +###################################################################### +# Configuration section +###################################################################### + +def apply_config(): + # Invoked at the end of the file. Edit this to suit your needs. + + etch_archs = ''alpha,amd64,arm,hppa,i386,ia64,mips,mipsel,powerpc,s390,sparc''.split('','') + lenny_archs = etch_archs + [''armel'',] + + add_release(name=''etch'', + architectures=etch_archs, + ) + + add_release(name=''lenny'', + architectures=lenny_archs, + ) + + add_release(name=''sid'', + architectures=lenny_archs, + ) + +###################################################################### +# Support routines +###################################################################### + +releases = {} + +def add_release(name, architectures, + debsecan_part=('''', ''security''), + overview_part=('''', ''security'', ''proposed-updates'')): + import debian_support + name = debian_support.internRelease(name) + if releases.has_key(name): + raise ValueError("duplicate release", name) + releases[name] = {''architectures'' : architectures, + ''purpose'' : {''debsecan'' : debsecan_part, + ''overview'' : overview_part}} + +# Run the code in the configuration section + +apply_config() +del apply_config