Package conary :: Module callbacks :: Class UpdateCallback
[hide private]
[frames] | no frames]

Class UpdateCallback

source code

   object --+        
            |        
     Callback --+    
                |    
ChangesetCallback --+
                    |
                   UpdateCallback
Known Subclasses:
checkin.CheckinCallback, updatecmd.UpdateCallback

Instance Methods [hide private]
 
resolvingDependencies(self)
Called after requested troves have been found and before it resolves dependencies.
source code
 
creatingRollback(self)
Called when a local rollback changeset is being created.
source code
 
preparingUpdate(self, troveNum, troveCount)
Called while preparing to apply a given trove to the local file system.
source code
 
creatingDatabaseTransaction(self, troveNum, troveCount)
Called when creating a database transaction for each trove.
source code
 
restoreFiles(self, size, totalSize)
Called right before writing a file to the file system.
source code
 
removeFiles(self, fileNum, total)
Called right before removing each file during an update or rollback.
source code
 
runningPreTagHandlers(self)
Called right before running the pre action of tag handlers.
source code
 
runningPostTagHandlers(self)
Called right before running the post action of tag handlers.
source code
 
committingTransaction(self)
Called right before committing a database transaction.
source code
 
updateDone(self)
Called when each update job finishes.
source code
 
tagHandlerOutput(self, tag, msg, stderr=False)
Called when a tag handler outputs text to stdout or stderr.
source code
 
troveScriptOutput(self, typ, msg)
Called for each line of output generated by the trove script execution.
source code
 
troveScriptStarted(self, typ)
Called when the script starts to execute
source code
 
troveScriptFinished(self, typ)
Called upon a successful execution of the script.
source code
 
troveScriptFailure(self, typ, errcode)
Called if the script execution fails
source code
 
setUpdateHunk(self, hunk, hunkCount)
Called before applying a given update job.
source code
 
setUpdateJob(self, job)
Called right before applying the given update job.
source code
 
done(self)
Called after an update.
source code
 
checkAbort(self) source code
 
setAbortEvent(self, event=None) source code
 
verifyTroveSignatures(self, trv) source code
 
setTrustThreshold(self, trustThreshold) source code
 
__init__(self, trustThreshold=0, keyCache=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code

Inherited from ChangesetCallback: downloadingChangeSet, downloadingFileContents, error, missingFiles, preparingChangeSet, requestingChangeSet, requestingFileContents, sendingChangeset, setChangesetHunk, setRate, warning

Inherited from Callback: __getattribute__, cancelOperation

Inherited from Callback (private): _exceptionOccured

Inherited from object: __delattr__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

resolvingDependencies(self)

source code 
Called after requested troves have been found and before it resolves dependencies.
Returns:
None

creatingRollback(self)

source code 
Called when a local rollback changeset is being created.
Returns:
None

preparingUpdate(self, troveNum, troveCount)

source code 
Called while preparing to apply a given trove to the local file system.
Parameters:
  • troveNum (integer) - the number of the trove currently being examined (starts at 1)
  • troveCount (integer @return None) - the total number of troves to be applied.

creatingDatabaseTransaction(self, troveNum, troveCount)

source code 
Called when creating a database transaction for each trove.
Parameters:
  • troveNum (integer) - the number of the trove currently being examined (starts at 1)
  • troveCount (integer) - the total number of troves.
Returns:
None

restoreFiles(self, size, totalSize)

source code 
Called right before writing a file to the file system.
Parameters:
  • size (integer) - number of bytes in the current file
  • totalSize (integer) - total number of bytes to be written in the current file system job
Returns:
None

removeFiles(self, fileNum, total)

source code 
Called right before removing each file during an update or rollback.
Parameters:
  • fileNum (integer) - the number of the file being removed (starts at 1).
  • total (integer) - total number of files to be removed.
Returns:
None

runningPreTagHandlers(self)

source code 
Called right before running the pre action of tag handlers.
Returns:
None

runningPostTagHandlers(self)

source code 
Called right before running the post action of tag handlers.
Returns:
None

committingTransaction(self)

source code 
Called right before committing a database transaction. This is called at the end of each update job.
Returns:
None

updateDone(self)

source code 
Called when each update job finishes. Recall that an update operation may be split into multiple jobs.
Returns:
None

tagHandlerOutput(self, tag, msg, stderr=False)

source code 
Called when a tag handler outputs text to stdout or stderr. This method is called once for each line that's output.
Parameters:
  • tag (string) - name of the tag handler
  • msg (string) - line that was output
  • stderr (boolean) - whether this was output to stderr. False indicates this was output to stdout.
Returns:
None

troveScriptOutput(self, typ, msg)

source code 
Called for each line of output generated by the trove script execution.
Parameters:
  • typ (string) - contains the name of the trove followed by stage, where stage is one of "postrollback", "postupdate", "postinstall", "preupdate", e.g. "group-dist postupdate"
  • msg (string) - the line output by the trove script.
Returns:
None

troveScriptFinished(self, typ)

source code 
Called upon a successful execution of the script. If the script failed, scriptFailure is called instead

troveScriptFailure(self, typ, errcode)

source code 
Called if the script execution fails
Parameters:
  • typ (string) - name of the script followed by stage.
  • errcode (integer) - non-zero error code returned by the trove script.
Returns:
None

setUpdateHunk(self, hunk, hunkCount)

source code 
Called before applying a given update job.
Parameters:
  • hunk (integer) - the number of the update job being applied (starts at 1)
  • hunkCount (integer) - the total number of update jobs.
Returns:
None

setUpdateJob(self, job)

source code 
Called right before applying the given update job.
Parameters:
  • job (a set, where each item is a tuple containing (troveName, (oldVersionSpec, oldFlavor), (newVersionSpec, newFlavor), isAbsolute) @see conaryclient.update.ClientUpdate.prepareUpdateJob) - the update job about to be applied.
Returns:
None

done(self)

source code 

Called after an update.

More specifically, when:
  • an update finishes
  • a fatal exception occurs before an update
  • the info option is passed in and after the job set is determined
  • extra troves are resolved in after the job set is determined
  • after restarting an update that contains critical troves
Overrides: ChangesetCallback.done

checkAbort(self)

source code 
Overrides: ChangesetCallback.checkAbort

__init__(self, trustThreshold=0, keyCache=None)
(Constructor)

source code 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: ChangesetCallback.__init__