diff options
Diffstat (limited to 'perl-install')
-rw-r--r-- | perl-install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/NEWS | 2 | ||||
-rw-r--r-- | perl-install/install/pkgs.pm | 45 |
3 files changed, 33 insertions, 16 deletions
diff --git a/perl-install/NEWS b/perl-install/NEWS index 7780e56d5..f00adf34c 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -1,3 +1,5 @@ +- recognize new kernel 4.1[89] drivers + Version 18.4 - 4 Nov 2018 - adapt drakdm and set_autologin for display-manager service, not prefdm (mga#22593) diff --git a/perl-install/install/NEWS b/perl-install/install/NEWS index 350c28d1d..18d4c09c4 100644 --- a/perl-install/install/NEWS +++ b/perl-install/install/NEWS @@ -1,3 +1,5 @@ +- recognize new kernel 4.1[89] drivers + Version 18.4 - 4 Nov 2018 - adapt set_autologin for display-manager service, not prefdm (mga#22593) diff --git a/perl-install/install/pkgs.pm b/perl-install/install/pkgs.pm index c859fb880..87ff120bb 100644 --- a/perl-install/install/pkgs.pm +++ b/perl-install/install/pkgs.pm @@ -842,10 +842,18 @@ sub _unselect_package { sub is_package_installed { my ($db, $pkg) = @_; my $check_installed; + my $done; + my $n=$pkg->name; $db->traverse_tag('name', [ $pkg->name ], sub { my ($p) = @_; + $done = 1; $check_installed ||= $pkg->compare_pkg($p) == 0; + log::l(">> ". $pkg->EVR . " vs ". $p->EVR. " --> check_installed=$check_installed\n"); + warn ">> ". $pkg->EVR . " vs ". $p->EVR. " --> check_installed=$check_installed\n"; + }); + my $real = `rpm -q $n`; + log::l("check_installed=0 for $n b/c pkg wasn't found in db VS $real") if !$done; return $check_installed; } @@ -865,26 +873,21 @@ sub _install_raw { log::l("rpm transactions start"); - my ($is_installing, $verify_just_closed); + my ($is_installing); my $exit_code = urpm::main_loop::run($packages, $packages->{state}, undef, undef, { - open_helper => $callback, + open_helper => sub { + my ($db, $packages, $type, $id) = @_; + log::l("OPENING (is_installing=$is_installing) ($db, $packages, $type, $id)\n"); + &$callback; + }, verify => sub { - my ($_data, $_cb_type, $_pkg_id, $subtype, $_amout, $_total, $_pkg_name) = @_; - if ($subtype eq 'start') { - $is_installing = 0; - } elsif ($subtype eq 'stop') { - $is_installing = 1; - $verify_just_closed = 1; - } + my ($data, $cb_type, $pkg_id, $subtype, $amout, $total) = @_; + log::l("VERIFY($data, $cb_type, $pkg_id, $subtype, $amout, $total)\n"); }, close_helper => sub { - my ($db, $packages, $_type, $id) = @_; + my ($db, $packages, $type, $id) = @_; + log::l("CLOSING (is_installing=$is_installing) ($db, $packages, $type, $id)\n"); &$callback; - # ignore first close after end of verify: - if ($is_installing && $verify_just_closed) { - undef $verify_just_closed; - return; - } return if !$is_installing; # don't check if it's installed if it's being verified my $pkg = defined $id && $packages->{depslist}[$id] or return; print $LOG $pkg->fullname . "\n"; @@ -898,7 +901,17 @@ sub _install_raw { } else { log::l($pkg->name . " not installed, " . URPM::rpmErrorString()); } - }, inst => $callback, + }, inst => sub { + my ($data, $cb_type, $pkg_id, $subtype, $amout, $total) = @_; + log::l("INSTALL($data, $cb_type, $pkg_id, $subtype, $amout, $total)\n"); + #eg: * VERIFY(urpm=HASH(0x35cd608), verify, 17729, progress, 1, 51, ) + if ($subtype eq 'start') { + $is_installing = 1; + } elsif ($subtype eq 'stop') { + $is_installing = 0; + } + &$callback; + }, trans => $callback, # FIXME: implement already_installed_or_not_installable bad_signature => sub { |