![](https://seccdn.libravatar.org/avatar/e2145bc5cf53dda95c308a3c75e8fef3.jpg?s=120&d=mm&r=g)
Hello community, here is the log from the commit of package suseRegister checked in at Fri Sep 26 16:56:33 CEST 2008. -------- --- suseRegister/suseRegister.changes 2008-09-19 18:01:55.000000000 +0200 +++ /mounts/work_src_done/STABLE/suseRegister/suseRegister.changes 2008-09-26 15:55:12.927613000 +0200 @@ -1,0 +2,12 @@ +Fri Sep 26 15:44:11 CEST 2008 - mc@suse.de + +- implement detecting product release order with + productline, register-release and flavor +- remove all --no-gpg-checks +- call zypper always with --non-interactive except of + the refresh call. +- use different exec mechanism for refresh if interactive + is true. The user should be able to answer questions about + accepting keys. + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suseRegister.spec ++++++ --- /var/tmp/diff_new_pack.g19615/_old 2008-09-26 16:55:47.000000000 +0200 +++ /var/tmp/diff_new_pack.g19615/_new 2008-09-26 16:55:47.000000000 +0200 @@ -20,7 +20,7 @@ Name: suseRegister Version: 1.3 -Release: 1 +Release: 2 Summary: Registration Tool Group: Productivity/Other License: GPL v2 or later @@ -93,6 +93,15 @@ %endif %changelog +* Fri Sep 26 2008 mc@suse.de +- implement detecting product release order with + productline, register-release and flavor +- remove all --no-gpg-checks +- call zypper always with --non-interactive except of + the refresh call. +- use different exec mechanism for refresh if interactive + is true. The user should be able to answer questions about + accepting keys. * Fri Sep 19 2008 mc@suse.de - call zypper without --non-interactive if --interactive parameter is given ++++++ suseRegister-1.3.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.3/SRPrivate.pm new/suseRegister-1.3/SRPrivate.pm --- old/suseRegister-1.3/SRPrivate.pm 2008-09-19 17:59:15.000000000 +0200 +++ new/suseRegister-1.3/SRPrivate.pm 2008-09-26 15:40:08.000000000 +0200 @@ -473,11 +473,7 @@ my $t0 = [gettimeofday] if($ctx->{time}); printLog($ctx, "info", indent($ctx)."START: installedLanguages") if($ctx->{time}); - my @cmdArgs = ("--no-refresh", "--quiet"); - if(!$ctx->{interactive}) - { - push @cmdArgs, "--non-interactive", "--no-gpg-checks"; - } + my @cmdArgs = ("--no-refresh", "--quiet", "--non-interactive"); push @cmdArgs, "search", "-i", "yast2-trans-"; ($code, $err, $result) = executeCommand($ctx, $ctx->{zypper}, undef, @cmdArgs); @@ -1227,11 +1223,7 @@ my $err = ""; my $result = ""; - my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout"); - if(!$ctx->{interactive}) - { - push @cmdArgs, "--non-interactive", "--no-gpg-checks"; - } + my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout", "--non-interactive"); push @cmdArgs, "patterns", "--installed-only"; ($code, $err, $result) = executeCommand($ctx, $ctx->{zypper}, undef, @cmdArgs); @@ -1281,11 +1273,7 @@ my $err = ""; my $result = ""; - my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout"); - if(!$ctx->{interactive}) - { - push @cmdArgs, "--non-interactive", "--no-gpg-checks"; - } + my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout", "--non-interactive"); push @cmdArgs, "products", "--installed-only"; ($code, $err, $result) = executeCommand($ctx, $ctx->{zypper}, undef, @cmdArgs); @@ -1342,12 +1330,31 @@ $data->{ARCH} = "ppc64"; } - if(!exists $data->{REGISTERRELEASE} || ! defined $data->{REGISTERRELEASE}) + my $release = ""; + + # search for overwrite file + if(exists $data->{PRODUCTLINE} && defined $data->{PRODUCTLINE} && + $data->{PRODUCTLINE} ne "" && -s "/var/lib/suseRegister/OEM/$data->{PRODUCTLINE}" ) { - $data->{REGISTERRELEASE} = "" + open(CNF, "< /var/lib/suseRegister/OEM/".$data->{PRODUCTLINE}) and do + { + $release = <CNF>; + chomp($release); + close CNF; + }; + } + # if not, look for REGISTERRELEASE + if($release eq "" && exists $data->{REGISTERRELEASE} && defined $data->{REGISTERRELEASE}) + { + $release = $data->{REGISTERRELEASE}; } + # if not, look for FLAVOR + if($release eq "" && exists $data->{FLAVOR} && defined $data->{FLAVOR}) + { + $release = $data->{FLAVOR}; + } - push @{$ctx->{installedProducts}}, ["$data->{NAME}", "$data->{VERSION}", "$data->{REGISTERRELEASE}", "$data->{ARCH}"]; + push @{$ctx->{installedProducts}}, ["$data->{NAME}", "$data->{VERSION}", "$release", "$data->{ARCH}"]; } sub getZmdConfigValues @@ -1658,11 +1665,7 @@ my $t0 = [gettimeofday] if($ctx->{time}); printLog($ctx, "info", indent($ctx)."START: currentServices") if($ctx->{time}); - my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout"); - if(!$ctx->{interactive}) - { - push @cmdArgs, "--non-interactive", "--no-gpg-checks"; - } + my @cmdArgs = ("--no-refresh", "--quiet", "--xmlout", "--non-interactive"); push @cmdArgs, "services", "--with-repos"; ($code, $msg, $xml) = executeCommand($ctx, $ctx->{zypper}, undef, @cmdArgs); @@ -1777,12 +1780,7 @@ # do not ask questions, especialy not to accept keys. # The source is only added to the repo. The questions # were asked at the first time this source is used. - my @zypperArgs = ("--no-refresh", "--quiet"); - - if(!$ctx->{interactive}) - { - push @zypperArgs, "--non-interactive", "--no-gpg-checks"; - } + my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive"); if(lc($type) eq "yum" || lc($type) eq "zypp") { @@ -1871,12 +1869,7 @@ # we want to delete a source. All questions are useless here. - my @zypperArgs = ("--no-refresh", "--quiet"); - - if(!$ctx->{interactive}) - { - push @zypperArgs, "--non-interactive", "--no-gpg-checks"; - } + my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive"); if(lc($type) eq "yum" || lc($type) eq "zypp") { @@ -1928,7 +1921,7 @@ return logPrintReturn($ctx, "No catalogs to subscribe\n", 14); } - my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive", "--no-gpg-checks", "modifyservice"); + my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive", "modifyservice"); push @zypperArgs, "--ar-to-enable"; push @zypperArgs, "$catalog->{ALIAS}"; @@ -1970,7 +1963,7 @@ return logPrintReturn($ctx, "No catalogs to disable\n", 14); } - my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive", "--no-gpg-checks", "modifyservice"); + my @zypperArgs = ("--no-refresh", "--quiet", "--non-interactive", "modifyservice"); push @zypperArgs, "--ar-to-disable"; push @zypperArgs, "$catalog->{ALIAS}"; @@ -2017,18 +2010,28 @@ if(!$ctx->{interactive}) { - push @zypperArgs, "--non-interactive", "--no-gpg-checks"; + push @zypperArgs, "--non-interactive"; } push @zypperArgs, "ref", "--service"; - my $err = ""; - ($code, $err, $msg) = executeCommand($ctx, $ctx->{zypper}, undef, @zypperArgs); - if($code != 0) + if($ctx->{interactive}) { - $code += 30; - $msg .= "\n$err"; + my $cmd = $ctx->{zypper}." ".join(' ', @zypperArgs); + printLog($ctx, "debug1", "Execute Command: $cmd"); + `$cmd 1>&2`; + $code = ($?>>8); } - + else + { + my $err = ""; + ($code, $err, $msg) = executeCommand($ctx, $ctx->{zypper}, undef, @zypperArgs); + if($code != 0) + { + $code += 30; + $msg .= "\n$err"; + } + } + printLog($ctx, "debug1", "Refresh failed($code): $msg") if($code != 0); printLog($ctx, "info", indent($ctx)."END: zyppRefresh:".(tv_interval($t0))) if($ctx->{time}); @@ -2050,13 +2053,7 @@ printLog($ctx, "info", indent($ctx)."START: zypperOSTarget") if($ctx->{time}); # do not set --quiet. This will result in no output - my @cmdArgs = (); - - if(!$ctx->{interactive}) - { - push @cmdArgs, "--non-interactive", "--no-gpg-checks"; - } - push @cmdArgs, "targetos"; + my @cmdArgs = ("--non-interactive", "targetos"); ($code, $err, $ostarget) = executeCommand($ctx, $ctx->{zypper}, undef, @cmdArgs); $code = $?; ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de