#NEWLINE# def addCapsuleChangesToChangeSet( self , changeSet , callback ) : #NEWLINE# #INDENT# '\n        Find added or removed packages in the target capusle database and place\n        the equivalent Conary operations into the given changeset.\n        ' #NEWLINE# ( removedTups , addedPkgs ) = self . getCapsuleChanges ( ) #NEWLINE# removedPkgs = [ ( x [ 0 ] . split ( ':' ) [ 0 ] , x [ 1 ] , x [ 2 ] ) for x in removedTups ] #NEWLINE# removedPkgs = [ tup for ( tup , exists ) in zip ( removedPkgs , self . db . hasTroves ( removedPkgs ) ) if exists ] #NEWLINE# for ( name , version , flavor ) in ( removedTups + removedPkgs ) : #NEWLINE# #INDENT# changeSet . oldTrove ( name , version , flavor ) #NEWLINE# #UNINDENT# for ( n , pkg ) in enumerate ( addedPkgs ) : #NEWLINE# #INDENT# self . _addPhantomTrove ( changeSet , pkg , callback , ( n + 1 ) , len ( addedPkgs ) )