summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2000-10-04 13:57:08 +0000
committerFrancois Pons <fpons@mandriva.com>2000-10-04 13:57:08 +0000
commitf6b05a31b60fb74c908967f2eb5c5a750846ea32 (patch)
tree71913b2a4d579289cac2c0f6e782681a40387e3a /perl-install
parentb355c7624b8c48db238faefe40b59ca8ad886fba (diff)
downloaddrakx-f6b05a31b60fb74c908967f2eb5c5a750846ea32.tar
drakx-f6b05a31b60fb74c908967f2eb5c5a750846ea32.tar.gz
drakx-f6b05a31b60fb74c908967f2eb5c5a750846ea32.tar.bz2
drakx-f6b05a31b60fb74c908967f2eb5c5a750846ea32.tar.xz
drakx-f6b05a31b60fb74c908967f2eb5c5a750846ea32.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/ChangeLog7
-rw-r--r--perl-install/c/stuff.xs.pm10
-rw-r--r--perl-install/install_any.pm4
3 files changed, 18 insertions, 3 deletions
diff --git a/perl-install/ChangeLog b/perl-install/ChangeLog
index 9b4ad240b..267b494da 100644
--- a/perl-install/ChangeLog
+++ b/perl-install/ChangeLog
@@ -17,7 +17,12 @@
* Xconfigurator.pm: removed bad card for 3D Rage Pro.
- * install_any.pm: removed Aurora for SiS card.
+ * install_any.pm: removed Aurora for SiS card, add more case for
+ detecting right cdrom for live upgrade, fixed wrong list of
+ packages for laptops.
+
+ * c/stuff.xs.pm: added time interval of 200ms between update of
+ progression bar of install, make sure the last step is seen.
2000-10-04 DrakX <install@linux-mandrake.com>
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index 52191cb27..5968289ac 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -11,6 +11,7 @@ print '
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/ioctl.h>
+#include <sys/time.h>
#include <sys/resource.h>
#include <sys/stat.h>
#include <sys/utsname.h>
@@ -710,6 +711,9 @@ rpmRunTransactions(trans, callbackOpen, callbackClose, callbackMessage, force)
const unsigned long *param_ul1 = NULL;
const unsigned long *param_ul2 = NULL;
char *n = (char *) pkgKey;
+ static struct timeval tprev;
+ static struct timeval tcurr;
+ long delta;
switch (what) {
case RPMCALLBACK_INST_OPEN_FILE: {
@@ -770,18 +774,22 @@ rpmRunTransactions(trans, callbackOpen, callbackClose, callbackMessage, force)
case RPMCALLBACK_INST_START: {
msg = "Starting installing package";
+ gettimeofday(&tprev, NULL);
param_s = n;
last_amount = 0;
} break;
case RPMCALLBACK_INST_PROGRESS:
- if (total && (amount - last_amount) * 22 / 4 / total) {
+ gettimeofday(&tcurr, NULL);
+ delta = 1000000 * (tcurr.tv_sec - tprev.tv_sec) + (tcurr.tv_usec - tprev.tv_usec);
+ if (delta > 200000 || amount >= total - 1) { /* (total && (amount - last_amount) * 22 / 4 / total)) { */
msg = "Progressing installing package";
param_s = n;
param_ul1 = &amount;
param_ul2 = &total;
+ tprev = tcurr;
last_amount = amount;
} break;
default: break;
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index 4cb1fc98b..e0fac5717 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -310,7 +310,7 @@ sub setPackages($) {
my @l = ();
push @l, 'xawtv', 'kwintv' if grep { $_->{driver} eq 'bttv' } detect_devices::probeall();
- push @l, "kapm", "kcmlaptop", "DrakProfile", "DrakSync" if $o->{pcmcia};
+ push @l, "drakprofile", "draksync", "irda-utils" if $o->{pcmcia};
push @l, "Glide_V5" if detect_devices::matching_desc('Voodoo 5');
push @l, "Glide_V3-DRI" if detect_devices::matching_desc('Voodoo (3|Banshee)');
push @l, "Device3Dfx", "XFree86-glide-module" if detect_devices::matching_desc('Voodoo');
@@ -392,11 +392,13 @@ sub hdInstallPath() {
sub unlockCdrom(;$) {
my ($cdrom) = @_;
$cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/rhimage| and $cdrom = $1;
+ $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1;
eval { $cdrom and ioctl detect_devices::tryOpen($1), c::CDROM_LOCKDOOR(), 0 };
}
sub ejectCdrom(;$) {
my ($cdrom) = @_;
$cdrom or cat_("/proc/mounts") =~ m|(/tmp/\S+)\s+/tmp/rhimage| and $cdrom = $1;
+ $cdrom or cat_("/proc/mounts") =~ m|(/dev/\S+)\s+/mnt/cdrom | and $cdrom = $1;
my $f = eval { $cdrom && detect_devices::tryOpen($cdrom) } or return;
getFile("XXX"); #- close still opened filehandle
eval { fs::umount("/tmp/rhimage") };