Permalink
Browse files

improve zypper dup logic

  • Loading branch information...
1 parent d0c8f8d commit 0689f470dd108b9ea9413780d48a0644ef517abc Bernhard M. Wiedemann committed Jan 30, 2012
Showing with 9 additions and 4 deletions.
  1. +9 −4 distri/opensuse/inst.d/100_zdup.pm
@@ -13,30 +13,35 @@ sub run()
$ENV{ZDUPREPOS}||="http://$ENV{SUSEMIRROR}/repo/oss/";
sendkey "ctrl-l";
script_sudo("killall gpk-update-icon packagekitd");
- if(!$ENV{TUMBLEWEED}) {
- script_sudo("zypper modifyrepo --all --disable");
+ script_sudo("zypper modifyrepo --all --disable");
+ if($ENV{TUMBLEWEED}) {
+ script_sudo("zypper ar --refresh http://widehat.opensuse.org/distribution/openSUSE-current/repo/oss/ 'openSUSE Current OSS'");
+ script_sudo("zypper ar --refresh http://widehat.opensuse.org/distribution/openSUSE-current/repo/non-oss/ 'openSUSE Current non-OSS'");
+ script_sudo("zypper ar --refresh http://widehat.opensuse.org/update/openSUSE-current/ 'openSUSE Current Update'");
}
my $nr=1;
foreach my $r (split(/\+/, $ENV{ZDUPREPOS})) {
script_sudo("zypper addrepo $r repo$nr");
$nr++;
}
- script_sudo("zypper --gpg-auto-import-keys dup -l");
+ script_sudo("zypper --gpg-auto-import-keys refresh");
+ script_sudo("zypper dup -l");
$self->take_screenshot;
#for(1..20) { sendkeyw "3"; # ignore unresolvable
#}
for(1..20) {
sendkey "2"; # ignore unresolvable
sendkeyw "ret";
}
+ sendautotype("1\n"); # some conflicts can not be ignored
$self->take_screenshot;
sendautotype("y\n"); # confirm
local $ENV{SCREENSHOTINTERVAL}=2.5;
for(1..12) {
sleep 60;
sendkey "shift"; # prevent console screensaver
}
- waitinststage("blackscreen", 5000); # wait for screensaver to blank console
+ waitstillimage(60, 5000); # wait for upgrade to finish
}
1;

0 comments on commit 0689f47

Please sign in to comment.