Hello community, here is the log from the commit of package suseRegister checked in at Tue Jun 5 18:26:23 CEST 2007. -------- --- suseRegister/suseRegister.changes 2007-05-03 12:28:11.000000000 +0200 +++ /mounts/work_src_done/NOARCH/suseRegister/suseRegister.changes 2007-06-05 15:42:04.383567000 +0200 @@ -1,0 +2,7 @@ +Tue Jun 5 15:41:08 CEST 2007 - mc@suse.de + +- ignore missing sysconfig file [#279757] +- save cache only on success [#278163] +- subscribe yum and zypp catalogs [#271861] + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suseRegister.spec ++++++ --- /var/tmp/diff_new_pack.I19022/_old 2007-06-05 18:26:18.000000000 +0200 +++ /var/tmp/diff_new_pack.I19022/_new 2007-06-05 18:26:18.000000000 +0200 @@ -12,7 +12,7 @@ Name: suseRegister Version: 1.2 -Release: 39 +Release: 47 Summary: Registration Tool Group: Productivity/Other License: GNU General Public License (GPL) @@ -95,6 +95,10 @@ %endif %changelog +* Tue Jun 05 2007 - mc@suse.de +- ignore missing sysconfig file [#279757] +- save cache only on success [#278163] +- subscribe yum and zypp catalogs [#271861] * Thu May 03 2007 - mc@suse.de - Remove init script trigger only on success [Bug 270870] ++++++ suseRegister-1.2.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.2/SRPrivate.pm new/suseRegister-1.2/SRPrivate.pm --- old/suseRegister-1.2/SRPrivate.pm 2007-04-26 12:37:57.000000000 +0200 +++ new/suseRegister-1.2/SRPrivate.pm 2007-06-05 15:40:03.000000000 +0200 @@ -39,28 +39,26 @@ my $sysconfigHWData = "false"; - open(CNF, "< $ctx->{sysconfigFile}") or do { - logPrintReturn("cannot open file $ctx->{sysconfigFile}: $!\n", 12); - }; + open(CNF, "< $ctx->{sysconfigFile}") and do { - while(<CNF>) - { - if($_ =~ /^\s*#/) + while(<CNF>) { - next; - } - elsif($_ =~ /^SUBMIT_OPTIONAL\s*=\s*"*([^"\s]*)"*\s*/ && defined $1 && $1 ne "") - { - $sysconfigOptional = $1; - - } - elsif($_ =~ /^SUBMIT_HWDATA\s*=\s*"*([^"\s]*)"*\s*/ && defined $1 && $1 ne "") - { - $sysconfigHWData = $1; + if($_ =~ /^\s*#/) + { + next; + } + elsif($_ =~ /^SUBMIT_OPTIONAL\s*=\s*"*([^"\s]*)"*\s*/ && defined $1 && $1 ne "") + { + $sysconfigOptional = $1; + + } + elsif($_ =~ /^SUBMIT_HWDATA\s*=\s*"*([^"\s]*)"*\s*/ && defined $1 && $1 ne "") + { + $sysconfigHWData = $1; + } } - } - close CNF; - + close CNF; + }; if(!$ctx->{nooptional}) { @@ -1416,9 +1414,9 @@ sub saveLastZmdConfig { my $ctx = shift; - my $zmdconfig = shift || undef; + #my $zmdconfig = shift || undef; - if(!defined $zmdconfig) + if(!exists $ctx->{newzmdconfig} || !defined $ctx->{newzmdconfig}) { return logPrintReturn($ctx, "Missing data.\n", 14); } @@ -1435,7 +1433,7 @@ } open(OUT, "> ".$ctx->{zmdcache}) or return logPrintReturn($ctx, "Cannot open cache file '$ctx->{zmdcache}': $!", 12); - print OUT $zmdconfig; + print OUT $ctx->{newzmdconfig}; close OUT; return (0, ""); diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.2/suse_register new/suseRegister-1.2/suse_register --- old/suseRegister-1.2/suse_register 2007-04-26 12:37:57.000000000 +0200 +++ new/suseRegister-1.2/suse_register 2007-06-05 15:40:03.000000000 +0200 @@ -429,8 +429,6 @@ SUSE::SuseRegister::configureZMD($ctx); if($ctx->{errorcode} != 0) { - # cache rollback - copy($ctx->{zmdcache}.".old", $ctx->{zmdcache}); logPrintExit($ctx, $ctx->{errormsg}, $ctx->{errorcode}); } diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.2/SuseRegister.pm new/suseRegister-1.2/SuseRegister.pm --- old/suseRegister-1.2/SuseRegister.pm 2007-04-26 12:37:57.000000000 +0200 +++ new/suseRegister-1.2/SuseRegister.pm 2007-06-05 15:40:03.000000000 +0200 @@ -926,7 +926,8 @@ { # we ignore possible errors here SUSE::SRPrivate::readLastZmdConfig($ctx); - SUSE::SRPrivate::saveLastZmdConfig($ctx, $res); + #SUSE::SRPrivate::saveLastZmdConfig($ctx, $res); + $ctx->{newzmdconfig} = "$res"; if ($ctx->{xmlout}) { @@ -1115,8 +1116,15 @@ } # else do nothing } - SUSE::SRPrivate::logPrintError($ctx, $lastmsg, $lastcode); + if($lastcode == 0) + { + # zmd successfully configured - save the cache file + SUSE::SRPrivate::saveLastZmdConfig($ctx); + } + + SUSE::SRPrivate::logPrintError($ctx, $lastmsg, $lastcode); + print STDERR SUSE::SRPrivate::indent($ctx)."END: configureZMD:".(tv_interval($t0))."\n" if($ctx->{time}); $ctx->{timeindent}--; @@ -1677,6 +1685,20 @@ } } } + elsif(lc($type) eq "yum" || + lc($type) eq "zypp") + { + # need a subscribe too + my $cat_name = $url; + $cat_name = $alias if (defined $alias && $alias ne ""); + + ($code, $msg) = SUSE::SRPrivate::rugCatalogAdd($ctx, $cat_name); + if ($code != 0) + { + $lastcode = $code; + $lastmsg = $msg; + } + } } else { ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org