summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2005-01-19 20:03:52 +0000
committerDaouda Lo <daouda@mandriva.com>2005-01-19 20:03:52 +0000
commit4bf41983509ef63f7427fffa33e434af3256b4f7 (patch)
tree47b4e7823a7f9b8aa7b7e1c401ff0f5e4127062b
parent8c4908953585c131d993ed46373db4d66814ee1e (diff)
downloadmgaonline-4bf41983509ef63f7427fffa33e434af3256b4f7.tar
mgaonline-4bf41983509ef63f7427fffa33e434af3256b4f7.tar.gz
mgaonline-4bf41983509ef63f7427fffa33e434af3256b4f7.tar.bz2
mgaonline-4bf41983509ef63f7427fffa33e434af3256b4f7.tar.xz
mgaonline-4bf41983509ef63f7427fffa33e434af3256b4f7.zip
sync with 10.0 branches
-rwxr-xr-xmdkapplet7
-rw-r--r--mdkonline.pm2
-rw-r--r--mdkonline.spec10
-rwxr-xr-xmdkupdate17
4 files changed, 23 insertions, 13 deletions
diff --git a/mdkapplet b/mdkapplet
index 276122dc..c5afa29a 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -207,9 +207,10 @@ sub refresh_contents {
foreach my $l (['first', 'red'], ['second', 'royalblue3'], ['third', 'green']) {
$color->{$l->[0]} = { 'foreground' => $l->[1], 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD }
}
- my $fixed_tag = { 'font' => 'monospace' };
+ my $fixed_tag = { 'font' => 'monospace' };
+ setLastTime();
my $last = lastCheck();
- my $contents = [ [ N("Network Connection: "), $color->{second} ], [ isNetwork() ? N("Up") . "\n" : N("Down") . "\n", isNetwork() ? $color->{third} : $color->{first} ],
+ my $contents = [ [ N("Network Connection: "), $color->{second} ], [ isNetwork() ? N("Up") . "\n" : N("Down") . "\n", isNetwork() ? $color->{third} : $color->{first} ],
[ N("Last check: "), $color->{second} ], [ "$last\n", $fixed_tag ],
[ N("Machine name:"), $color->{second} ], [ $h{MACHINE} . "\n", $fixed_tag ],
[ N("Updates: "), $color->{second} ], [ common::sprintf_fixutf8($state{$status}{tt}[0]), $status eq 'okay' ? $color->{third} : $color->{first} ],
@@ -274,7 +275,7 @@ sub silentCheck {
99 => sub { logIt(N("Wrong Action or host or login.\n")); go2State('critical') },
500 => sub { logIt(N("Something is wrong with your network settings (check your route, firewall or proxy settings)\n")); go2State('critical') }
};
- $retcode->{$u}->();
+ eval { $retcode->{$u}->() }; if ($@) { logIt(N("Problem occured while connecting to the server, please contact the support team")); go2State('critical') }
}
sub okState { $isAvailable = 0; logIt(N("System is up-to-date\n")); go2State('okay') }
sub compareWithInstalled {
diff --git a/mdkonline.pm b/mdkonline.pm
index af2b3eb0..3b15b72b 100644
--- a/mdkonline.pm
+++ b/mdkonline.pm
@@ -24,7 +24,7 @@ sub get_release() {
sub get_distro_type() {
my $d;
- cat_($release_file) =~ /(corporate|mnf)/i, and $d = lc($1);
+ cat_($release_file) =~ /(corporate|mnf|x86_64)/i, and $d = lc($1);
$d
}
diff --git a/mdkonline.spec b/mdkonline.spec
index 526380d5..51055959 100644
--- a/mdkonline.spec
+++ b/mdkonline.spec
@@ -1,6 +1,6 @@
%define version 1.1
%define name mdkonline
-%define release 26mdk
+%define release 27mdk
Summary: The MandrakeOnline Tool
Name: %{name}
@@ -115,10 +115,16 @@ rm -rf $RPM_BUILD_ROOT
# http://www.linuxmandrake.com/en/cvs.php3)
%changelog
-* Thu Dec 23 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-26mdk
+* Wed Jan 19 2005 Daouda LO <daouda@mandrakesoft.com> 1.1-27mdk
+- truly support x86_64 (good path to synthesis and RPMS repertory)
+- mdkupdate media renamed to update_source (consolidating with MandrakeUpdate)
+
+* Wed Dec 29 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-26mdk
+- display last check date on applet interface
- fixed permissions of generated conf file (use octal with perl chmod)
- do not go to 'End' step when upload fails, give choice to user
to reupload their config
+- added nn.po ( thanks to Karl Ove Hufthammer )
* Fri Dec 10 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-25mdk
- fix typo when --debug is passed to mdkapplet (warly)
diff --git a/mdkupdate b/mdkupdate
index f9ec8510..f0b9bd60 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -96,7 +96,7 @@ if ($o{LOGIN} && $o{PASS} && $o{LOGIN} !~ /\s+/ && $o{PASS} !~ /\s+/) {
#printf "SCHEDULED = $scheduled\nNOSCHEDULED = $noscheduled\n";
-f $currentrpm or rpm_qa($currentrpm);
if ($opt eq '--applet') {
- system "/usr/bin/MandrakeUpdate", "--no-confirmation", "--no-media-update", "--media=mdkupdate", "--pkg-sel=$scheduled", "--pkg-nosel=$noscheduled"
+ system "/usr/bin/MandrakeUpdate", "--no-confirmation", "--media=update_source", "--pkg-sel=$scheduled", "--pkg-nosel=$noscheduled"
} elsif ($opt eq '--auto') {
$o{AUTO} eq 'TRUE' and auto_install_rpms($c2h->{sched})
}
@@ -165,20 +165,23 @@ sub add_media {
my $mirror = shift;
my ($r) = mdkonline::get_release();
my $dist_type = mdkonline::get_distro_type();
+ my $media_varfile = "/var/lib/urpmi/list.mdkupdate";
+ my ($path2new_arch, $path2new_synthesis) = $r <= 10.0 ? ('/RPMS/', '../base/synthesis.hdlist.cz') : ('/main_updates/', 'media_info/synthesis.hdlist.cz');
#sometimes server returns the full link http:// or ftp://
- my $fullpath2mir = $r <= 10.0 ? if_($mirror !~ /^(http|ftp):\/\// , "ftp://") . $mirror . if_($dist_type, "/$dist_type") ."/$r" . "/RPMS" . "/" :
- "ftp://" . $mirror . "/$r" . "/main_updates" . "/";
+ my $fullpath2mir = if_($mirror !~ /^(http|ftp):\/\// , "ftp://") . $mirror . if_($dist_type, "/$dist_type") ."/$r" . $path2new_arch;
eval {
- system "/usr/sbin/urpmi.removemedia", "mdkupdate";
- system "/usr/sbin/urpmi.addmedia", "--update", "mdkupdate", $fullpath2mir, "with", $r <= 10.0 ? "../base/synthesis.hdlist.cz" : "media_info/synthesis.hdlist.cz";
+ #Remove historical mdkupdate source
+ -f $media_varfile and system "/usr/sbin/urpmi.removemedia", "mdkupdate";
+ system "/usr/sbin/urpmi.removemedia", "update_source";
+ system "/usr/sbin/urpmi.addmedia", "--update", "update_source", $fullpath2mir, "with", $path2new_synthesis;
};
$@ and die "Problem adding Update Media with urpmi";
}
sub update_pkgs {
@_ or return;
eval {
- system "/usr/sbin/urpmi", "--auto", "--media", "mdkupdate", map { /^(.*)\.rpm$/ && $1 } @_;
- $? == 0 or die N("Unable to update packages from mdkupdate medium.\n");
+ system "/usr/sbin/urpmi", "--auto", "--media", "update_source", map { /^(.*)\.rpm$/ && $1 } @_;
+ $? == 0 or die N("Unable to update packages from update_source medium.\n");
};
$@ and die "Problem upgrading with urpmi";
}