Hello community, here is the log from the commit of package suseRegister checked in at Tue Apr 4 18:24:03 CEST 2006. -------- --- suseRegister/suseRegister.changes 2006-03-31 10:25:51.000000000 +0200 +++ suseRegister/suseRegister.changes 2006-04-04 15:50:53.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Apr 4 15:49:18 CEST 2006 - mc@suse.de + +- provide release in products +- remove xen magic + +------------------------------------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ suseRegister.spec ++++++ --- /var/tmp/diff_new_pack.WR5vaq/_old 2006-04-04 18:23:58.000000000 +0200 +++ /var/tmp/diff_new_pack.WR5vaq/_new 2006-04-04 18:23:58.000000000 +0200 @@ -13,7 +13,7 @@ Name: suseRegister BuildRequires: mono-core Version: 1.0 -Release: 38 +Release: 39 Summary: Registration tool Group: Productivity/Other License: GPL @@ -59,6 +59,9 @@ /usr/lib/suseRegister/bin/* %changelog -n suseRegister +* Tue Apr 04 2006 - mc@suse.de +- provide release in products +- remove xen magic * Fri Mar 31 2006 - mc@suse.de - check location of query-pool [#162302] * Thu Mar 30 2006 - mc@suse.de ++++++ suseRegister-1.0.tar.bz2 ++++++ diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/suseRegister-1.0/suse_register new/suseRegister-1.0/suse_register --- old/suseRegister-1.0/suse_register 2006-03-31 10:22:30.000000000 +0200 +++ new/suseRegister-1.0/suse_register 2006-04-04 15:48:56.000000000 +0200 @@ -89,8 +89,8 @@ my $uname = "/bin/uname"; my $hwinfo = "/usr/sbin/hwinfo"; my $zmdInit = "/etc/init.d/novell-zmd"; -my $xenstoreread = "/usr/bin/xenstore-read"; -my $xenstorewrite = "/usr/bin/xenstore-write"; +#my $xenstoreread = "/usr/bin/xenstore-read"; +#my $xenstorewrite = "/usr/bin/xenstore-write"; my $mono = "/usr/bin/mono"; my $createGuid = "/usr/lib/suseRegister/bin/create-guid.exe"; @@ -340,43 +340,45 @@ ########## host GUID (virtualization) ############# - if(-d "/proc/xen" && - -e $xenstoreread) - { - print STDERR "Found XEN\n" if($debug >= 2); - - # FIXME: check if this command really returns what we want - my $val = `$xenstoreread domid 2>/dev/null`; - chomp($val); - - if(defined $val && $val eq "0") - { - print STDERR "We are Domain-0\n" if($debug >= 2); - - # we are Domain-0 - if(-e $xenstorewrite) - { - print STDERR "Write hostGUID to xenbus\n" if($debug); +# spec not finished and this seems not to work + +# if(-d "/proc/xen" && +# -e $xenstoreread) +# { +# print STDERR "Found XEN\n" if($debug >= 2); + +# # FIXME: check if this command really returns what we want +# my $val = `$xenstoreread domid 2>/dev/null`; +# chomp($val); + +# if(defined $val && $val eq "0") +# { +# print STDERR "We are Domain-0\n" if($debug >= 2); + +# # we are Domain-0 +# if(-e $xenstorewrite) +# { +# print STDERR "Write hostGUID to xenbus\n" if($debug); - `$xenstorewrite hostGUID $guid 2>/dev/null`; - # FIXME: after rebooting Domain-0 this value might be gone - } - } - else - { - print STDERR "try to read hostGUID from xenbus\n" if($debug >= 2); - - $val = `$xenstoreread hostGUID 2>/dev/null`; - chomp($val); - - if(defined $val && $val ne "") - { - print STDERR "Got hostGUID: $val\n" if($debug); +# `$xenstorewrite hostGUID $guid 2>/dev/null`; +# # FIXME: after rebooting Domain-0 this value might be gone +# } +# } +# else +# { +# print STDERR "try to read hostGUID from xenbus\n" if($debug >= 2); + +# $val = `$xenstoreread hostGUID 2>/dev/null`; +# chomp($val); + +# if(defined $val && $val ne "") +# { +# print STDERR "Got hostGUID: $val\n" if($debug); - $hostGUID = $val; - } - } - } +# $hostGUID = $val; +# } +# } +# } ############## some initial values ######################## @@ -832,7 +834,8 @@ { $writer->startTag("product", "version" => $PArray->[1], - "arch" => $PArray->[2]); + "release" => $PArray->[2], + "arch" => $PArray->[3]); if ($PArray->[0] =~ /\s+/) { $writer->cdata($PArray->[0]); @@ -1002,7 +1005,8 @@ { $writer->startTag("product", "version" => $PArray->[1], - "arch" => $PArray->[2]); + "release" => $PArray->[2], + "arch" => $PArray->[3]); if ($PArray->[0] =~ /\s+/) { $writer->cdata($PArray->[0]); @@ -1294,6 +1298,7 @@ my $type = $p[1]; my $product = $p[2]; my $version = $p[3]; + my $release = ""; my $arch = $p[4]; if(!defined $arch || $arch eq "" || $arch eq "noarch") @@ -1302,9 +1307,22 @@ chomp($arch); } + if(defined $version && $version ne "") + { + my @v = split("-", $version, 2); + if(exists $v[0] && defined $v[0] && $v[0] ne "") + { + $version = $v[0]; + } + if(exists $v[1] && defined $v[1] && $v[1] ne "") + { + $release = $v[1]; + } + } + if($installed eq "i" && lc($type) eq lc("product")) { - push @installedProducts, [$product, $version, $arch]; + push @installedProducts, [$product, $version, $release, $arch]; } } } ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun...