diff options
author | Angelo Naselli <anaselli@linux.it> | 2015-03-16 18:16:50 +0100 |
---|---|---|
committer | Angelo Naselli <anaselli@linux.it> | 2015-03-16 18:16:50 +0100 |
commit | fc9772f1f03684e8dab50ff77d2c46c5e0309c7b (patch) | |
tree | 375b76cf80e5d816eb48a4badf3bb949199ef220 /lib/AdminPanel/Rpmdragora | |
parent | 825922057a21a9b09c60edf4b44535d7fd49926d (diff) | |
download | manatools-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar manatools-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.gz manatools-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.bz2 manatools-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.tar.xz manatools-fc9772f1f03684e8dab50ff77d2c46c5e0309c7b.zip |
Moved to namespace to ManaTools
Diffstat (limited to 'lib/AdminPanel/Rpmdragora')
-rw-r--r-- | lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm | 32 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/formatting.pm | 8 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/gui.pm | 56 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/gurpm.pm | 12 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/icon.pm | 8 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/init.pm | 18 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/open_db.pm | 6 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/pkg.pm | 42 | ||||
-rw-r--r-- | lib/AdminPanel/Rpmdragora/rpmnew.pm | 14 |
9 files changed, 98 insertions, 98 deletions
diff --git a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm index 741525b0..c7569646 100644 --- a/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm +++ b/lib/AdminPanel/Rpmdragora/edit_urpm_sources.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::edit_urpm_sources; +package ManaTools::Rpmdragora::edit_urpm_sources; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -35,13 +35,13 @@ use MDK::Common::File qw(cat_ output); use MDK::Common::DataStructure qw(member put_in_hash uniq); use MDK::Common::Various qw(to_bool); -use AdminPanel::Shared; -use AdminPanel::Shared::Locales; -use AdminPanel::rpmdragora; -use AdminPanel::Rpmdragora::init; -use AdminPanel::Rpmdragora::open_db; -use AdminPanel::Rpmdragora::formatting; -use AdminPanel::Shared::GUI; +use ManaTools::Shared; +use ManaTools::Shared::Locales; +use ManaTools::rpmdragora; +use ManaTools::Rpmdragora::init; +use ManaTools::Rpmdragora::open_db; +use ManaTools::Rpmdragora::formatting; +use ManaTools::Shared::GUI; use URPM::Signature; use urpm::media; use urpm::download; @@ -65,7 +65,7 @@ my %col = ( }, ); -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); sub get_medium_type { my ($medium) = @_; @@ -142,7 +142,7 @@ sub easy_add_callback_with_mirror() { #- cooker and community don't have update sources my $want_base_distro = _want_base_distro(); defined $want_base_distro or return 0; - my $distro = $AdminPanel::rpmdragora::mageia_release; + my $distro = $ManaTools::rpmdragora::mageia_release; my ($mirror) = choose_mirror($urpm, message => $loc->N("This will attempt to install all official sources corresponding to your distribution (%s).\n @@ -1302,7 +1302,7 @@ sub keys_callback() { }; my $add_key = sub { - my $sh_gui = AdminPanel::Shared::GUI->new(); + my $sh_gui = ManaTools::Shared::GUI->new(); my $item = $mediaTbl->selectedItem(); if ($item) { $current_medium = $item->label(); @@ -1331,7 +1331,7 @@ sub keys_callback() { }; my $remove_key = sub { - my $sh_gui = AdminPanel::Shared::GUI->new(); + my $sh_gui = ManaTools::Shared::GUI->new(); my $keyItem = $keyTbl->selectedItem(); my $mediaItem = $mediaTbl->selectedItem(); if ($keyItem && $mediaItem) { @@ -1467,7 +1467,7 @@ sub readMedia { ## NOTE anaselli: next lines add check icon to cells, but they are 8x8, a dimension should ## be evaluated by font size, so disabled atm # my $cell = $item->cell(0); # Checked -# my $checkedIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Check_8x8.png'); +# my $checkedIcon = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Check_8x8.png'); # # $cell->setIconName($checkedIcon) if (!$_->{ignore}); # $cell = $item->cell(1); # Updates @@ -1675,8 +1675,8 @@ sub mainwindow() { $hbox = $factory->createHBox( $vbox_commands ); ## TODO icon and label for ncurses - my $upIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Up_16x16.png'); - my $downIcon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), 'images/Down_16x16.png'); + my $upIcon = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Up_16x16.png'); + my $downIcon = File::ShareDir::dist_file(ManaTools::Shared::distName(), 'images/Down_16x16.png'); my $upButton = $factory->createPushButton($factory->createHBox($hbox), $loc->N("Up")); my $downButton = $factory->createPushButton($factory->createHBox($hbox), $loc->N("Down")); $upButton->setIcon($upIcon); @@ -1725,7 +1725,7 @@ sub mainwindow() { my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n"); $translators =~ s/\</\<\;/g; $translators =~ s/\>/\>\;/g; - my $sh_gui = AdminPanel::Shared::GUI->new(); + my $sh_gui = ManaTools::Shared::GUI->new(); $sh_gui->AboutDialog({ name => "Rpmdragora", version => $VERSION, credits => $loc->N("Copyright (C) %s Mageia community", '2013-2014'), diff --git a/lib/AdminPanel/Rpmdragora/formatting.pm b/lib/AdminPanel/Rpmdragora/formatting.pm index da429a5f..83a960ab 100644 --- a/lib/AdminPanel/Rpmdragora/formatting.pm +++ b/lib/AdminPanel/Rpmdragora/formatting.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::formatting; +package ManaTools::Rpmdragora::formatting; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -30,8 +30,8 @@ use strict; use utf8; use POSIX qw(strftime); use MDK::Common::Various qw(internal_error); -use AdminPanel::Shared::Locales; -use AdminPanel::rpmdragora; +use ManaTools::Shared::Locales; +use ManaTools::rpmdragora; use urpm::msg; @@ -56,7 +56,7 @@ our @EXPORT = qw( urpm_name ); -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); sub escape_text_for_TextView_markup_format { my ($str) = @_; diff --git a/lib/AdminPanel/Rpmdragora/gui.pm b/lib/AdminPanel/Rpmdragora/gui.pm index b244c95f..0cf08822 100644 --- a/lib/AdminPanel/Rpmdragora/gui.pm +++ b/lib/AdminPanel/Rpmdragora/gui.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::gui; +package ManaTools::Rpmdragora::gui; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -42,16 +42,16 @@ use MDK::Common::String qw(formatAlaTeX); use MDK::Common::Math qw(sum); use MDK::Common::System qw(list_passwd); -use AdminPanel::rpmdragora; -use AdminPanel::Rpmdragora::open_db; -use AdminPanel::Rpmdragora::formatting; -use AdminPanel::Rpmdragora::init; -use AdminPanel::Rpmdragora::icon qw(get_icon_path); -use AdminPanel::Rpmdragora::pkg; -use AdminPanel::Shared; -use AdminPanel::Shared::GUI; -use AdminPanel::Shared::Locales; -use AdminPanel::Shared::RunProgram qw(get_stdout raw); +use ManaTools::rpmdragora; +use ManaTools::Rpmdragora::open_db; +use ManaTools::Rpmdragora::formatting; +use ManaTools::Rpmdragora::init; +use ManaTools::Rpmdragora::icon qw(get_icon_path); +use ManaTools::Rpmdragora::pkg; +use ManaTools::Shared; +use ManaTools::Shared::GUI; +use ManaTools::Shared::Locales; +use ManaTools::Shared::RunProgram qw(get_stdout raw); use yui; use feature 'state'; use Carp; @@ -97,8 +97,8 @@ our @EXPORT = qw( setInfoOnWidget ); -my $loc = AdminPanel::rpmdragora::locale(); -my $shared_gui = AdminPanel::Shared::GUI->new() ; +my $loc = ManaTools::rpmdragora::locale(); +my $shared_gui = ManaTools::Shared::GUI->new() ; our ($descriptions, %filters, @filtered_pkgs, %filter_methods, $force_displaying_group, $force_rebuild, @initial_selection, $pkgs, $size_free, $size_selected, $urpm); our ($results_ok, $results_none) = ($loc->N("Search results"), $loc->N("Search results (none)")); @@ -340,21 +340,21 @@ sub _format_pkg_simplifiedinfo { #push @$s, [ build_expander($pkg, $loc->N("Files:"), 'files', sub { files_format($pkg->{files}) }) ]; my $files_link = format_link(format_field($loc->N("Files:")), $hidden_info{files} ); if ($options->{files}) { - my $wait = AdminPanel::rpmdragora::wait_msg(); + my $wait = ManaTools::rpmdragora::wait_msg(); if (!$pkg->{files}) { extract_header($pkg, $urpm, 'files', $installed_version); } my $files = $pkg->{files} ? files_format($pkg->{files}) : $loc->N("(Not available)"); utf8::encode($files); $files_link .= "\n\n" . $files; - AdminPanel::rpmdragora::remove_wait_msg($wait); + ManaTools::rpmdragora::remove_wait_msg($wait); } push @$s, join("\n", $files_link, "\n"); #push @$s, [ build_expander($pkg, $loc->N("Changelog:"), 'changelog', sub { $pkg->{changelog} }, $installed_version) ]; my $changelog_link = format_link(format_field($loc->N("Changelog:")), $hidden_info{changelog} ); if ($options->{changelog}) { - my $wait = AdminPanel::rpmdragora::wait_msg(); + my $wait = ManaTools::rpmdragora::wait_msg(); my @changelog = $pkg->{changelog} ? @{$pkg->{changelog}} : ( $loc->N("(Not available)") ); if (!$pkg->{changelog} || !scalar @{$pkg->{changelog}} ) { # my ($pkg, $label, $type, $get_data, $o_installed_version) = @_; @@ -365,7 +365,7 @@ sub _format_pkg_simplifiedinfo { $changelog_link .= "<br /> " . join("<br /> ", @changelog); $changelog_link =~ s|\n||g; - AdminPanel::rpmdragora::remove_wait_msg($wait); + ManaTools::rpmdragora::remove_wait_msg($wait); } push @$s, join("\n\n", $changelog_link, "\n"); @@ -943,7 +943,7 @@ sub fast_toggle { interactive_msg($loc->N("Warning"), $loc->N("The \"%s\" package is in urpmi skip list.\nDo you want to select it anyway?", $name), yesno => 1) or return ''; $urpm_obj->set_flag_skip(0); } - if ($AdminPanel::Rpmdragora::pkg::need_restart && !$priority_up_alread_warned) { + if ($ManaTools::Rpmdragora::pkg::need_restart && !$priority_up_alread_warned) { $priority_up_alread_warned = 1; interactive_msg($loc->N("Warning"), '<b>' . $loc->N("Rpmdragora or one of its priority dependencies needs to be updated first. Rpmdragora will then restart.") . '</b>' . "\n\n"); } @@ -1093,7 +1093,7 @@ sub pkgs_provider { }, all_updates => sub { # potential "updates" from media not tagged as updates: - if (!$options{pure_updates} && !$AdminPanel::Rpmdragora::pkg::need_restart) { + if (!$options{pure_updates} && !$ManaTools::Rpmdragora::pkg::need_restart) { [ @{$h->{updates}}, difference2([ grep { is_updatable($_) } @{$h->{installable}} ], $h->{backports}) ]; } else { @@ -1311,14 +1311,14 @@ sub deps_msg { if (!$item) { #URL emitted or at least a ref into RichText widget my $url = yui::toYMenuEvent($event)->id (); - if (AdminPanel::Rpmdragora::gui::info_details($url, $info_options) ) { + if (ManaTools::Rpmdragora::gui::info_details($url, $info_options) ) { $item = $pkgList->selectedItem(); my $pkg = $item->label(); - AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox, $info_options); + ManaTools::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox, $info_options); } else { # default it's really a URL - AdminPanel::Rpmdragora::gui::run_browser($url); + ManaTools::Rpmdragora::gui::run_browser($url); } } } @@ -1515,7 +1515,7 @@ sub do_action__real { $urpm->{fatal}(1, $loc->N("Error: %s appears to be mounted read-only.", $urpm::sys::mountpoint)); return 1; } - if (!$AdminPanel::Rpmdragora::pkg::need_restart && !is_there_selected_packages()) { + if (!$ManaTools::Rpmdragora::pkg::need_restart && !is_there_selected_packages()) { interactive_msg($loc->N("You need to select some packages first."), $loc->N("You need to select some packages first.")); return 1; } @@ -1533,7 +1533,7 @@ Do you really want to install all the selected packages?"), yesno => 1) my $res = $callback_action->($urpm, $pkgs); if (!$res) { $force_rebuild = 1; - pkgs_provider($options->{tree_mode}, MDK::Common::Func::if_($AdminPanel::Rpmdragora::pkg::probe_only_for_updates, pure_updates => 1), skip_updating_mu => 1); + pkgs_provider($options->{tree_mode}, MDK::Common::Func::if_($ManaTools::Rpmdragora::pkg::probe_only_for_updates, pure_updates => 1), skip_updating_mu => 1); reset_search(); $size_selected = 0; (undef, $size_free) = MDK::Common::System::df('/usr'); @@ -1583,7 +1583,7 @@ sub _build_tree { push @{$pkg_by_group_hash->{$grp}}, $pkg; } - my $tree_hash = AdminPanel::Shared::pathList2hash({ + my $tree_hash = ManaTools::Shared::pathList2hash({ paths => \@groups, separator => '|', }); @@ -1665,7 +1665,7 @@ or you already installed all of them.")); # inlining part of MDK::Common::Data::difference2(): my %l; @l{map { $_->[0] } @_} = (); my @pkgs_times = ('rpm', '-q', '--qf', '%{name}-%{version}-%{release}.%{arch} %{installtime}\n', - map { chomp_($_) } AdminPanel::Shared::RunProgram::get_stdout('urpmi_rpm-find-leaves')); + map { chomp_($_) } ManaTools::Shared::RunProgram::get_stdout('urpmi_rpm-find-leaves')); sort { $b->[1] <=> $a->[1] } grep { exists $l{$_->[0]} } map { chomp; [ split ] } run_rpm(@pkgs_times); }, flat => sub { no locale; sort { uc($a->[0]) cmp uc($b->[0]) } @_ }, @@ -1736,7 +1736,7 @@ sub run_help_callback { my (undef, $url) = @_; my ($user) = grep { $_->[2] eq $ENV{USERHELPER_UID} } list_passwd(); local $ENV{HOME} = $user->[7] if $user && $ENV{USERHELPER_UID}; - AdminPanel::Shared::RunProgram::raw({ detach => 1, as_user => 1 }, 'www-browser', $url); + ManaTools::Shared::RunProgram::raw({ detach => 1, as_user => 1 }, 'www-browser', $url); } #============================================================= @@ -1759,7 +1759,7 @@ sub run_browser { my ($user) = grep { $_->[2] eq $ENV{USERHELPER_UID} } MDK::Common::System::list_passwd(); local $ENV{HOME} = $user->[7] if $user && $ENV{USERHELPER_UID}; - AdminPanel::Shared::RunProgram::raw({ detach => 1, as_user => 1 }, 'www-browser', $url); + ManaTools::Shared::RunProgram::raw({ detach => 1, as_user => 1 }, 'www-browser', $url); } #============================================================= diff --git a/lib/AdminPanel/Rpmdragora/gurpm.pm b/lib/AdminPanel/Rpmdragora/gurpm.pm index 39a2b955..20cac6ee 100644 --- a/lib/AdminPanel/Rpmdragora/gurpm.pm +++ b/lib/AdminPanel/Rpmdragora/gurpm.pm @@ -1,22 +1,22 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::gurpm; +package ManaTools::Rpmdragora::gurpm; #============================================================= -*-perl-*- =head1 NAME - AdminPanel::Rpmdragora::gurpm - Module that shows the urpmi + ManaTools::Rpmdragora::gurpm - Module that shows the urpmi progress status =head1 SYNOPSIS my %option = (title => "Urpmi action ivoked", text => "Please wait", ); - my $gurpmi = AdminPanel::Rpmdragora::gurpm->new(%option); + my $gurpmi = ManaTools::Rpmdragora::gurpm->new(%option); $gurpmi->progress(45); #add to an existing dialog %option = (title => "Urpmi action ivoked", text => "Please wait", main_dialog => $dialog, parent => $parent_container); - $gurpmi = AdminPanel::Rpmdragora::gurpm->new(%option); + $gurpmi = ManaTools::Rpmdragora::gurpm->new(%option); $gurpmi->progress(20); =head1 DESCRIPTION @@ -29,12 +29,12 @@ package AdminPanel::Rpmdragora::gurpm; You can find documentation for this module with the perldoc command: - perldoc AdminPanel::Rpmdragora::gurpm + perldoc ManaTools::Rpmdragora::gurpm =head1 AUTHOR Angelo Naselli <anaselli@linux.it> - + Matteo Pasotti <matteo.pasotti@gmail.com> =head1 COPYRIGHT and LICENSE diff --git a/lib/AdminPanel/Rpmdragora/icon.pm b/lib/AdminPanel/Rpmdragora/icon.pm index c253d676..6c3887d6 100644 --- a/lib/AdminPanel/Rpmdragora/icon.pm +++ b/lib/AdminPanel/Rpmdragora/icon.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::icon; +package ManaTools::Rpmdragora::icon; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -28,10 +28,10 @@ package AdminPanel::Rpmdragora::icon; use strict; -use AdminPanel::rpmdragora; -use AdminPanel::Shared::Locales; +use ManaTools::rpmdragora; +use ManaTools::Shared::Locales; -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); use Exporter; our @ISA = qw(Exporter); diff --git a/lib/AdminPanel/Rpmdragora/init.pm b/lib/AdminPanel/Rpmdragora/init.pm index 7acdec6a..f6d570d9 100644 --- a/lib/AdminPanel/Rpmdragora/init.pm +++ b/lib/AdminPanel/Rpmdragora/init.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::init; +package ManaTools::Rpmdragora::init; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -33,8 +33,8 @@ BEGIN { $::no_global_argv_parsing = 1 } require urpm::args; use MDK::Common::Various qw(chomp_); -use AdminPanel::Privileges; -use AdminPanel::Shared::Locales; +use ManaTools::Privileges; +use ManaTools::Shared::Locales; use Exporter; our @ISA = qw(Exporter); @@ -51,7 +51,7 @@ our @EXPORT = qw(init our @ARGV_copy = @ARGV; BEGIN { #- we want to run this code before the Gtk->init of the use-my_gtk - my $loc = AdminPanel::Shared::Locales->new(domain_name => 'rpmdrake'); + my $loc = ManaTools::Shared::Locales->new(domain_name => 'rpmdrake'); my $basename = sub { local $_ = shift; s|/*\s*$||; s|.*/||; $_ }; any { /^--?h/ } @ARGV and do { @@ -153,22 +153,22 @@ if ($MODE eq 'remove') { $default_list_mode = 'all_updates'; } -$MODE eq 'update' || $rpmdragora_options{'run-as-root'} and AdminPanel::Privileges::is_root_capability_required(); +$MODE eq 'update' || $rpmdragora_options{'run-as-root'} and ManaTools::Privileges::is_root_capability_required(); $::noborderWhenEmbedded = 1; -require AdminPanel::rpmdragora; +require ManaTools::rpmdragora; -our $changelog_first = $AdminPanel::rpmdragora::changelog_first_config->[0]; +our $changelog_first = $ManaTools::rpmdragora::changelog_first_config->[0]; $changelog_first = 1 if $rpmdragora_options{'changelog-first'}; sub warn_about_user_mode() { - my $loc = AdminPanel::Shared::Locales->new(domain_name => 'rpmdrake'); + my $loc = ManaTools::Shared::Locales->new(domain_name => 'rpmdrake'); my $title = $loc->N("Running in user mode"); my $msg = $loc->N("You are launching this program as a normal user.\n". "You will not be able to perform modifications on the system,\n". "but you may still browse the existing database."); - if(($EUID != 0) and (!AdminPanel::rpmdragora::interactive_msg($title, $msg))) { + if(($EUID != 0) and (!ManaTools::rpmdragora::interactive_msg($title, $msg))) { return 0; } return 1; diff --git a/lib/AdminPanel/Rpmdragora/open_db.pm b/lib/AdminPanel/Rpmdragora/open_db.pm index ded4bfc9..7bfa7bf5 100644 --- a/lib/AdminPanel/Rpmdragora/open_db.pm +++ b/lib/AdminPanel/Rpmdragora/open_db.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::open_db; +package ManaTools::Rpmdragora::open_db; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -31,7 +31,7 @@ use Sys::Syslog; use MDK::Common::File qw(cat_ mkdir_p); use MDK::Common::Func; -use AdminPanel::rpmdragora; +use ManaTools::rpmdragora; use URPM; use urpm; use urpm::args; @@ -51,7 +51,7 @@ our @EXPORT = qw(fast_open_urpmi_db open_urpmi_db ); -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); # because rpm blocks some signals when rpm DB is opened, we don't keep open around: diff --git a/lib/AdminPanel/Rpmdragora/pkg.pm b/lib/AdminPanel/Rpmdragora/pkg.pm index 16f27119..ba0b18b7 100644 --- a/lib/AdminPanel/Rpmdragora/pkg.pm +++ b/lib/AdminPanel/Rpmdragora/pkg.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::pkg; +package ManaTools::Rpmdragora::pkg; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -38,13 +38,13 @@ use MDK::Common::Various qw(chomp_); use POSIX qw(_exit ceil); use URPM; use utf8; -use AdminPanel::rpmdragora; -use AdminPanel::Rpmdragora::open_db; -use AdminPanel::Rpmdragora::gurpm; -use AdminPanel::Rpmdragora::formatting; -use AdminPanel::Rpmdragora::rpmnew; -use AdminPanel::Shared::RunProgram qw(run get_stdout); -use AdminPanel::rpmdragora; +use ManaTools::rpmdragora; +use ManaTools::Rpmdragora::open_db; +use ManaTools::Rpmdragora::gurpm; +use ManaTools::Rpmdragora::formatting; +use ManaTools::Rpmdragora::rpmnew; +use ManaTools::Shared::RunProgram qw(run get_stdout); +use ManaTools::rpmdragora; use urpm; use urpm::lock; use urpm::install; @@ -56,7 +56,7 @@ use urpm::args qw(); use urpm::util; use Carp; -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); use Exporter; our @ISA = qw(Exporter); @@ -94,7 +94,7 @@ sub run_rpm { foreach (qw(LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL)) { local $ENV{$_} = $ENV{$_} . '.UTF-8' if $ENV{$_} && $ENV{$_} !~ /UTF-8/; } - my @l = map { ensure_utf8($_); $_ } AdminPanel::Shared::RunProgram::get_stdout(@_); + my @l = map { ensure_utf8($_); $_ } ManaTools::Shared::RunProgram::get_stdout(@_); wantarray() ? @l : join('', @l); } @@ -143,7 +143,7 @@ sub extract_header { $bar_id = statusbar_msg($loc->N("Getting '%s' from XML meta-data...", $xml_info), 0); my $_gurpm_clean_guard = MDK::Common::Func::before_leaving { undef $gurpm }; if (my $xml_info_file = eval { urpm::media::any_xml_info($urpm, $medium, $xml_info, undef, sub { - $gurpm ||= AdminPanel::Rpmdragora::gurpm->new( + $gurpm ||= ManaTools::Rpmdragora::gurpm->new( text => $loc->N("Please wait"), ); download_callback($gurpm, @_) @@ -287,7 +287,7 @@ all of them are currently disabled. You should run the Software Media Manager to enable at least one (check it in the \"%s\" column). -Then, restart \"%s\".", $loc->N("Enabled"), $AdminPanel::rpmdragora::myname_update)); +Then, restart \"%s\".", $loc->N("Enabled"), $ManaTools::rpmdragora::myname_update)); return (-1); } my ($mirror) = choose_mirror($urpm, transient => $w->{real_window} || $::main_window, @@ -305,7 +305,7 @@ $loc->N("You may also choose your desired mirror manually: to do so, launch the Software Media Manager, and then add a `Security updates' medium. -Then, restart %s.", $AdminPanel::rpmdragora::myname_update)), return (-1); +Then, restart %s.", $ManaTools::rpmdragora::myname_update)), return (-1); add_distrib_update_media($urpm, $mirror, only_updates => 0); } return 0; @@ -407,7 +407,7 @@ sub get_updates_list { ); my %common_opts = ( - callback_choices => \&AdminPanel::Rpmdragora::gui::callback_choices, + callback_choices => \&ManaTools::Rpmdragora::gui::callback_choices, priority_upgrade => $urpm->{options}{'priority-upgrade'}, ); @@ -428,7 +428,7 @@ sub get_updates_list { if ($probe_only_for_updates && !$need_restart) { @$requested_strict = sort map { urpm_name($_); - } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&AdminPanel::Rpmdragora::gui::callback_choices); + } $urpm->resolve_requested($db, $state, $requested, callback_choices => \&ManaTools::Rpmdragora::gui::callback_choices); if (my @l = grep { $state->{selected}{$_->id} } urpm::select::_priority_upgrade_pkgs($urpm, $urpm->{options}{'priority-upgrade'})) { @@ -459,7 +459,7 @@ sub get_pkgs { myexit (-1) if (warn_about_media($w, %options) == -1); - my $gurpm = AdminPanel::Rpmdragora::gurpm->new( + my $gurpm = ManaTools::Rpmdragora::gurpm->new( text => $loc->N("Please wait"), ); my $_gurpm_clean_guard = MDK::Common::Func::before_leaving { undef $gurpm }; @@ -706,7 +706,7 @@ sub perform_parallel_install { my @pkgs = map { MDK::Common::Func::if_($_->flag_requested, urpm_name($_)) } @{$urpm->{depslist}}; my @error_msgs; - my $res = !AdminPanel::Shared::RunProgram::run('urpmi', '2>', \@error_msgs, '-v', '--X', '--parallel', $group, @pkgs); + my $res = !ManaTools::Shared::RunProgram::run('urpmi', '2>', \@error_msgs, '-v', '--X', '--parallel', $group, @pkgs); if ($res) { $$statusbar_msg_id = statusbar_msg( @@ -770,7 +770,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( urpm::select::resolve_dependencies( $urpm, $state, $requested, rpmdb => $::env && "$::env/rpmdb.cz", - callback_choices => \&AdminPanel::Rpmdragora::gui::callback_choices, + callback_choices => \&ManaTools::Rpmdragora::gui::callback_choices, ); statusbar_msg_remove($bar_id); @@ -819,7 +819,7 @@ sub perform_installation { #- (partially) duplicated from /usr/sbin/urpmi :-( # select packages to uninstall for !update mode: perform_removal($urpm, { map { $_ => $pkgs->{$_} } @to_remove }) if !$probe_only_for_updates; - $gurpm = AdminPanel::Rpmdragora::gurpm->new( + $gurpm = ManaTools::Rpmdragora::gurpm->new( text => $loc->N("Please wait"), title => $loc->N("Initializing..."), ); @@ -993,7 +993,7 @@ you may now inspect some in order to take actions:"), #- added --previous-priority-upgrade to allow checking if yet if #- priority-upgrade list has changed. and make sure we don't uselessly restart my @argv = ('--previous-priority-upgrade=' . $urpm->{options}{'priority-upgrade'}, - grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @AdminPanel::Rpmdragora::init::ARGV_copy); + grep { !/^--no-priority-upgrade$|--previous-priority-upgrade=/ } @ManaTools::Rpmdragora::init::ARGV_copy); # remove "--emmbedded <id>" from argv: my $i = 0; foreach (@argv) { @@ -1032,7 +1032,7 @@ sub perform_removal { my ($urpm, $pkgs) = @_; my @toremove = map { MDK::Common::Func::if_($pkgs->{$_}{selected}, $pkgs->{$_}{urpm_name}) } keys %$pkgs; return if !@toremove; - my $gurpm = AdminPanel::Rpmdragora::gurpm->new( + my $gurpm = ManaTools::Rpmdragora::gurpm->new( text => $loc->N("Please wait") ); my $_gurpm_clean_guard = MDK::Common::Func::before_leaving { undef $gurpm }; diff --git a/lib/AdminPanel/Rpmdragora/rpmnew.pm b/lib/AdminPanel/Rpmdragora/rpmnew.pm index 8cc45761..659c0b29 100644 --- a/lib/AdminPanel/Rpmdragora/rpmnew.pm +++ b/lib/AdminPanel/Rpmdragora/rpmnew.pm @@ -1,5 +1,5 @@ # vim: set et ts=4 sw=4: -package AdminPanel::Rpmdragora::rpmnew; +package ManaTools::Rpmdragora::rpmnew; #***************************************************************************** # # Copyright (c) 2002 Guillaume Cottenceau @@ -32,11 +32,11 @@ use MDK::Common::Math qw(sum); use MDK::Common::File qw(renamef); use MDK::Common::Various qw(chomp_); -use AdminPanel::rpmdragora; -use AdminPanel::Rpmdragora::init; -use AdminPanel::Rpmdragora::pkg; -use AdminPanel::Rpmdragora::open_db; -use AdminPanel::Rpmdragora::formatting; +use ManaTools::rpmdragora; +use ManaTools::Rpmdragora::init; +use ManaTools::Rpmdragora::pkg; +use ManaTools::Rpmdragora::open_db; +use ManaTools::Rpmdragora::formatting; use yui; @@ -44,7 +44,7 @@ use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(rpmnew_dialog do_merge_if_needed); -my $loc = AdminPanel::rpmdragora::locale(); +my $loc = ManaTools::rpmdragora::locale(); # /var/lib/nfs/etab /var/lib/nfs/rmtab /var/lib/nfs/xtab /var/cache/man/whatis my %ignores_rpmnew = map { $_ => 1 } qw( |