Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at Tue Jun 22 10:33:39 CEST 2010. -------- --- kiwi/kiwi.changes 2010-06-11 14:59:46.000000000 +0200 +++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2010-06-18 11:15:57.000000000 +0200 @@ -1,0 +2,17 @@ +Mon Jun 14 11:10:15 CEST 2010 - ms@suse.de + +- v4.42 +- redesigned and restructure the kiwi migration module + we were working in a small workgroup this week to + establish a new version of the migration module. Thanks + to everybody in my team. +- Remove some code duplication by using the functions: + createDirInteractive() , getDefaultBaseRoot() +- avoid a Perl runtime error message from being + printed if the XML file parsing fails. +- changed findExec to return undef if the executable + cannot be found. If as previously the execName is returned + the caller has no way to differentiate whether or not the + desired executable actually exists on the system. + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.xGaJ6M/_old 2010-06-22 10:31:06.000000000 +0200 +++ /var/tmp/diff_new_pack.xGaJ6M/_new 2010-06-22 10:31:06.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package kiwi (Version 4.41) +# spec file for package kiwi (Version 4.42) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -60,7 +60,7 @@ Requires: clicfs %endif Summary: OpenSuSE - KIWI Image System -Version: 4.41 +Version: 4.42 Release: 1 Group: System/Management License: GPLv2 @@ -331,6 +331,8 @@ rm -rf $RPM_BUILD_ROOT/etc/permissions.d/kiwi %endif +mkdir -p $RPM_BUILD_ROOT/var/cache/kiwi + test -f $RPM_BUILD_ROOT/srv/tftpboot/pxelinux.0 && \ echo /srv/tftpboot/pxelinux.0 > kiwi.loader test -f $RPM_BUILD_ROOT/srv/tftpboot/mboot.c32 && \ @@ -366,6 +368,7 @@ %defattr(-, root, root) %dir %{_datadir}/kiwi %dir %{_datadir}/kiwi/image +%dir /var/cache/kiwi %exclude %{_datadir}/kiwi/image/suse-11.3-JeOS %exclude %{_datadir}/kiwi/image/suse-11.2-JeOS %exclude %{_datadir}/kiwi/image/suse-11.1-JeOS ++++++ kiwi-docu.tar.bz2 ++++++ kiwi/kiwi-docu.tar.bz2 /mounts/work_src_done/STABLE/kiwi/kiwi-docu.tar.bz2 differ: char 11, line 1 ++++++ kiwi.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/.revision new/kiwi/.revision --- old/kiwi/.revision 2010-06-11 14:54:02.000000000 +0200 +++ new/kiwi/.revision 2010-06-18 10:59:05.000000000 +0200 @@ -1 +1 @@ -e61cda1fac02a85729510b79299833b97e2f26c8 +101552039f9be1abd70dd5449bb01c95c21d9e00 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/Makefile new/kiwi/Makefile --- old/kiwi/Makefile 2010-04-08 14:06:30.000000000 +0200 +++ new/kiwi/Makefile 2010-06-16 22:03:52.000000000 +0200 @@ -58,6 +58,11 @@ #-------------------------------------------- ${MAKE} -C tools all + #============================================ + # install .revision file + #-------------------------------------------- + test -f ./.revision || ./.version > .revision + install: #============================================ # Install base directories @@ -72,7 +77,6 @@ #============================================ # install .revision file #-------------------------------------------- - test -f ./.revision || ./.version > .revision install -m 644 ./.revision ${kiwi_prefix} #============================================ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2010-06-11 14:54:02.000000000 +0200 +++ new/kiwi/kiwi.pl 2010-06-18 10:59:05.000000000 +0200 @@ -45,7 +45,7 @@ #============================================ # Globals (Version) #-------------------------------------------- -our $Version = "4.41"; +our $Version = "4.42"; our $Publisher = "SUSE LINUX Products GmbH"; our $Preparer = "KIWI - http://kiwi.berlios.de"; our $openSUSE = "http://download.opensuse.org"; @@ -217,6 +217,52 @@ my $migrate; # KIWIMigrate object for system to image migration #============================================ +# createDirInteractive +#-------------------------------------------- +sub createDirInteractive { + my $kiwi = shift; + my $targetDir = shift; + if (! -d $targetDir) { + my $prefix = $kiwi -> getPrefix (1); + my $answer = "unknown"; + $kiwi -> info ("Destination: $Destination doesn't exist\n"); + while ($answer !~ /^yes$|^no$/) { + print STDERR $prefix, + "Would you like kiwi to create it [yes/no] ? "; + chomp ($answer = <>); + } + if ($answer eq "yes") { + qxx ("mkdir -p $Destination"); + return 1; + } + } else { + # Directory exists + return 1; + } + # Directory does not exist and user did + # not request dir creation. + return undef; +} + +#============================================ +# getDefaultBaseRoot +#-------------------------------------------- +sub getDefaultBaseRoot { + my $kiwi = shift; + my $xml = shift; + my $root; + $kiwi -> info ("Checking for default baseroot in XML data..."); + $root = $xml -> getImageDefaultBaseRoot(); + if ($root) { + $kiwi -> done(); + } else { + $kiwi -> notset(); + return undef; + } + return $root; +} + +#============================================ # findExec #-------------------------------------------- sub findExec { @@ -227,7 +273,7 @@ if ($kiwi) { $kiwi -> loginfo ("warning: $execName not found\n"); } - return $execName; + return undef; } return $execPath; } @@ -286,21 +332,9 @@ #---------------------------------------- if (defined $Build) { #========================================== - # Check if destdir exists or not + # Create destdir if needed #------------------------------------------ - if (! -d $Destination) { - my $prefix = $kiwi -> getPrefix (1); - my $answer = "unknown"; - $kiwi -> info ("Destination: $Destination doesn't exist\n"); - while ($answer !~ /^yes$|^no$/) { - print STDERR $prefix, - "Would you like kiwi to create it [yes/no] ? "; - chomp ($answer = <>); - } - if ($answer eq "yes") { - qxx ("mkdir -p $Destination"); - } - } + my $dirCreated = createDirInteractive($kiwi, $Destination); #========================================== # Setup prepare #------------------------------------------ @@ -407,14 +441,7 @@ # Check for default base root in XML #------------------------------------------ if (! defined $BaseRoot) { - $kiwi -> info ("Checking for default baseroot in XML data..."); - $BaseRoot = $xml -> getImageDefaultBaseRoot(); - if ($BaseRoot) { - $kiwi -> done(); - } else { - undef $BaseRoot; - $kiwi -> notset(); - } + $BaseRoot = getDefaultBaseRoot($kiwi, $xml); } #========================================== # Check for ignore-repos option @@ -650,33 +677,14 @@ ); } #========================================== - # Check if destdir exists or not + # Create destdir if needed #------------------------------------------ - if (! -d $Destination) { - my $prefix = $kiwi -> getPrefix (1); - my $answer = "unknown"; - $kiwi -> info ("Destination: $Destination doesn't exist\n"); - while ($answer !~ /^yes$|^no$/) { - print STDERR $prefix, - "Would you like kiwi to create it [yes/no] ? "; - chomp ($answer = <>); - } - if ($answer eq "yes") { - qxx ("mkdir -p $Destination"); - } - } + my $dirCreated = createDirInteractive($kiwi, $Destination); #========================================== # Check for default base root in XML #------------------------------------------ if (! defined $BaseRoot) { - $kiwi -> info ("Checking for default baseroot in XML data..."); - $BaseRoot = $xml -> getImageDefaultBaseRoot(); - if ($BaseRoot) { - $kiwi -> done(); - } else { - undef $BaseRoot; - $kiwi -> notset(); - } + $BaseRoot = getDefaultBaseRoot($kiwi, $xml); } #========================================== # Check tool set @@ -891,14 +899,7 @@ # Check for default base root in XML #------------------------------------------ if (! defined $BaseRoot) { - $kiwi -> info ("Checking for default baseroot in XML data..."); - $BaseRoot = $xml -> getImageDefaultBaseRoot(); - if ($BaseRoot) { - $kiwi -> done(); - } else { - undef $BaseRoot; - $kiwi -> notset(); - } + $BaseRoot = getDefaultBaseRoot($kiwi, $xml); } #========================================== # Initialize root system, use existing root @@ -1015,14 +1016,7 @@ # Check for default base root in XML #------------------------------------------ if (! defined $BaseRoot) { - $kiwi -> info ("Checking for default baseroot in XML data..."); - $BaseRoot = $xml -> getImageDefaultBaseRoot(); - if ($BaseRoot) { - $kiwi -> done(); - } else { - undef $BaseRoot; - $kiwi -> notset(); - } + $BaseRoot = getDefaultBaseRoot($kiwi, $xml); } #========================================== # Check for ignore-repos option diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/locale/Makefile new/kiwi/locale/Makefile --- old/kiwi/locale/Makefile 2010-05-12 16:31:17.000000000 +0200 +++ new/kiwi/locale/Makefile 2010-06-16 22:03:52.000000000 +0200 @@ -9,13 +9,19 @@ all: ./.locale + for i in `ls -1 .`; do \ + if [ -d ./$$i ];then \ + if [ ! "$$i" = "kiwi-help" ] && [ ! "$$i" == "kiwi-template" ];then \ + ( cd ./$$i/${LC} && msgfmt -o kiwi.mo kiwi.po ) ;\ + fi \ + done + install: for i in `ls -1 .`; do \ if [ -d ./$$i ];then \ if [ ! "$$i" = "kiwi-help" ] && [ ! "$$i" == "kiwi-template" ];then \ install -d -m 755 ${KIWILOCVZ}/$$i/${LC} ;\ - ( cd ./$$i/${LC} && msgfmt -o kiwi.mo kiwi.po ) ;\ test -e ./$$i/${LC}/kiwi.mo && \ install -m 644 ./$$i/${LC}/kiwi.mo ${KIWILOCVZ}/$$i/${LC} || true ;\ fi \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIMigrate.pm new/kiwi/modules/KIWIMigrate.pm --- old/kiwi/modules/KIWIMigrate.pm 2010-05-21 15:52:45.000000000 +0200 +++ new/kiwi/modules/KIWIMigrate.pm 2010-06-18 10:59:05.000000000 +0200 @@ -22,6 +22,7 @@ #------------------------------------------ use strict; use Carp qw (cluck); +use XML::LibXML; use File::Find; use File::stat; use File::Basename; @@ -30,6 +31,9 @@ use Storable; use KIWILog; use KIWIQX; +use File::Spec; +use Fcntl ':mode'; +use Cwd 'abs_path'; #========================================== # Constructor @@ -109,13 +113,6 @@ $kiwi -> done (); $kiwi -> info ("Results will be written to: $dest"); $kiwi -> done (); - if (! $this -> getRootDevice()) { - $kiwi -> failed (); - $kiwi -> error ("Couldn't find system root device"); - $kiwi -> failed (); - rmdir $dest; - return undef; - } #========================================== # Store addon repo information if specified #------------------------------------------ @@ -148,8 +145,6 @@ '\.rej$', # no diff reject files '\.lock$', # no lock files '\.tmp$', # no tmp files - '\/etc\/init\.d\/rc.*\/', # no service links - '\/etc\/init\.d\/boot.d\/', # no boot service links '\/etc\/gconf\/', # no gconf files '\.depend', # no make depend targets '\.backup', # no sysconfig backup files @@ -163,7 +158,6 @@ '\/proc\/', # no /proc data '\/sys\/', # no /sys data '\/abuild\/', # no /abuild data - '\/cache', # no cache files '\/fillup-templates', # no fillup data '\/var\/lib\/rpm', # no RPM data '\/var\/lib\/zypp', # no ZYPP data @@ -180,12 +174,17 @@ '\/var\/log', # no logs '\/var\/run', # no pid files '\/etc\/fstab', # no fstab file + '\/etc\/udev\/rules.d', # no udev rules '\/media\/', # no media automount files + '\/lost\+\/found', # no filesystem specific files '\/var\/lib\/hardware\/' # no hwinfo hardware files ); if (defined $excl) { my @exclude = @{$excl}; - foreach (@exclude) { $_ = quotemeta; }; + foreach (@exclude) { + $_ =~ s/\/$//; + $_ = quotemeta; + }; push @denyFiles,@exclude; } #========================================== @@ -243,7 +242,8 @@ #========================================== # Beautify report... #------------------------------------------ - qxx ("tar -C $dest -xf $main::KMigraCSS 2>&1"); + mkdir "$dest/.report"; + qxx ("tar -C $dest/.report -xf $main::KMigraCSS 2>&1"); #========================================== # Start report #------------------------------------------ @@ -263,12 +263,15 @@ print FD '</script>'."\n"; print FD "\t\t".''."\n"; print FD "\t\t".''."\n"; - print FD "\t\t".'<script type="text/javascript" src="js/jquery.min.js">'; + print FD 'href=".report/css/kiwi.css">'."\n"; + print FD "\t\t".'