summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>1999-11-18 17:21:44 +0000
committerFrancois Pons <fpons@mandriva.com>1999-11-18 17:21:44 +0000
commit7c32cf9c3f2c6ad9884716f67aee1a2979812de9 (patch)
tree007b0a387ef2194ef61692bba27459b4d77fd53d /perl-install
parentff92a24605af270187adee63ba306b5ecd1d6ff9 (diff)
downloaddrakx-backup-do-not-use-7c32cf9c3f2c6ad9884716f67aee1a2979812de9.tar
drakx-backup-do-not-use-7c32cf9c3f2c6ad9884716f67aee1a2979812de9.tar.gz
drakx-backup-do-not-use-7c32cf9c3f2c6ad9884716f67aee1a2979812de9.tar.bz2
drakx-backup-do-not-use-7c32cf9c3f2c6ad9884716f67aee1a2979812de9.tar.xz
drakx-backup-do-not-use-7c32cf9c3f2c6ad9884716f67aee1a2979812de9.zip
*** empty log message ***
Diffstat (limited to 'perl-install')
-rw-r--r--perl-install/Xconfigurator.pm25
-rw-r--r--perl-install/Xconfigurator_consts.pm24
-rw-r--r--perl-install/c/stuff.xs.pm26
-rw-r--r--perl-install/pkgs.pm18
4 files changed, 51 insertions, 42 deletions
diff --git a/perl-install/Xconfigurator.pm b/perl-install/Xconfigurator.pm
index 3f8b7027c..cdedd020e 100644
--- a/perl-install/Xconfigurator.pm
+++ b/perl-install/Xconfigurator.pm
@@ -120,13 +120,14 @@ sub rewriteInittab {
sub keepOnlyLegalModes {
my ($card, $monitor) = @_;
- my $mem = 1024 * ($card->{memory} || 99999);
+ my $mem = 1024 * ($card->{memory} || ($card->{server} eq 'FBDev' ? 2048 : 99999));
my $hsync = max(split(/[,-]/, $monitor->{hsyncrange}));
while (my ($depth, $res) = each %{$card->{depth}}) {
@$res = grep {
$mem >= product(@$_, $depth / 8) &&
- $hsync >= ($min_hsync4wres{$_->[0]} || 0)
+ $hsync >= ($min_hsync4wres{$_->[0]} || 0) &&
+ ($card->{server} ne 'FBDev' || $vgamodes{"$_->[0]x$_->[1]x$depth"})
} @$res;
delete $card->{depth}{$depth} if @$res == 0;
}
@@ -387,17 +388,17 @@ sub autoDefaultDepth($$) {
my ($card, $wres_wanted) = @_;
my ($best, $depth);
-# if ($card->{server} eq 'FBDev') {
-# 16; #- assume 16 bits depth for this case.
-# } else {
- while (my ($d, $r) = each %{$card->{depth}}) {
- $depth = $depth ? max($depth, $d) : $d;
+ if ($card->{server} eq 'FBDev') {
+ return 16; #- this should work by default, FBDev is allowed only if install currently uses it at 16bpp.
+ }
- # try to have $resolution_wanted
- $best = $best ? max($best, $d) : $d if $r->[0][0] >= $wres_wanted;
- }
- $best || $depth or die "no valid modes";
-# }
+ while (my ($d, $r) = each %{$card->{depth}}) {
+ $depth = $depth ? max($depth, $d) : $d;
+
+ #- try to have $resolution_wanted
+ $best = $best ? max($best, $d) : $d if $r->[0][0] >= $wres_wanted;
+ }
+ $best || $depth or die "no valid modes";
}
sub autoDefaultResolution(;$) {
diff --git a/perl-install/Xconfigurator_consts.pm b/perl-install/Xconfigurator_consts.pm
index d8387879a..25c8483c7 100644
--- a/perl-install/Xconfigurator_consts.pm
+++ b/perl-install/Xconfigurator_consts.pm
@@ -60,22 +60,14 @@ $resolution_wanted = "1024x768";
'1024x768x16' => 791,
'1280xx16' => 794,
'1280x1024x16' => 794,
- '640xx24' => 786,
- '640x480x24' => 786,
- '800xx24' => 789,
- '800x600x24' => 789,
- '1024xx24' => 792,
- '1024x768x24' => 792,
- '1280xx24' => 795,
- '1280x1024x24' => 795,
- '640xx32' => 786, #- just in case.
- '640x480x32' => 786,
- '800xx32' => 789,
- '800x600x32' => 789,
- '1024xx32' => 792,
- '1024x768x32' => 792,
- '1280xx32' => 795,
- '1280x1024x32' => 795,
+#- '640xx24' => 786, #- there is a problem with these resolutions since the BIOS may take 24 or 32 planes.
+#- '640x480x24' => 786,
+#- '800xx24' => 789,
+#- '800x600x24' => 789,
+#- '1024xx24' => 792,
+#- '1024x768x24' => 792,
+#- '1280xx24' => 795,
+#- '1280x1024x24' => 795,
);
{ #- @monitorSize2resolution
diff --git a/perl-install/c/stuff.xs.pm b/perl-install/c/stuff.xs.pm
index a3317b76b..32ca98ff6 100644
--- a/perl-install/c/stuff.xs.pm
+++ b/perl-install/c/stuff.xs.pm
@@ -229,7 +229,12 @@ rpmdbOpenForTraversal(root)
char *root
CODE:
static rpmdb db;
+ rpmErrorCallBackType old_cb;
+ old_cb = rpmErrorSetCallback(rpmError_callback_empty);
+ rpmSetVerbosity(RPMMESS_FATALERROR);
RETVAL = rpmdbOpenForTraversal(root, &db) == 0 ? db : NULL;
+ rpmErrorSetCallback(old_cb);
+ rpmSetVerbosity(RPMMESS_NORMAL);
OUTPUT:
RETVAL
@@ -392,7 +397,12 @@ int
rpmdbRebuild(root)
char *root
CODE:
+ rpmErrorCallBackType old_cb;
+ old_cb = rpmErrorSetCallback(rpmError_callback_empty);
+ rpmSetVerbosity(RPMMESS_FATALERROR);
RETVAL = rpmdbRebuild(root) == 0;
+ rpmErrorSetCallback(old_cb);
+ rpmSetVerbosity(RPMMESS_NORMAL);
OUTPUT:
RETVAL
@@ -461,16 +471,16 @@ rpmRunTransactions(trans, callbackOpen, callbackClose, callbackStart, callbackPr
}
case RPMCALLBACK_INST_START: {
- dSP ;
- PUSHMARK(sp) ;
- XPUSHs(sv_2mortal(newSVpv(n, 0)));
- PUTBACK ;
- perl_call_sv(callbackStart, G_DISCARD);
- last_amount = 0;
- } break;
+ dSP ;
+ PUSHMARK(sp) ;
+ XPUSHs(sv_2mortal(newSVpv(n, 0)));
+ PUTBACK ;
+ perl_call_sv(callbackStart, G_DISCARD);
+ last_amount = 0;
+ } break;
case RPMCALLBACK_INST_PROGRESS:
- if ((amount - last_amount) * 4 / total) {
+ if ((amount - last_amount) * 4 / total) {
dSP;
PUSHMARK(sp);
XPUSHs(sv_2mortal(newSViv(amount)));
diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm
index c4e41db87..0c56f6a11 100644
--- a/perl-install/pkgs.pm
+++ b/perl-install/pkgs.pm
@@ -317,12 +317,15 @@ sub init_db {
c::rpmErrorSetCallback(fileno LOG);
#- c::rpmSetVeryVerbose();
-# log::l("reading /usr/lib/rpm/rpmrc");
-# c::rpmReadConfigFiles() or die "can't read rpm config files";
-# log::l("\tdone");
+ log::l("reading /usr/lib/rpm/rpmrc");
+ c::rpmReadConfigFiles() or die "can't read rpm config files";
+ log::l("\tdone");
+
+ if ($isUpgrade) {
+ c::rpmdbRebuild($prefix) or die "rebuilding of rpm database failed: ", c::rpmErrorString();
+ }
- $isUpgrade and c::rpmdbRebuild($prefix) || die "rebuilding of rpm database failed: ", c::rpmErrorString();
- c::rpmdbInit($prefix, 0644) || die "creation of rpm database failed: ", c::rpmErrorString();
+ c::rpmdbInit($prefix, 0644) or die "creation of rpm database failed: ", c::rpmErrorString();
#- $isUpgrade ? c::rpmdbRebuild($prefix) : c::rpmdbInit($prefix, 0644) or die "creation/rebuilding of rpm database failed: ", c::rpmErrorString();
}
@@ -488,9 +491,12 @@ sub install($$) {
eval { fs::mount("/proc", "$prefix/proc", "proc", 0) };
+ #- if someone try to change the function log::ld or the parameters used,
+ #- DON TRY THAT unless you have modified accordingly install_steps_gtk.
+ #- because log::ld is catched, furthermore do not translate the messages used.
log::l("starting installation: ", $nb, " packages, ", $total, " bytes");
+ log::ld("starting installation: ", $nb, " packages, ", $total, " bytes");
- #- !! do not translate these messages, they are used when catched (cf install_steps_gtk)
my $callbackOpen = sub {
my $f = (my $p = $packages{$_[0]})->{file};
print LOG "$f\n";