aboutsummaryrefslogtreecommitdiffstats
path: root/modules/rpmdragora
diff options
context:
space:
mode:
Diffstat (limited to 'modules/rpmdragora')
-rwxr-xr-xmodules/rpmdragora/dragora-urpm-addmedia44
-rwxr-xr-xmodules/rpmdragora/dragora-urpm-sources.pl24
-rwxr-xr-xmodules/rpmdragora/dragoraUpdate46
-rwxr-xr-xmodules/rpmdragora/rpmdragora58
4 files changed, 86 insertions, 86 deletions
diff --git a/modules/rpmdragora/dragora-urpm-addmedia b/modules/rpmdragora/dragora-urpm-addmedia
index 136c5067..4d3c8704 100755
--- a/modules/rpmdragora/dragora-urpm-addmedia
+++ b/modules/rpmdragora/dragora-urpm-addmedia
@@ -44,23 +44,23 @@ and [options] are from
exit(0);
};
}
-use AdminPanel::Rpmdragora::init;
-use AdminPanel::rpmdragora;
-use AdminPanel::Rpmdragora::open_db;
-use AdminPanel::Rpmdragora::formatting;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Privileges;
+use ManaTools::Rpmdragora::init;
+use ManaTools::rpmdragora;
+use ManaTools::Rpmdragora::open_db;
+use ManaTools::Rpmdragora::formatting;
+use ManaTools::Shared::Locales;
+use ManaTools::Privileges;
use urpm::media;
use MDK::Common::File qw(cat_);
-my $loc = AdminPanel::rpmdragora::locale();
+my $loc = ManaTools::rpmdragora::locale();
#
-if (AdminPanel::Privileges::is_root_capability_required()) {
- require AdminPanel::Shared::GUI;
- my $sh_gui = AdminPanel::Shared::GUI->new();
+if (ManaTools::Privileges::is_root_capability_required()) {
+ require ManaTools::Shared::GUI;
+ my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->warningMsgBox({
title => "gurpmi.addmedia",
text => $loc->N("root privileges required"),
@@ -68,13 +68,13 @@ if (AdminPanel::Privileges::is_root_capability_required()) {
exit (-1);
}
-use AdminPanel::rpmdragora;
+use ManaTools::rpmdragora;
use Getopt::Long;
## TODO remove as soon as possible
$::isStandalone = 1;
-AdminPanel::rpmdragora::readconf();
+ManaTools::rpmdragora::readconf();
my $fromfile;
if (@ARGV == 1 && $ARGV[0] =~ /\.urpmi-media$/) {
@@ -110,10 +110,10 @@ while (@ARGV) {
} elsif ($distrib) {
($name, $url) = ('', $name);
} elsif ($url !~ m,^(([^:]*):/)?/,) {
- AdminPanel::rpmdragora::interactive_msg('gurpmi.addmedia',
- AdminPanel::Rpmdragora::formatting::escape_text_for_TextView_markup_format(
+ ManaTools::rpmdragora::interactive_msg('gurpmi.addmedia',
+ ManaTools::Rpmdragora::formatting::escape_text_for_TextView_markup_format(
$loc->N("bad <url> (for local directory, the path must be absolute)") . "\n\n$url"));
- AdminPanel::rpmdragora::myexit(-1);
+ ManaTools::rpmdragora::myexit(-1);
}
push @addmedia_args, [ $name, $url ];
push @names, $name;
@@ -125,7 +125,7 @@ if ($mirrorlist && $distrib && !@addmedia_args) {
}
$fromfile and do {
- AdminPanel::rpmdragora::interactive_msg('gurpmi.addmedia',
+ ManaTools::rpmdragora::interactive_msg('gurpmi.addmedia',
$loc->N("%s
Is it ok to continue?",
@@ -141,14 +141,14 @@ to your system from these new media.", join ", ", @names)
That means you will be able to add new software packages
to your system from that new medium.", $names[0])
),
- yesno => 1) or AdminPanel::rpmdragora::myexit(-1);
+ yesno => 1) or ManaTools::rpmdragora::myexit(-1);
};
-my $urpm = AdminPanel::Rpmdragora::open_db::fast_open_urpmi_db();
+my $urpm = ManaTools::Rpmdragora::open_db::fast_open_urpmi_db();
my $success = 1;
foreach (@addmedia_args) {
#- NB: that short circuits
- $success = $success && AdminPanel::rpmdragora::add_medium_and_check(
+ $success = $success && ManaTools::rpmdragora::add_medium_and_check(
$urpm,
{ distrib => $distrib },
$_->[0],
@@ -165,8 +165,8 @@ if ($success) {
: @names > 1
? $loc->N("Successfully added media %s.", join ", ", @names)
: $loc->N("Successfully added medium `%s'.", $names[0]);
- AdminPanel::rpmdragora::interactive_msg('gurpmi.addmedia', $message) if !$silent_success;
- AdminPanel::rpmdragora::myexit(0);
+ ManaTools::rpmdragora::interactive_msg('gurpmi.addmedia', $message) if !$silent_success;
+ ManaTools::rpmdragora::myexit(0);
} else {
- AdminPanel::rpmdragora::myexit(-1);
+ ManaTools::rpmdragora::myexit(-1);
}
diff --git a/modules/rpmdragora/dragora-urpm-sources.pl b/modules/rpmdragora/dragora-urpm-sources.pl
index adf127b9..a0895ff1 100755
--- a/modules/rpmdragora/dragora-urpm-sources.pl
+++ b/modules/rpmdragora/dragora-urpm-sources.pl
@@ -23,17 +23,17 @@
# $Id: edit-urpm-sources.pl 244763 2008-09-04 16:12:52Z tv $
-use AdminPanel::Rpmdragora::init;
-use AdminPanel::rpmdragora;
-use AdminPanel::Rpmdragora::edit_urpm_sources qw(run);
-use AdminPanel::Privileges;
-use AdminPanel::Shared::Locales;
+use ManaTools::Rpmdragora::init;
+use ManaTools::rpmdragora;
+use ManaTools::Rpmdragora::edit_urpm_sources qw(run);
+use ManaTools::Privileges;
+use ManaTools::Shared::Locales;
-my $loc = AdminPanel::rpmdragora::locale();
+my $loc = ManaTools::rpmdragora::locale();
-if (AdminPanel::Privileges::is_root_capability_required()) {
- require AdminPanel::Shared::GUI;
- my $sh_gui = AdminPanel::Shared::GUI->new();
+if (ManaTools::Privileges::is_root_capability_required()) {
+ require ManaTools::Shared::GUI;
+ my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->warningMsgBox({
title => $loc->N("Configure media"),
text => $loc->N("root privileges required"),
@@ -41,8 +41,8 @@ if (AdminPanel::Privileges::is_root_capability_required()) {
exit (-1);
}
-AdminPanel::rpmdragora::readconf();
+ManaTools::rpmdragora::readconf();
-AdminPanel::Rpmdragora::edit_urpm_sources::run();
+ManaTools::Rpmdragora::edit_urpm_sources::run();
-AdminPanel::rpmdragora::myexit 0;
+ManaTools::rpmdragora::myexit 0;
diff --git a/modules/rpmdragora/dragoraUpdate b/modules/rpmdragora/dragoraUpdate
index 8b84af52..ca7b415e 100755
--- a/modules/rpmdragora/dragoraUpdate
+++ b/modules/rpmdragora/dragoraUpdate
@@ -30,15 +30,15 @@ use strict;
use MDK::Common::Func 'any';
use File::ShareDir ':ALL';
-use AdminPanel::Rpmdragora::init;
+use ManaTools::Rpmdragora::init;
-use AdminPanel::rpmdragora;
-use AdminPanel::Rpmdragora::gui;
-use AdminPanel::Rpmdragora::rpmnew;
-use AdminPanel::Rpmdragora::formatting;
-use AdminPanel::Rpmdragora::pkg;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Shared::GUI;
+use ManaTools::rpmdragora;
+use ManaTools::Rpmdragora::gui;
+use ManaTools::Rpmdragora::rpmnew;
+use ManaTools::Rpmdragora::formatting;
+use ManaTools::Rpmdragora::pkg;
+use ManaTools::Shared::Locales;
+use ManaTools::Shared::GUI;
use yui;
@@ -59,7 +59,7 @@ use yui;
our $w;
# TODO try to see if we can Moosify all!
our $statusbar;
-my $loc = AdminPanel::rpmdragora::locale();
+my $loc = ManaTools::rpmdragora::locale();
warn_about_user_mode();
@@ -114,7 +114,7 @@ sub _refresh_packages_list {
if ($importance) {
my $update_label = "";
if (yui::YUI::app()->hasImageSupport()) {
- $icon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), $update_icons{$importance}->{icon});
+ $icon = File::ShareDir::dist_file(ManaTools::Shared::distName(), $update_icons{$importance}->{icon});
}
else {
# For ncurses set a label
@@ -244,7 +244,7 @@ sub run_treeview_dialog {
my $hbox_iconbar = $factory->createHBox($vbox);
my $head_align_left = $factory->createLeft($hbox_iconbar);
$hbox_iconbar = $factory->createHBox($head_align_left);
- my $wm_icon = File::ShareDir::dist_file(AdminPanel::Shared::distName(), $update_icons{'title'}->{icon});
+ my $wm_icon = File::ShareDir::dist_file(ManaTools::Shared::distName(), $update_icons{'title'}->{icon});
$factory->createImage($hbox_iconbar, $wm_icon);
$factory->createHeading($hbox_iconbar, $update_icons{'title'}->{text});
@@ -287,7 +287,7 @@ sub run_treeview_dialog {
$statusbar = $factory->createBusyIndicator($vbox, "" );
$statusbar->setWeight(0, 1);
- $AdminPanel::Rpmdragora::pkg::probe_only_for_updates = 1; # faster startup
+ $ManaTools::Rpmdragora::pkg::probe_only_for_updates = 1; # faster startup
pkgs_provider('all_updates', pure_updates => 1); # default mode
@@ -299,7 +299,7 @@ sub run_treeview_dialog {
my $item = $packageTbl->selectedItem();
if ($item) {
my $pkg = $data{$item->index()}{fullname};
- AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ ManaTools::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
}
my $info_options = {};
@@ -317,14 +317,14 @@ sub run_treeview_dialog {
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 = $packageTbl->selectedItem();
my $pkg = $data{$item->index()}{fullname};
- 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);
}
}
}
@@ -339,7 +339,7 @@ sub run_treeview_dialog {
my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n");
$translators =~ s/\</\&lt\;/g;
$translators =~ s/\>/\&gt\;/g;
- my $sh_gui = AdminPanel::Shared::GUI->new();
+ my $sh_gui = ManaTools::Shared::GUI->new();
$sh_gui->AboutDialog({
name => "dragoraUpdate",
version => $VERSION,
@@ -361,7 +361,7 @@ sub run_treeview_dialog {
if ($item) {
my $pkg = $data{$item->index()}{fullname};
$info_options = {};
- AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ ManaTools::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
}
my $wEvent = yui::toYWidgetEvent($event);
if ($wEvent->reason() == $yui::YEvent::ValueChanged) {
@@ -396,7 +396,7 @@ sub run_treeview_dialog {
$item = $packageTbl->selectedItem();
if ($item) {
my $pkg = $data{$item->index()}{fullname};
- AdminPanel::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
+ ManaTools::Rpmdragora::gui::setInfoOnWidget($pkg, $infoBox);
}
}
}
@@ -408,7 +408,7 @@ sub run_treeview_dialog {
}
if (!$num_pkgs) {
- AdminPanel::rpmdragora::interactive_msg(
+ ManaTools::rpmdragora::interactive_msg(
$loc->N("rpmdragora update"),
$loc->N("The list of updates is empty. This means that either there is no available update for the packages installed on your computer, or you already installed all of them."),
scroll => 1,
@@ -424,13 +424,13 @@ sub run_treeview_dialog {
}
# -=-=-=---=-=-=---=-=-=-- main -=-=-=---=-=-=---=-=-=-
-AdminPanel::Rpmdragora::rpmnew::do_merge_if_needed();
+ManaTools::Rpmdragora::rpmnew::do_merge_if_needed();
-AdminPanel::rpmdragora::readconf();
+ManaTools::rpmdragora::readconf();
init();
run_treeview_dialog(\&perform_installation);
-AdminPanel::rpmdragora::writeconf();
+ManaTools::rpmdragora::writeconf();
# myexit(0);
diff --git a/modules/rpmdragora/rpmdragora b/modules/rpmdragora/rpmdragora
index ccfc2246..938eb207 100755
--- a/modules/rpmdragora/rpmdragora
+++ b/modules/rpmdragora/rpmdragora
@@ -38,15 +38,15 @@ use MDK::Common::System qw(arch);
use urpm::media;
use urpm::msg;
-use AdminPanel::Rpmdragora::init;
-use AdminPanel::rpmdragora;
-use AdminPanel::Shared;
-use AdminPanel::Shared::Locales;
-use AdminPanel::Rpmdragora::open_db;
-use AdminPanel::Rpmdragora::gui;
-use AdminPanel::Rpmdragora::rpmnew;
-use AdminPanel::Rpmdragora::formatting;
-use AdminPanel::Rpmdragora::pkg;
+use ManaTools::Rpmdragora::init;
+use ManaTools::rpmdragora;
+use ManaTools::Shared;
+use ManaTools::Shared::Locales;
+use ManaTools::Rpmdragora::open_db;
+use ManaTools::Rpmdragora::gui;
+use ManaTools::Rpmdragora::rpmnew;
+use ManaTools::Rpmdragora::formatting;
+use ManaTools::Rpmdragora::pkg;
use yui;
@@ -69,7 +69,7 @@ my @itemsToBeInstalled;
our $w;
our $statusbar;
-my $loc = AdminPanel::rpmdragora::locale();
+my $loc = ManaTools::rpmdragora::locale();
my %elems;
@@ -202,7 +202,7 @@ sub _detaillist_callback {
$info->setValue("");
return if( ref $selection ne "yui::YItem");
- AdminPanel::Rpmdragora::gui::setInfoOnWidget($options->{table_item_list}[$selection->index()], $info, $show_options);
+ ManaTools::Rpmdragora::gui::setInfoOnWidget($options->{table_item_list}[$selection->index()], $info, $show_options);
}
sub _do_search($$$$$$) {
@@ -303,7 +303,7 @@ sub _do_search($$$$$$) {
($current_search_type eq 'files' ? 'files' : 'info'),
undef,
sub {
- $gurpm ||= AdminPanel::Rpmdragora::gurpm->new(
+ $gurpm ||= ManaTools::Rpmdragora::gurpm->new(
text => $loc->N("Please wait"),
main_dialog => $searchw,
parent => $replace_pnt,
@@ -375,7 +375,7 @@ sub _do_search($$$$$$) {
$elems{$results_ok} = [ map { [ $_, $results_ok ] } @search_results ];
# $iter = $options->{add_parent}->($tree, $results_ok);
- AdminPanel::Rpmdragora::gui::add_tree_item($tree, $results_ok, 1);
+ ManaTools::Rpmdragora::gui::add_tree_item($tree, $results_ok, 1);
$options->{add_nodes}->(map { [ $_, $results_ok . ($options->{tree_mode} eq 'by_presence'
? '|' . ($pkgs->{$_}{pkg}->flag_installed ? $loc->N("Upgradable") : $loc->N("Addable"))
: ($options->{tree_mode} eq 'by_selection'
@@ -383,7 +383,7 @@ sub _do_search($$$$$$) {
: ''))
] } @search_results);
} else {
- AdminPanel::Rpmdragora::gui::add_tree_item($tree, $results_none, 1);
+ ManaTools::Rpmdragora::gui::add_tree_item($tree, $results_none, 1);
# $iter = $options->{add_parent}->($tree, $results_none);
# clear package list:
$options->{add_nodes}->();
@@ -632,12 +632,12 @@ sub _run_treeview_dialog {
$find_entry = $factory->createInputField($hbox_top, "");
- my $icon_file = File::ShareDir::dist_file(AdminPanel::Shared::distName(), "images/manalog.png");
+ my $icon_file = File::ShareDir::dist_file(ManaTools::Shared::distName(), "images/manalog.png");
my $find_button = $factory->createIconButton($hbox_top, $icon_file, $loc->N("Search"));
$find_button->setWeight(0,6);
$my_win->setDefaultButton($find_button);
- $icon_file = File::ShareDir::dist_file(AdminPanel::Shared::distName(), "images/rpmdragora/clear_22x22.png");
+ $icon_file = File::ShareDir::dist_file(ManaTools::Shared::distName(), "images/rpmdragora/clear_22x22.png");
my $reset_search_button = $factory->createIconButton($hbox_top, $icon_file, $loc->N("Reset"));
$reset_search_button->setWeight(0,7);
$find_entry->setWeight(0,10);
@@ -678,8 +678,8 @@ sub _run_treeview_dialog {
my $reload_db_and_clear_all = sub {
slow_func(sub {
$force_rebuild = 1;
- AdminPanel::Rpmdragora::gui::pkgs_provider($options->{tree_mode}, skip_updating_mu => 1);
- AdminPanel::Rpmdragora::gui::reset_search();
+ ManaTools::Rpmdragora::gui::pkgs_provider($options->{tree_mode}, skip_updating_mu => 1);
+ ManaTools::Rpmdragora::gui::reset_search();
$size_selected = 0;
$options->{rebuild_tree}->();
$find_callback->();
@@ -821,8 +821,8 @@ sub _run_treeview_dialog {
},
undef, '<CheckItem>' ],
[ $loc->N("/_Options") . $loc->N("/_Media Manager"), undef, sub {
- require AdminPanel::Rpmdragora::edit_urpm_sources;
- AdminPanel::Rpmdragora::edit_urpm_sources::run() && $reload_db_and_clear_all->();
+ require ManaTools::Rpmdragora::edit_urpm_sources;
+ ManaTools::Rpmdragora::edit_urpm_sources::run() && $reload_db_and_clear_all->();
}, undef, '<Item>' ],
[ $loc->N("/_Options") . $loc->N("/_Show automatically selected packages"), undef, sub {
$dont_show_selections->[0] = !$checkbox_show_autoselect->get_active;
@@ -850,12 +850,12 @@ sub _run_treeview_dialog {
} qw(flat by_group by_leaves by_presence by_selection by_size by_source)),
[ $loc->N("/_Help"), undef, undef, undef, '<Branch>' ],
[ $loc->N("/_Help") . $loc->N("/_Report Bug"), undef, sub { run_drakbug('rpmdragora') }, undef, '<Item>' ],
- [ $loc->N("/_Help") . $loc->N("/_Help"), undef, sub { AdminPanel::rpmdragora::open_help('') }, undef, '<Item>' ],
+ [ $loc->N("/_Help") . $loc->N("/_Help"), undef, sub { ManaTools::rpmdragora::open_help('') }, undef, '<Item>' ],
[ $loc->N("/_Help") . $loc->N("/_About..."), undef, sub {
my $license = formatAlaTeX(translate($::license));
$license =~ s/\n/\n\n/sg; # nicer formatting
my $w = gtknew('AboutDialog', name => $loc->N("Rpmdragora"),
- version => $AdminPanel::Rpmdragora::init::version,
+ version => $ManaTools::Rpmdragora::init::version,
copyright => $loc->N("Copyright (C) %s by Mandriva", '2002-2009')."\n".$loc->N("Copyright (C) %s by Mageia.Org", '2010-2013'),
license => $license, wrap_license => 1,
comments => $loc->N("Rpmdragora is the Mageia package management tool."),
@@ -1039,13 +1039,13 @@ sub _run_treeview_dialog {
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 = $detail_list->selectedItem();
_detaillist_callback($item, $info, \%$options, $info_options);
}
else {
# default it's really a URL
- AdminPanel::Rpmdragora::gui::run_browser($url);
+ ManaTools::Rpmdragora::gui::run_browser($url);
}
}
else {
@@ -1080,8 +1080,8 @@ print "Menu " . $menuLabel . " chosen\n";
$reload_db_and_clear_all->();
}
elsif ($menuLabel eq $settingsMenuLabel{media_manager}) {
- require AdminPanel::Rpmdragora::edit_urpm_sources;
- AdminPanel::Rpmdragora::edit_urpm_sources::run() && $reload_db_and_clear_all->();
+ require ManaTools::Rpmdragora::edit_urpm_sources;
+ ManaTools::Rpmdragora::edit_urpm_sources::run() && $reload_db_and_clear_all->();
}
elsif ($menuLabel eq $settingsMenuLabel{options}) {
}
@@ -1089,7 +1089,7 @@ print "Menu " . $menuLabel . " chosen\n";
my $translators = $loc->N("_: Translator(s) name(s) & email(s)\n");
$translators =~ s/\</\&lt\;/g;
$translators =~ s/\>/\&gt\;/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'),
@@ -1182,7 +1182,7 @@ print "Menu " . $menuLabel . " chosen\n";
# -=-=-=---=-=-=---=-=-=-- main -=-=-=---=-=-=---=-=-=-
-if (my $pid = AdminPanel::Shared::isProcessRunning('rpmdragora')) {
+if (my $pid = ManaTools::Shared::isProcessRunning('rpmdragora')) {
interactive_msg($loc->N("Warning"), $loc->N("rpmdragora is already running (pid: %s)", $pid), yesno => [ $loc->N("Quit") ]);
exit(0);
}
@@ -1206,7 +1206,7 @@ $my_win = $factory->createMainDialog;
readconf();
-AdminPanel::Rpmdragora::rpmnew::do_merge_if_needed();
+ManaTools::Rpmdragora::rpmnew::do_merge_if_needed();
init();