summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaouda Lo <daouda@mandriva.com>2004-12-15 12:13:49 +0000
committerDaouda Lo <daouda@mandriva.com>2004-12-15 12:13:49 +0000
commit8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9 (patch)
treed10f7f29c3153500740556ff51e7c81a09dac803
parent45a7fabea0484791628f09c4bfc284a24a82bd09 (diff)
downloadmgaonline-8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9.tar
mgaonline-8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9.tar.gz
mgaonline-8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9.tar.bz2
mgaonline-8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9.tar.xz
mgaonline-8bddf4fe8cd32b0ec51bb7bd4db8737e1490aba9.zip
merge with 10.0 and 10.1 updates
-rwxr-xr-xmdkapplet10
-rwxr-xr-xmdkonline8
-rw-r--r--mdkonline.spec20
-rwxr-xr-xmdkupdate25
4 files changed, 40 insertions, 23 deletions
diff --git a/mdkapplet b/mdkapplet
index 8c4bbae3..276122dc 100755
--- a/mdkapplet
+++ b/mdkapplet
@@ -151,7 +151,7 @@ sub showMainWindow() {
my $w = Gtk2::Window->new('toplevel');
$w->set_title(N("Mandrakelinux Updates Applet"));
$w->signal_connect(delete_event => sub { $w->destroy; $raisedwindow = 0 });
- gtkset_size_request($w, 360, 240);
+ gtkset_size_request($w, 400, 300);
$w->set_position('center');
$w->set_icon(Gtk2::Gdk::Pixbuf->new_from_file('/usr/share/icons/mini/mdkonline.png'));
$textvw = Gtk2::TextView->new;
@@ -203,6 +203,7 @@ sub refresh_status {
sub refresh_contents {
my $status = shift;
my $color = {};
+ my %h = getVarsFromSh($conffile);
foreach my $l (['first', 'red'], ['second', 'royalblue3'], ['third', 'green']) {
$color->{$l->[0]} = { 'foreground' => $l->[1], 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD }
}
@@ -210,6 +211,7 @@ sub refresh_contents {
my $last = lastCheck();
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} ],
];
$contents
@@ -225,8 +227,8 @@ sub installUpdates {
my $w = $in->wait_message(N("Please wait"), N("Check updates"));
silentCheck(); gtkflush();
undef $w;
- my $mdkupdate_status = cat_('/tmp/mdkupdate.log');
- if ($mdkupdate_status !~ /OK/) { logIt($mdkupdate_status); $in->ask_warn(N("Mandrakelinux Updates Applet"), $mdkupdate_status) }
+ my $mdkupdate_status = cat_('/var/tmp/mdkupdate.log');
+ if ($mdkupdate_status && $mdkupdate_status !~ /OK/) { logIt($mdkupdate_status); $in->ask_warn(N("Mandrakelinux Updates Applet"), $mdkupdate_status) }
}
sub silentCheck {
my $link = $online_site . "/online3_RemoteAction.php" . '?action=UpdateList';
@@ -282,7 +284,7 @@ sub compareWithInstalled {
$p =~ /(.*)-(.*)-(.*)$/; my ($n, $v, $r) = ($1, $2, $3);
if ($name eq $n) {
my ($iu, $ir);
- if ($debug) { $iu = mdkonline::rpmvercmp($ver, $v); $ir = mdkonline::rpmvercmp($rel, $r) };
+ if ($debug) { $iu = mdkonline::rpm_ver_cmp($ver, $v); $ir = mdkonline::rpm_ver_cmp($rel, $r) };
if (mdkonline::rpm_ver_cmp($ver, $v) > 0 || mdkonline::rpm_ver_cmp($ver, $v) == 0 && mdkonline::rpm_ver_cmp($rel, $r) > 0) {
logIt("$name-$ver-$rel $n-$v-$r *** CMPVER=$iu ** CMPREL = $ir \n") if $debug;
$isUpdate = 1 and last;
diff --git a/mdkonline b/mdkonline
index 9c5ae14f..f24ef0e6 100755
--- a/mdkonline
+++ b/mdkonline
@@ -43,7 +43,7 @@ my $online_link = 'https://www.mandrakeonline.net';
my $confdir = '/root/.MdkOnline';
my $conffile = "$confdir/mdkupdate";
-my $logfile = '/tmp/mdkonline.log';
+my $logfile = '/var/tmp/mdkonline.log';
#for compatibilities
mkdir_p($confdir) if !-d $confdir;
@@ -212,9 +212,9 @@ if ($login && $password && $boxname) {
if ($sendconfres eq 'TRUE' && $key) {
mdkonline::automated_upgrades($conffile, $login, md5_hex($password), $boxname, $key, $country, 'TRUE');
mdkonline::write_wide_conf($login, $boxname, $country);
- output($logfile, N("Configuration uploaded successfully"))
- } else { output($logfile, N("Problem uploading configuration")) }
- } else { output($logfile, N("Cannot connect to mandrakeonline website: wrong login/password or router/firewall bad settings")) }
+ output_p($logfile, N("Configuration uploaded successfully"))
+ } else { output_p($logfile, N("Problem uploading configuration")) }
+ } else { output_p($logfile, N("Cannot connect to mandrakeonline website: wrong login/password or router/firewall bad settings")) }
} else {
wizards->new->safe_process($wiz, $in);
}
diff --git a/mdkonline.spec b/mdkonline.spec
index 863ef12a..cddc2659 100644
--- a/mdkonline.spec
+++ b/mdkonline.spec
@@ -1,6 +1,6 @@
%define version 1.1
%define name mdkonline
-%define release 20mdk
+%define release 25mdk
Summary: The MandrakeOnline Tool
Name: %{name}
@@ -12,7 +12,8 @@ License: GPL
Group: System/Configuration/Other
Requires: drakxtools-newt, perl-Gtk2-TrayIcon >= 0.03-3mdk, perl-Crypt-SSLeay >= 0.51-2mdk
Provides: %{name}-backend
-#Requires: hwdb-clients >= 0.15.1-1mdk
+Obsoletes: %{name}-backend
+Requires: hwdb-clients >= 0.15.1-1mdk
BuildRequires: gettext
BuildRoot: %{_tmppath}/%{name}-buildroot
BuildArch: noarch
@@ -112,8 +113,21 @@ rm -rf $RPM_BUILD_ROOT
##################################################################
# get the source from our cvs repository (see
# http://www.linuxmandrake.com/en/cvs.php3)
+
%changelog
-* Fri Nov 19 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-20mdk
+* Fri Dec 10 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-25mdk
+- fix typo when --debug is passed to mdkapplet (warly)
+
+* Thu Dec 9 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-24mdk
+- don't append protocol when url name is fully qualified (for corporate)
+- fixed empty message when update are done
+- cosmetics fixes (window sizes, more wait messages)
+
+* Mon Nov 29 2004 Frederic Lepied <flepied@mandrakesoft.com> 1.1-22mdk
+- use /corporate/ instead of /Corporate/ in update path.
+
+* Thu Nov 25 2004 Daouda LO <daouda@mandrakesoft.com> 1.1-21mdk
+- add online host on GUI (submitted by rwira)
- remerge mdkonline to one package
- superseded gtk based wizard by interactive one
- MNF support (config upload and misc)
diff --git a/mdkupdate b/mdkupdate
index 2d3a07a0..926a7039 100755
--- a/mdkupdate
+++ b/mdkupdate
@@ -31,12 +31,12 @@ require_root_capability();
my $confdir = '/root/.MdkOnline';
my $conffile = "$confdir/mdkupdate";
-my $difflog = '/tmp/diff.log';
+my $difflog = '/var/tmp/diff.log';
my $currentrpm = "$confdir/rpm_qa_installed_current";
my $afterrpm = "$confdir/rpm_qa_installed_after";
-my $logfile = '/tmp/mdkupdate.log';
+my $logfile = '/var/tmp/mdkupdate.log';
my $onlineUrl = "https://www.mandrakeonline.net/";
my $url;
@@ -102,7 +102,7 @@ if ($o{LOGIN} && $o{PASS} && $o{LOGIN} !~ /\s+/ && $o{PASS} !~ /\s+/) {
}
rpm_qa($afterrpm);
my %new = getVarsFromSh($conffile);
- my $need_upload = get_rpm_dif();
+ my $need_upload = get_rpm_diff();
if ($need_upload || $opt eq '--auto') {
#- send configuration and get back key to use...
my $r;
@@ -112,21 +112,21 @@ if ($o{LOGIN} && $o{PASS} && $o{LOGIN} !~ /\s+/ && $o{PASS} !~ /\s+/) {
clean_dir();
},
80 => sub {
- output($logfile, "[mdkupdate] Error 80: Client password does not match in database")
+ output_p($logfile, "[mdkupdate] Error 80: Client password does not match in database")
},
81 => sub {
- output($logfile, "[mdkupdate] Error 81: Bad Authentification key. Please rerun mdkonline wizard")
+ output_p($logfile, "[mdkupdate] Error 81: Bad Authentification key. Please rerun mdkonline wizard")
},
82 => sub {
- output($logfile, "[mdkupdate] Error 82: No active Online service found for this host.")
+ output_p($logfile, "[mdkupdate] Error 82: No active Online service found for this host.")
},
83 => sub {
- output($logfile, "[mdkupdate] Error 83: Unknown problem, better relaunch mdkonline wizard or check connexion")
+ output_p($logfile, "[mdkupdate] Error 83: Unknown problem, better relaunch mdkonline wizard or check connexion")
}
};
$action->{$u}->();
} else {
- output($logfile, N("Connection problem") . "\n" . N("Mandrakeupdate could not contact the site, we will try again."));
+ output_p($logfile, N("Connection problem") . "\n" . N("Mandrakeupdate could not contact the site, we will try again."));
}
} else {
my $ret = -1;
@@ -165,8 +165,9 @@ sub add_media {
my $mirror = shift;
my ($r) = mdkonline::get_release();
my $dist_type = mdkonline::get_distro_type();
- my $fullpath2mir = $r <= 10.0 ? "ftp://" . $mirror . if_($dist_type, "/$dist_type") ."/$r" . "/RPMS" . "/" :
- "ftp://" . $mirror . "/$r" . "/main_updates" . "/";
+ #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" . "/";
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";
@@ -190,7 +191,7 @@ sub send_conf_update {
}
sub get_rpm_diff {
my $isdif = `sdiff -s $afterrpm $currentrpm`;
- $isdif and output($difflog, $isdif), return 1;
+ $isdif and output_p($difflog, $isdif), return 1;
return 0
}
sub new_rpm_base {
@@ -199,7 +200,7 @@ sub new_rpm_base {
sub clean_dir() {
new_rpm_base();
mdkonline::clean_confdir();
- output($logfile, 'OK')
+ output_p($logfile, 'OK')
}
sub rpm_qa {
my ($file) = @_;