<s> from conary import trove <EOL> from conary . build import filter , policy <EOL> from conary . build import capsulepolicy , derivedpolicy <EOL> class ComponentSpec ( capsulepolicy . ComponentSpec ) : <EOL> processUnmodified = True <EOL> def doProcess ( self , recipe ) : <EOL> for trvCs in self . recipe . cs . iterNewTroveList ( ) : <EOL> trv = trove . Trove ( trvCs ) <EOL> if not trv . isCollection ( ) : <EOL> f = filter . PathSet ( ( x [ <NUM_LIT:1> ] for x in trv . iterFileList ( ) ) , <EOL> name = trv . getName ( ) . split ( '<STR_LIT::>' ) [ <NUM_LIT:1> ] ) <EOL> self . derivedFilters . append ( f ) <EOL> capsulepolicy . ComponentSpec . doProcess ( self , recipe ) <EOL> PackageSpec = derivedpolicy . PackageSpec <EOL> Flavor = derivedpolicy . Flavor <EOL> Requires = derivedpolicy . Requires <EOL> Provides = derivedpolicy . Provides <EOL> ComponentRequires = derivedpolicy . ComponentRequires <EOL> ComponentProvides = derivedpolicy . ComponentRequires <EOL> ByDefault = derivedpolicy . ByDefault <EOL> TagSpec = derivedpolicy . TagSpec <EOL> class CapsuleModifications ( policy . Policy ) : <EOL> """<STR_LIT>""" <EOL> bucket = policy . PACKAGE_CREATION <EOL> filetree = policy . PACKAGE <EOL> processUnmodified = False <EOL> requires = ( <EOL> ( '<STR_LIT>' , policy . REQUIRED_PRIOR ) , <EOL> ( '<STR_LIT>' , policy . REQUIRED_PRIOR ) , <EOL> ) <EOL> def doFile ( self , filename ) : <EOL> capPath = self . recipe . _getCapsulePathsForFile ( filename ) <EOL> for pkg in self . recipe . autopkg . findComponents ( filename ) : <EOL> f = pkg . getFile ( filename ) <EOL> f . flags . isCapsuleOverride ( True ) <EOL> if not capPath : <EOL> f . flags . isCapsuleAddition ( True ) <EOL> f . flags . isEncapsulatedContent ( False ) </s>
