apt.progress.text — Progress reporting for text interfaces

Progress reporting for text interfaces.

Acquire Progress Reporting

class apt.progress.text.AcquireProgress(outfile=None)

AcquireProgress for the text interface.

fail(item)

Called when an item is failed.

fetch(item)

Called when some of the item’s data is fetched.

ims_hit(item)

Called when an item is update (e.g. not modified on the server).

media_change(medium, drive)

Prompt the user to change the inserted removable media.

pulse(owner)

Periodically invoked while the Acquire process is underway.

Return False if the user asked to cancel the whole Acquire process.

start()

Start an Acquire progress.

In this case, the function sets up a signal handler for SIGWINCH, i.e. window resize signals. And it also sets id to 1.

stop()

Invoked when the Acquire process stops running.

CD-ROM Progress Reporting

class apt.progress.text.CdromProgress(outfile=None)

Text CD-ROM progress.

ask_cdrom_name()

Ask the user to provide a name for the disc.

change_cdrom()

Ask the user to change the CD-ROM.

update(text, current)

Set the current progress.

Operation Progress Reporting

class apt.progress.text.OpProgress(outfile=None)

Operation progress reporting.

This closely resembles OpTextProgress in libapt-pkg.

done()

Called once an operation has been completed.

update(percent=None)

Called periodically to update the user interface.