* Mon Jul 14 2025 Brian Read <brianr@koozali.org> 11.0.0-105.sme
- Adjust db opening in Software install panel [SME: 13077]
This commit is contained in:
parent
b0c6bea0a2
commit
1d00f2aeb2
@ -4,6 +4,12 @@ package SrvMngr::Controller::Yum;
|
|||||||
# heading : System
|
# heading : System
|
||||||
# description : Software installer
|
# description : Software installer
|
||||||
# navigation : 4000 500
|
# navigation : 4000 500
|
||||||
|
|
||||||
|
#$if_admin->get('/yum')->to('yum#main')->name('yum');
|
||||||
|
#$if_admin->post('/yum')->to('yum#do_display')->name('yumd1');
|
||||||
|
#$if_admin->get('/yumd')->to('yum#do_display')->name('yumd');
|
||||||
|
#$if_admin->post('/yumd')->to('yum#do_update')->name('yumu');
|
||||||
|
|
||||||
#
|
#
|
||||||
# routes : end
|
# routes : end
|
||||||
#----------------------------------------------------------------------
|
#----------------------------------------------------------------------
|
||||||
@ -23,20 +29,20 @@ my $dnf_status_file = '/var/cache/dnf/dnf.status';
|
|||||||
#use File::stat;
|
#use File::stat;
|
||||||
our %dbs;
|
our %dbs;
|
||||||
|
|
||||||
for (qw(available installed updates)) {
|
|
||||||
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
|
|
||||||
or die "Couldn't open dnf_$_ DB\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
for (qw(repositories)) {
|
|
||||||
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
|
|
||||||
or die "Couldn't open yum_$_ DB\n";
|
|
||||||
}
|
|
||||||
|
|
||||||
sub main {
|
sub main {
|
||||||
my $c = shift;
|
my $c = shift;
|
||||||
$c->app->log->info($c->log_req);
|
$c->app->log->info($c->log_req);
|
||||||
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||||
|
for (qw(available installed updates)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
|
||||||
|
or die "Couldn't open dnf_$_ DB\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (qw(repositories)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
|
||||||
|
or die "Couldn't open yum_$_ DB\n";
|
||||||
|
}
|
||||||
my %yum_datas = ();
|
my %yum_datas = ();
|
||||||
my $title = $c->l('yum_FORM_TITLE');
|
my $title = $c->l('yum_FORM_TITLE');
|
||||||
my $dest = 'yum';
|
my $dest = 'yum';
|
||||||
@ -63,6 +69,15 @@ sub do_display {
|
|||||||
my $rt = $c->current_route;
|
my $rt = $c->current_route;
|
||||||
my $trt = ($c->param('trt') || 'STAT');
|
my $trt = ($c->param('trt') || 'STAT');
|
||||||
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||||
|
for (qw(available installed updates)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
|
||||||
|
or die "Couldn't open dnf_$_ DB\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (qw(repositories)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
|
||||||
|
or die "Couldn't open yum_$_ DB\n";
|
||||||
|
}
|
||||||
my %yum_datas = ();
|
my %yum_datas = ();
|
||||||
my $title = $c->l('yum_FORM_TITLE');
|
my $title = $c->l('yum_FORM_TITLE');
|
||||||
my ($notif, $dest) = '';
|
my ($notif, $dest) = '';
|
||||||
@ -113,6 +128,16 @@ sub do_update {
|
|||||||
$c->app->log->info($c->log_req);
|
$c->app->log->info($c->log_req);
|
||||||
my $rt = $c->current_route;
|
my $rt = $c->current_route;
|
||||||
my $trt = $c->param('trt');
|
my $trt = $c->param('trt');
|
||||||
|
$cdb = esmith::ConfigDB::UTF8->open || die "Couldn't open config db";
|
||||||
|
for (qw(available installed updates)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open_ro("dnf_$_")
|
||||||
|
or die "Couldn't open dnf_$_ DB\n";
|
||||||
|
}
|
||||||
|
|
||||||
|
for (qw(repositories)) {
|
||||||
|
$dbs{$_} = esmith::ConfigDB::UTF8->open("yum_$_")
|
||||||
|
or die "Couldn't open yum_$_ DB\n";
|
||||||
|
}
|
||||||
my %yum_datas = ();
|
my %yum_datas = ();
|
||||||
$yum_datas{trt} = $trt;
|
$yum_datas{trt} = $trt;
|
||||||
my $title = $c->l('yum_FORM_TITLE');
|
my $title = $c->l('yum_FORM_TITLE');
|
||||||
@ -456,4 +481,4 @@ sub show_yum_log {
|
|||||||
my $yum_log = $cdb->get_prop_and_delete('dnf', 'LogFile');
|
my $yum_log = $cdb->get_prop_and_delete('dnf', 'LogFile');
|
||||||
return $out;
|
return $out;
|
||||||
} ## end sub show_yum_log
|
} ## end sub show_yum_log
|
||||||
1;
|
1;
|
@ -2,7 +2,7 @@ Summary: Sme server navigation module : manager 2
|
|||||||
%define name smeserver-manager
|
%define name smeserver-manager
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
%define version 11.0.0
|
%define version 11.0.0
|
||||||
%define release 104
|
%define release 105
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
Release: %{release}%{?dist}
|
Release: %{release}%{?dist}
|
||||||
License: GPL
|
License: GPL
|
||||||
@ -146,6 +146,9 @@ true
|
|||||||
%defattr(-,root,root)
|
%defattr(-,root,root)
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Jul 14 2025 Brian Read <brianr@koozali.org> 11.0.0-105.sme
|
||||||
|
- Adjust db opening in Software install panel [SME: 13077]
|
||||||
|
|
||||||
* Mon Jul 07 2025 Brian Read <brianr@koozali.org> 11.0.0-104.sme
|
* Mon Jul 07 2025 Brian Read <brianr@koozali.org> 11.0.0-104.sme
|
||||||
- Fix DB not open in Workgrouyp panel sometimes. [SME: 13070]
|
- Fix DB not open in Workgrouyp panel sometimes. [SME: 13070]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user