""" This class represents the list of buildroots in a slave """ # 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 Library 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. # Copyright 2004 Dries Verachtert import config from log4py import Logger class BuildRootList: def __init__(self): self.__config = config.Config.getInstance() self.__cat = Logger().get_instance(self) self.buildroots = [] def addBuildRoot(self,buildRoot): self.__cat.debug("start") self.buildroots.append(buildRoot) def getBuildRootByBuildRootTag(self,tag): self.__cat.debug("start, tag=" + str(tag)) for i in self.buildroots: if i.getBuildRootTag() == tag: return i return None def getDistroArchTags(self): retval = [] for i in self.buildroots: retval.append(i.getBuildRootTag()) return retval