diff options
| author | Sergio <sergiotarxz@posteo.net> | 2026-09-14 11:53:42 +0200 |
|---|---|---|
| committer | Sergio <sergiotarxz@posteo.net> | 2026-09-14 11:53:42 +0200 |
| commit | 0440862a429a73db6f76f405e689e007f93bec44 (patch) | |
| tree | 5837c563507da9de7db9c428982a14e4e67ff9cb | |
| parent | 18efd847db5ca03a65c75bfc21917ad78c8a558f (diff) | |
Running depclean after update.v1.0.0-rc4
| -rw-r--r-- | lib/AlgaOS/Updater/GUI.pm | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/lib/AlgaOS/Updater/GUI.pm b/lib/AlgaOS/Updater/GUI.pm index 2e541c0..ed7d375 100644 --- a/lib/AlgaOS/Updater/GUI.pm +++ b/lib/AlgaOS/Updater/GUI.pm @@ -156,9 +156,11 @@ sub is_there_updates($self) { sub _check_pid($self) { if ( 0 < waitpid $self->pid, WNOHANG ) { $self->_have_update( $? == 0 ); - if ($self->_have_update) { - $self->notify('Hay actualizaciones disponibles, para mantener su ordenador seguro actualice ahora.'); - } + if ( $self->_have_update ) { + $self->notify( +'Hay actualizaciones disponibles, para mantener su ordenador seguro actualice ahora.' + ); + } if ( $self->_have_update && $self->_have_update != $self->_frontend_shows_update ) { @@ -275,17 +277,20 @@ sub _update($self) { $self->activate; my $pid = fork; if ( !$pid ) { - if ( !system qw{sudo emerge --getbinpkg -uUDN @world @system} ) { - exit 0; + if ( system qw{sudo emerge --getbinpkg -uUDN @world @system} ) { + exit 1; } - exit 1; + if ( system qw{sudo emerge --depclean} ) { + exit 1; + } + exit 0; } $self->app->timeout_add( 1000, sub { if ( 0 < waitpid $pid, WNOHANG ) { say 'Update finished'; - $self->notify('La actualización terminó'); + $self->notify('La actualización terminó'); $self->_have_update(0); $self->_is_updating(0); $self->_frontend_shows_update(1); |
