| Home | Trees | Indices | Help |
|
|---|
|
|
1 # Copyright (c) 2005-2008 rPath, Inc. 2 # 3 # This program is distributed under the terms of the Common Public License, 4 # version 1.0. A copy of this license should have been distributed with this 5 # source file in a file called LICENSE. If it is not present, the license 6 # is always available at http://www.rpath.com/permanent/licenses/CPL-1.0. 7 # 8 # This program is distributed in the hope that it will be useful, but 9 # without any warranty; without even the implied warranty of merchantability 10 # or fitness for a particular purpose. See the Common Public License for 11 # full details. 12 # 13 14 from conary import trove, versions 15 from conary.deps import deps 16 from conary.build import errors as builderrors 17 from conary.build import macros 18 from conary.build import use 19 from conary.build.recipe import Recipe, RECIPE_TYPE_REDIRECT 20 from conary.lib import log 2123 24 __slots__ = [ 'components', 'isRemove' ] 2531 3527 self.components = []2830 self.components += nameList37 38 __slots__ = [ 'targetName', 'targetBranch', 'targetFlavor', 'components' ] 39 isRemove = False 4047 5342 assert(targetName is not None) 43 _Redirect.__init__(self) 44 self.targetName = targetName 45 self.targetBranch = targetBranch 46 self.targetFlavor = targetFlavor55 __slots__ = [ 'destName', 'branchStr', 'sourceFlavor', 'targetFlavor', 56 'skipTargetMatching', 'sourceName', 'allowMultipleTargets' ] 5759 if self.branchStr is None: 60 # redirect to nothing 61 return set() 62 63 if self.branchStr[0] == '/': 64 branch = versions.VersionFromString(self.branchStr) 65 if not isinstance(branch, versions.Branch): 66 raise builderrors.RecipeFileError, \ 67 "Redirects must specify branches or labels, " \ 68 "not versions" 69 70 log.info('redirecting to branches is deprecated; redirects must ' 71 'be to labels') 72 73 matches = repos.