From bed5d95e68387ea119cf55a5e1dfc9eb2b98554b Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Sun, 6 Aug 2006 09:06:43 +0000 Subject: add emi to upload packages in the queue when all the architectures are done --- emi | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100755 emi (limited to 'emi') diff --git a/emi b/emi new file mode 100755 index 0000000..f415e4c --- /dev/null +++ b/emi @@ -0,0 +1,62 @@ +#!/usr/bin/perl +# +# Copyright (C) 2005,2006 Mandriva +# +# Author: Florent Villard +# +# 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, 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# upload packages in queue when all the mandatory architectures are done +# +# TODO +# +# - take the packages in done/ and upload them with youri in queue/ +# - check that the mandatory architectures are present +# + +use strict; +use Iurt::Config qw(config_usage get_date); +my $program_name = 'emi'; + +my %run; +open(my $LOG, ">&STDERR"); +$run{LOG} = $LOG; +my $HOME = $ENV{HOME}; + +my $configfile = "$HOME/.emi.conf"; + +my $config; +if (-f $configfile) { + $config = do $configfile or die "FATAL $program_name: syntax error in $configfile"; +} else { + $config = {} +} + +my %config_usage = ( + arch => { + desc => "List of arch", + default => [ 'i586', 'x86_64', 'ppc' , 'sparc', 'sparc64' ], + }, + mandatory_arch => { + desc => 'List of mandatory architecture to be able to upload', + default => { i596 => 1, x86_64 => 1 }, + }, + tmp => { desc => "Temporary directory", default => "$HOME/tmp/"}, +); +config_usage(\%config_usage, $config) if $run{config_usage}; + +print {$run{LOG}} "$program_name\n"; + +exit -- cgit v1.2.1