From fa7a264f4bf2234926533d753c74ebbdee73a33c Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Tue, 9 Dec 2008 21:53:10 +0100 Subject: [PATCH] [bcfg2] plus besoin de ces horreurs darcs-hash:20081209205310-af139-8f0b08b603eb23e6e6e4b63276a11e6f791b186a.gz --- bcfg2/create-versions-index.py | 53 ---------------------------------- bcfg2/create-versions-index.sh | 18 ------------ 2 files changed, 71 deletions(-) delete mode 100755 bcfg2/create-versions-index.py delete mode 100755 bcfg2/create-versions-index.sh diff --git a/bcfg2/create-versions-index.py b/bcfg2/create-versions-index.py deleted file mode 100755 index 76056c01..00000000 --- a/bcfg2/create-versions-index.py +++ /dev/null @@ -1,53 +0,0 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- -# -# create-versions-index.py -# ------------------------ -# -# Copyright (C) 2008 Jeremie Dimino -# -# This file 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 file 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., 59 Temple Street #330, Boston, MA 02111-1307, USA. - -'''Outil pour générer la liste des paquets avec leurs version pour le -plugin Rules de bcfg2.''' - -__all__ = [] - -import apt_pkg, sys, os, time - -apt_pkg.init() -ver = {} -for line in sys.stdin: - [name, new_ver] = line.split() - old_ver = ver.get(name, None) - if not old_ver or apt_pkg.VersionCompare(new_ver, old_ver) > 0: - ver[name] = new_ver - -list = ver.items() -list.sort() - -print ("" % - (time.ctime(), os.path.basename(sys.argv[0]))) - - -print '' -print '' % sys.argv[2] -print '' % sys.argv[1] - -for (name,ver) in list: - print '' % (name, ver) - -print '' - diff --git a/bcfg2/create-versions-index.sh b/bcfg2/create-versions-index.sh deleted file mode 100755 index 1f1779ce..00000000 --- a/bcfg2/create-versions-index.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# Outil pour générer la liste des paquets pour bcfg2 - -generate () { - # $1 = distribution (etch, lenny, ...) - distrib=$1 - arch=$2 - arch2=$3 - zcat $(locate -r "/$distrib/.*/binary-$arch/Packages.gz$") /mirror/custom/Packages.gz | \ - awk '$1 == "Package:" {printf "%s ", $2} $1 == "Version:" {print $2}' | \ - /usr/scripts/bcfg2/create-versions-index.py $arch2 $distrib > /usr/scripts/var/bcfg2/packages-generated-$distrib-$arch2.xml -} - -generate etch i386 i686 -generate etch amd64 x86_64 -generate lenny i386 i686 -generate lenny amd64 x84_64