urpm::main_loop

Section: Mageia Package Management (3)
Updated: 2019-05-25
Page Index
 

NAME

urpm::main_loop - The install/remove main loop for urpm based programs (urpmi, gurpmi, rpmdrake, drakx)  

SYNOPSIS

 

DESCRIPTION

run($urpm, $state, $something_was_to_be_done, $ask_unselect, $callbacks)
Run the main urpm loop:
mount removable media if needed
split the work in smaller transactions
for each transaction:
prepare the transaction
download packages needed for this small transaction
verify packages
split package that should be installed instead of upgraded,
install source package only (whatever the user is root or not, but use rpm for that)
install/remove other packages
migrate the chrooted rpmdb if needed
display the final success/error message(s)

Warning: locking is left to callers...

Parameters:

$urpm: the urpm object
$state: the state object (see URPM)
$something_was_to_be_done
$ask_unselect: an array ref of packages that could not be selected
$callbacks: a hash ref of callbacks :
packages download:
trans_log($mode, $file, $percent, $total, $eta, $speed): called for displaying download progress
post_download(): called after completing download of packages
interaction with user:
ask_yes_or_no($_title, $msg)
need_restart($need_restart_formatted) called when restarting urpmi is needed (priority upgrades)
message($_title, $msg): display a message (with a title for GUIes)
signature management:
pre_check_sig(): signature checking startup (for rpmdrake)
check_sig(): signature checking progress (for rpmdrake)
bad_signature($msg, $msg2): called when a package is not/badly signed
removable media management:
pre_removable(): called before handling removable media (for rpmdrake)
copy_removable($medium_name): called for asking inserting a CD/DVD
post_extract($set, $transaction_sources, $transaction_sources_install) called after handling removable media (for rpmdrake)
packages installation callbacks (passed to urpm::install::install(), see URPM for parameters)
open_helper(): called when opening a package, must return a fd
close_helper(): called when package is closed
inst() called for package opening/progress/end
trans() called for transaction opening/progress/end
uninst(): called for erasure progress
error() called for cpio, script or unpacking errors
finish callbacks (mainly GUI callbacks for rpmdrake/gurpmi/drakx)
completed(): called when everything is completed (for cleanups)
trans_error_summary($nok, $errors) called to warn than $nok transactions failed with $errors messages
success_summary() called on success
already_installed_or_not_installable($msg1, $msg2)
 

COPYRIGHT

Copyright (C) 1999-2005 MandrakeSoft SA

Copyright (C) 2005-2010 Mandriva SA

Copyright (C) 2011-2017 Mageia


 

Index

NAME
SYNOPSIS
DESCRIPTION
COPYRIGHT