Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at Fri Feb 11 16:39:07 CET 2011. -------- --- kiwi/kiwi.changes 2011-02-07 14:48:38.000000000 +0100 +++ kiwi/kiwi.changes 2011-02-11 14:33:52.000000000 +0100 @@ -1,0 +2,83 @@ +Fri Feb 11 14:19:59 CET 2011 - ms@suse.de + +- v4.74 released + +------------------------------------------------------------------- +Thu Feb 10 14:58:28 CET 2011 - ms@suse.de + +- removed split sections from oem examples, use the kiwi + default split section for this examples + +------------------------------------------------------------------- +Thu Feb 10 14:50:15 CET 2011 - ms@suse.de + +- changed the filesystem type to ext3 for 11.2 oem example + because we found issues with ext4 on 11.2 + +------------------------------------------------------------------- +Thu Feb 10 12:31:03 CET 2011 - ms@suse.de + +- fixed __addDefaultSplitNode() function. A cloneNode() call + is required if you add children from another DOM tree + +------------------------------------------------------------------- +Wed Feb 9 15:59:13 CET 2011 - ms@suse.de + +- speedup prepare step with caches by skipping the bootstrap + installation. If there is a cache available we add the + bootstrap packages into the image package section and run + the rest of the installation procedure in one image + installation step + +------------------------------------------------------------------- +Wed Feb 9 14:44:12 CET 2011 - ms@suse.de + +- make use of zypper's autorefresh feature and don't call + zypper refresh manually anymore + +------------------------------------------------------------------- +Wed Feb 9 11:55:37 CET 2011 - adrian@suse.de + +- offer options to ignore specified but missing packages for product generation + +------------------------------------------------------------------- +Wed Feb 9 11:28:21 CET 2011 - adrian@suse.de + +- make a difference between arch modifiers (addarch and removearch) and + usage of a package (no modifier). This solves the last problem for openSUSE + biarch medias. + +------------------------------------------------------------------- +Tue Feb 8 23:07:54 CET 2011 - ms@suse.de + +- fixed netboot disk device check. In case of a ramdisk only + configuration there is no DISK set but the image download + should happen into the ramdisk device. Therefore the disk + device check was enhanced to check the ramdisk setup too + +------------------------------------------------------------------- +Tue Feb 8 16:50:33 CET 2011 - adrian@suse.de + +- fix arch= statement for real for multi arch medias, use only the subset + of global required archs and filtered one by arch= statement + +------------------------------------------------------------------- +Tue Feb 8 14:49:47 CET 2011 - ms@suse.de + +- moved caching system over from clicfs to a device mapper + snapshot table. This seems to be more stable and leaves more + room for improvements + +------------------------------------------------------------------- +Mon Feb 7 21:19:00 CET 2011 - adrian@suse.de + +- Revert wrong commit overriding package attributes on multi arch medias + + This reverts commit 1ef1a8b62df61899480285051c9b725990685113. + +------------------------------------------------------------------- +Mon Feb 7 15:42:37 CET 2011 - adrian@suse.de + +- avoid error message about undefined $manager variable when building a product + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.N7mcez/_old 2011-02-11 16:38:48.000000000 +0100 +++ /var/tmp/diff_new_pack.N7mcez/_new 2011-02-11 16:38:48.000000000 +0100 @@ -65,8 +65,8 @@ %endif %endif Summary: OpenSuSE - KIWI Image System -Version: 4.73 -Release: 2 +Version: 4.74 +Release: 1 Group: System/Management License: GPLv2 Source: %{name}.tar.bz2 @@ -517,5 +517,4 @@ %{_datadir}/kiwi/image/suse-SLE11-JeOS %endif - %changelog ++++++ kiwi-docu.tar.bz2 ++++++ kiwi/kiwi-docu.tar.bz2 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 2011-02-07 14:45:57.000000000 +0100 +++ new/kiwi/.revision 2011-02-11 14:21:47.000000000 +0100 @@ -1 +1 @@ -11392a44f3147b90816aabcc622a254039f425f5 +0ff5ec36ef0a40a6877b4ab0a1356e7cc95da7ca diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2011-02-07 14:45:57.000000000 +0100 +++ new/kiwi/kiwi.pl 2011-02-11 14:21:47.000000000 +0100 @@ -48,7 +48,7 @@ #============================================ # Globals (Version) #-------------------------------------------- -our $Version = "4.73"; +our $Version = "4.74"; our $Publisher = "SUSE LINUX Products GmbH"; our $Preparer = "KIWI - http://kiwi.berlios.de"; our $openSUSE = "http://download.opensuse.org"; @@ -468,6 +468,15 @@ my $cacheInit = initializeCache($xml,\%type,$Prepare); selectCache ($xml,$cacheInit); } + if ($ImageCache) { + #========================================== + # Add bootstrap packages to image section + #------------------------------------------ + my @initPacs = $xml -> getBaseList(); + if (@initPacs) { + $xml -> addImagePackages (@initPacs); + } + } #========================================== # Initialize root system #------------------------------------------ @@ -3034,7 +3043,7 @@ if (($type{boot}) && ($type{boot} =~ /.*\/(.*)/)) { $CacheDistro = $1; } elsif ( - ($type{type} =~ /clicfs|cpio/) && ($name =~ /initrd-.*boot-(.*)/) + ($type{type} =~ /ext2|cpio/) && ($name =~ /initrd-.*boot-(.*)/) ) { $CacheDistro = $1; } else { @@ -3119,11 +3128,11 @@ #------------------------------------------ if (@CachePackages) { my $cstr = $xml -> getImageName(); - my $cdir = $ImageCache."/".$CacheDistro."-".$cstr.".clicfs"; + my $cdir = $ImageCache."/".$CacheDistro."-".$cstr.".ext2"; push @file,$cdir; } foreach my $pattern (@CachePatterns) { - my $cdir = $ImageCache."/".$CacheDistro."-".$pattern.".clicfs"; + my $cdir = $ImageCache."/".$CacheDistro."-".$pattern.".ext2"; push @file,$cdir; } #========================================== @@ -3131,7 +3140,7 @@ #------------------------------------------ foreach my $clic (@file) { my $meta = $clic; - $meta =~ s/\.clicfs$/\.cache/; + $meta =~ s/\.ext2$/\.cache/; #========================================== # check cache files #------------------------------------------ @@ -3201,6 +3210,7 @@ } } } + undef $ImageCache; return undef; } @@ -3216,7 +3226,6 @@ #========================================== # Variable setup and reset function #------------------------------------------ - $ENV{MKCLICFS_COMPRESSION} = 0; my $resetVariables = createResetClosure(); my $CacheDistro = $init->[0]; my @CachePatterns = @{$init->[1]}; @@ -3280,10 +3289,10 @@ qxx ("rm -f $root/image/config.xml"); qxx ("rm -f $root/image/*.kiwi"); #========================================== - # Turn cache into clicfs file + # Turn cache into ext2 fs image #------------------------------------------ $kiwi -> info ( - "--> Building clicfs cache...\n" + "--> Building ext2 cache...\n" ); # /.../ # tell the system that we are in cache mode @@ -3291,18 +3300,19 @@ # cache # ---- $InitCache = "active"; + my $cxml = new KIWIXML ($kiwi,$BasePath."/modules"); my $image = new KIWIImage ( - $kiwi,$xml,$root,$imageCacheDir,undef,"/base-system" + $kiwi,$cxml,$root,$imageCacheDir,undef,"/base-system" ); if (! defined $image) { &{$resetVariables}; return undef; } - if (! $image -> createImageClicFS ()) { + if (! $image -> createImageEXT2 ()) { &{$resetVariables}; return undef; } - my $name = $imageCacheDir."/".$xml -> buildImageName(); - qxx ("mv $name $main::RootTree.clicfs"); - qxx ("rm $name.clicfs $name.md5"); + my $name= $imageCacheDir."/".$cxml -> buildImageName(); + qxx ("mv $name $main::RootTree.ext2"); + qxx ("rm -f $name.ext2"); qxx ("rm -f $imageCacheDir/initrd-*"); qxx ("rm -rf $main::RootTree"); #========================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWICache.kiwi new/kiwi/modules/KIWICache.kiwi --- old/kiwi/modules/KIWICache.kiwi 2010-12-03 16:08:51.000000000 +0100 +++ new/kiwi/modules/KIWICache.kiwi 2011-02-11 14:21:47.000000000 +0100 @@ -9,7 +9,9 @@ </specification> </description> <preferences> - <type image="clicfs"/> + <type image="ext2"> + <size unit="G">4</size> + </type> <version>1.1.1</version> <packagemanager>zypper</packagemanager> <rpm-excludedocs>true</rpm-excludedocs> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWICollect.pm new/kiwi/modules/KIWICollect.pm --- old/kiwi/modules/KIWICollect.pm 2011-02-07 14:45:57.000000000 +0100 +++ new/kiwi/modules/KIWICollect.pm 2011-02-11 14:21:47.000000000 +0100 @@ -894,8 +894,10 @@ foreach my $pack(@missingPackages) { $this->logMsg("W", " ".$pack); } - # FIXME: we need to make it an option to ignore this error. - $this->logMsg("E", "Required packages were not found"); + if ( !defined($this->{m_proddata}->getOpt("IGNORE_MISSING_REPO_PACKAGES")) || $this->{m_proddata}->getOpt("IGNORE_MISSING_REPO_PACKAGES") ne "true" ) { + # abort + $this->logMsg("E", "Required packages were not found"); + }; } return $retval; } @@ -1200,8 +1202,10 @@ } } # Package was not found - # FIXME: we need to make it an option to ignore this error. - $this->logMsg("E", "Metapackage <$metapack> not available for required $reqArch architecture!"); + if ( !defined($this->{m_proddata}->getOpt("IGNORE_MISSING_META_PACKAGES")) || $this->{m_proddata}->getOpt("IGNORE_MISSING_META_PACKAGES") ne "true" ) { + # abort + $this->logMsg("E", "Metapackage <$metapack> not available for required $reqArch architecture!"); + } } } @@ -1484,26 +1488,28 @@ return @archs if ($packOptions->{'onlyarch'} eq "skipit"); # convinience for old hack }; + my @archs = $this->{m_archlist}->headList(); if(defined($packOptions->{'arch'})) { # Check if this is a rule for this platform $packOptions->{'arch'} =~ s{,\s*,}{,}g; $packOptions->{'arch'} =~ s{,\s*}{,}g; $packOptions->{'arch'} =~ s{,\s*$}{}; $packOptions->{'arch'} =~ s{^\s*,}{}; - my $found = 0; + @archs = (); foreach my $plattform (split(/,\s*/, $packOptions->{'arch'})) { foreach my $reqArch ($this->{m_archlist}->headList()) { - $found = 1 if ( $reqArch eq $plattform ); + push @archs, $reqArch if ( $reqArch eq $plattform ); }; }; - if ( "$found" eq "0" ) { - # not our plattform + if ( @archs == 0 ) { + # our required plattforms were not found at all, return empty list return @archs; } } if(defined($packOptions->{'onlyarch'})) { - # allow 'onlyarch="x86_64,i586"' + # reset arch list and limit to onlyarch definition + @archs = (); $packOptions->{'onlyarch'} =~ s{,\s*,}{,}g; $packOptions->{'onlyarch'} =~ s{,\s*}{,}g; $packOptions->{'onlyarch'} =~ s{,\s*$}{}; @@ -1515,20 +1521,9 @@ return @archs; } - # set required archs - if(defined($packOptions->{'arch'})) { - # use archs defined for this package - foreach my $plattform (split(/,\s*/, $packOptions->{'arch'})) { - foreach my $reqArch ($this->{m_archlist}->headList()) { - push @archs, $reqArch if ( $reqArch eq $plattform ); - }; - }; - }else{ - # take all global defined archs - push @archs, $this->{m_archlist}->headList(); - } - if(defined($packOptions->{'addarch'})) { + # addarch is a modifier, use default list as base + @archs = $this->{m_archlist}->headList(); if(not(grep($packOptions->{'addarch'} eq $_, @archs))) { $packOptions->{'addarch'} =~ s{,\s*,}{,}g; $packOptions->{'addarch'} =~ s{,\s*}{,}g; @@ -1538,6 +1533,8 @@ } } if(defined($packOptions->{'removearch'})) { + # removearch is a modifier, use default list as base + @archs = $this->{m_archlist}->headList(); $packOptions->{'removearch'} =~ s{,\s*,}{,}g; $packOptions->{'removearch'} =~ s{,\s*}{,}g; $packOptions->{'removearch'} =~ s{,\s*$}{}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIImage.pm new/kiwi/modules/KIWIImage.pm --- old/kiwi/modules/KIWIImage.pm 2011-02-03 15:59:07.000000000 +0100 +++ new/kiwi/modules/KIWIImage.pm 2011-02-11 14:21:47.000000000 +0100 @@ -3598,6 +3598,15 @@ my $name = shift; my $kiwi = $this->{kiwi}; #========================================== + # Skip this in init cache mode + #------------------------------------------ + if (defined $main::InitCache) { + if ($name =~ /\.gz$/) { + $name =~ s/\.gz//; + } + return $name; + } + #========================================== # Create image md5sum #------------------------------------------ $kiwi -> info ("Creating image MD5 sum..."); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIManager.pm new/kiwi/modules/KIWIManager.pm --- old/kiwi/modules/KIWIManager.pm 2011-01-21 16:01:41.000000000 +0100 +++ new/kiwi/modules/KIWIManager.pm 2011-02-11 14:21:47.000000000 +0100 @@ -765,7 +765,7 @@ $prio = $val; } } - my $sadd = "addrepo @zopts $alias"; + my $sadd = "addrepo -f @zopts $alias"; if (! $chroot) { $kiwi -> info ("Adding bootstrap zypper service: $alias"); $data = qxx ("@zypper --root \"$root\" $sadd 2>&1"); @@ -1140,9 +1140,7 @@ print $fd "export ZYPP_MODALIAS_SYSFS=/tmp\n"; print $fd "export YAST_IS_RUNNING=true\n"; print $fd "export ZYPP_CONF=".$this->{zyppconf}."\n"; - print $fd "@kchroot @zypper refresh &\n"; - print $fd "SPID=\$!;wait \$SPID\n"; - print $fd "test \$? = 0 && @kchroot @zypper install "; + print $fd "@kchroot @zypper install "; print $fd "@installOpts @addonPackages &\n"; print $fd "SPID=\$!;wait \$SPID\n"; print $fd "ECODE=\$?\n"; @@ -1285,9 +1283,7 @@ print $fd "export ZYPP_MODALIAS_SYSFS=/tmp\n"; print $fd "export YAST_IS_RUNNING=true\n"; print $fd "export ZYPP_CONF=".$this->{zyppconf}."\n"; - print $fd "@kchroot @zypper refresh &\n"; - print $fd "SPID=\$!;wait \$SPID\n"; - print $fd "test \$? = 0 && @kchroot @zypper remove "; + print $fd "@kchroot @zypper remove "; print $fd "@installOpts @removePackages || true &\n"; print $fd "SPID=\$!;wait \$SPID\n"; print $fd "ECODE=\$?\n"; @@ -1447,9 +1443,6 @@ print $fd "export ZYPP_MODALIAS_SYSFS=/tmp\n"; print $fd "export YAST_IS_RUNNING=true\n"; print $fd "export ZYPP_CONF=".$this->{zyppconf}."\n"; - print $fd "@kchroot @zypper refresh &\n"; - print $fd "SPID=\$!;wait \$SPID\n"; - print $fd "test \$? = 0 && "; if (defined $delPacks) { my @removePackages = @{$delPacks}; if (@removePackages) { @@ -1902,9 +1895,6 @@ print $fd "export ZYPP_MODALIAS_SYSFS=/tmp\n"; print $fd "export YAST_IS_RUNNING=true\n"; print $fd "export ZYPP_CONF=".$root."/".$this->{zyppconf}."\n"; - print $fd "@zypper --root $root refresh &\n"; - print $fd "SPID=\$!;wait \$SPID\n"; - print $fd "test \$? = 0 && "; if (@newprods) { print $fd "@zypper --root $root install "; print $fd "@installOpts -t product @newprods &\n"; @@ -1970,9 +1960,6 @@ print $fd "export ZYPP_MODALIAS_SYSFS=/tmp\n"; print $fd "export YAST_IS_RUNNING=true\n"; print $fd "export ZYPP_CONF=".$this->{zyppconf}."\n"; - print $fd "@kchroot @zypper refresh &\n"; - print $fd "SPID=\$!;wait \$SPID\n"; - print $fd "test \$? = 0 && "; if (@newprods) { print $fd "@kchroot @zypper install "; print $fd "@installOpts -t product @newprods &\n"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIOverlay.pm new/kiwi/modules/KIWIOverlay.pm --- old/kiwi/modules/KIWIOverlay.pm 2010-11-19 15:29:38.000000000 +0100 +++ new/kiwi/modules/KIWIOverlay.pm 2011-02-11 14:21:47.000000000 +0100 @@ -143,6 +143,7 @@ my $cowdev; my $result; my $status; + my %snapshot; #========================================== # Check result of filesystem detection #------------------------------------------ @@ -152,11 +153,11 @@ return undef; } #========================================== - # Check for CLIC extension + # Check for ext2 extension #------------------------------------------ - if ($type ne "clicfs") { + if ($type ne "ext2") { $kiwi -> failed (); - $kiwi -> error ("Couldn't detect clicfs on: $baseRO"); + $kiwi -> error ("Couldn't detect ext2 on: $baseRO"); return undef; } #========================================== @@ -175,89 +176,42 @@ #========================================== # Check for cow file before mount #------------------------------------------ - if (-e $cowdev) { + if (-f $cowdev) { $haveCow=1; } #========================================== - # Fuse mount the clicfs base file + # Create snapshot map #------------------------------------------ - $kiwi -> info("Creating overlay path\n"); - $kiwi -> info("--> Base: $baseRO(ro)\n"); - $kiwi -> info("--> COW: $cowdev(rw)\n"); - $status = qxx ( - "clicfs -m 5000 -c $cowdev $baseRO $tmpdir 2>&1" - ); - $result = $? >> 8; - if ($result != 0) { + %snapshot = $this -> createSnapshotMap ($baseRO,$cowdev); + if (! %snapshot) { $kiwi -> failed (); - $kiwi -> error ("Failed to mount $baseRO to: $tmpdir: $status"); + $kiwi -> error ("Failed to snapshot $baseRO"); return undef; } - push @mount,"umount $tmpdir"; + push @mount,@{$snapshot{stack}}; $this->{mount} = \@mount; #========================================== - # Add filesystem options... - #------------------------------------------ - qxx ("tune2fs -m 0 $tmpdir/fsdata.ext3 &>/dev/null"); - qxx ("tune2fs -i 0 $tmpdir/fsdata.ext3 &>/dev/null"); - #========================================== - # Resize or check... + # Mount cache as snapshot #------------------------------------------ - if (! $haveCow) { - $status = qxx ("resize2fs $tmpdir/fsdata.ext3 2>&1"); - $result = $? >> 8; - if ($result != 0) { - $kiwi -> failed (); - $kiwi -> error ("Failed to resize clicfs container: $status"); - return undef; - } - } else { - $status = qxx ("e2fsck -p $tmpdir/fsdata.ext3 2>&1"); - $result = $? >> 8; - if ($result != 0) { - $kiwi -> failed (); - $kiwi -> error ("Failed to check clicfs container: $status"); - return undef; - } - } - #========================================== - # loop mount filesystem from fuse mount - #------------------------------------------ - my $opts = "loop,noatime,nodiratime,errors=remount-ro,barrier=0"; - $baseRO = $tmpdir."/fsdata.ext3"; - $status = qxx ("mount -o $opts $baseRO $tmpdir 2>&1"); + $kiwi -> info("Creating overlay path\n"); + $kiwi -> info("--> Base: $baseRO(ro)\n"); + $kiwi -> info("--> COW: $cowdev(rw)\n"); + $status = qxx ("mount $snapshot{mount} $tmpdir 2>&1"); $result = $? >> 8; if ($result != 0) { + $kiwi -> error ("Failed to mount $baseRO to: $tmpdir: $status"); $kiwi -> failed (); - $kiwi -> error ("Failed to loop mount $baseRO to: $tmpdir: $status"); return undef; } - $kiwi -> info ("--> Mounted on: $tmpdir\n"); push @mount,"umount $tmpdir"; $this->{mount} = \@mount; #========================================== - # create meta data for further operations + # setup cache meta data #------------------------------------------ if (! $haveCow) { qxx ("echo $this->{baseRO} > $rootRW/kiwi-root.cache"); - qxx ("mkdir -p $rootRW/image"); if ($main::Prepare) { - my $basePath = File::Spec->rel2abs ($main::Prepare); - $status = qxx ( - "cp $basePath/config.xml $rootRW/image 2>&1" - ); - $result = $? >> 8; - if ($result != 0) { - $status = qxx ( - "cp $basePath/*.kiwi $rootRW/image 2>&1" - ); - $result = $? >> 8; - } - if ($result != 0) { - $kiwi -> failed (); - $kiwi -> error ("Failed to copy XML file: $status"); - return undef; - } + $main::OverlayRootTree = "$rootRW/image"; } } return $tmpdir; @@ -318,6 +272,83 @@ } #========================================== +# createSnapshotMap +#------------------------------------------ +sub createSnapshotMap { + my $this = shift; + my $readOnlyRootImage = shift; + my $cowfile = shift; + my $snapshotChunk=8; + my $snapshotCount="5G"; + my $imageLoop; + my $snapLoop; + my @releaseList = (); + my $snapshotMap; + my $orig_s; + my $data; + my $code; + my %result; + my $table; + #====================================== + # create root filesystem loop device + #-------------------------------------- + $imageLoop = qxx ("losetup -s -f $readOnlyRootImage 2>&1"); + $code = $? >> 8; + if ($code != 0) { + $result{stack} = \@releaseList; + return undef; + } + chomp $imageLoop; + push (@releaseList,"losetup -d $imageLoop"); + #====================================== + # create snapshot loop device + #-------------------------------------- + if (! -f $cowfile) { + $data = qxx ( + "dd if=/dev/zero of=$cowfile bs=1 seek=$snapshotCount count=1 2>&1" + ); + $code = $? >> 8; + if ($code != 0) { + $result{stack} = \@releaseList; + return undef; + } + } + $snapLoop = qxx ("losetup -s -f $cowfile"); + $code = $? >> 8; + if ($code != 0) { + $result{stack} = \@releaseList; + return undef; + } + chomp $snapLoop; + push (@releaseList,"losetup -d $snapLoop"); + #====================================== + # setup device mapper tables + #-------------------------------------- + $orig_s =qxx ("blockdev --getsize $imageLoop"); chomp $orig_s; + qxx ("echo '0 $orig_s linear $imageLoop 0' | dmsetup create ms_data"); + push (@releaseList,"dmsetup remove ms_data"); + qxx ("dmsetup create ms_origin --notable"); + push (@releaseList,"dmsetup remove ms_origin"); + qxx ("dmsetup table ms_data | dmsetup load ms_origin"); + qxx ("dmsetup resume ms_origin"); + qxx ("dmsetup create ms_snap --notable"); + push (@releaseList,"dmsetup remove ms_snap"); + $table = "0 $orig_s snapshot $imageLoop $snapLoop p $snapshotChunk"; + qxx ("echo '$table' | dmsetup load ms_snap"); + $table = "0 $orig_s snapshot-origin $imageLoop"; + qxx ("echo '$table' | dmsetup load ms_data"); + qxx ("dmsetup resume ms_snap"); + qxx ("dmsetup resume ms_data"); + #====================================== + # return result + #-------------------------------------- + $snapshotMap = "/dev/mapper/ms_snap"; + $result{mount} = $snapshotMap; + $result{stack} = \@releaseList; + return %result; +} + +#========================================== # Destructor #------------------------------------------ sub DESTROY { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIRoot.pm new/kiwi/modules/KIWIRoot.pm --- old/kiwi/modules/KIWIRoot.pm 2011-01-31 12:38:16.000000000 +0100 +++ new/kiwi/modules/KIWIRoot.pm 2011-02-11 14:21:47.000000000 +0100 @@ -309,6 +309,29 @@ my $root = $this->{root}; my $manager = $this->{manager}; my $baseSystem = $this->{baseSystem}; + #================================== + # Create /etc/ImageVersion file + #---------------------------------- + my $imageVersionFile = "$root/etc/ImageVersion"; + my $imageVersion = $xml -> getImageVersion(); + my $imageName = $xml -> getImageName(); + qxx ("mkdir -p $root/etc"); + if ( ! open (FD,">$imageVersionFile")) { + $kiwi -> error ("Failed to create version file: $!"); + $kiwi -> failed (); + return undef; + } + print FD $imageName."-".$imageVersion; close FD; + #================================== + # Copy helper scripts to new root + #---------------------------------- + qxx ("cp $main::KConfig $root/.kconfig 2>&1"); + #================================== + # Return early if cache is used + #---------------------------------- + if (defined $main::ImageCache) { + return $this; + } #========================================== # Get base Package list #------------------------------------------ @@ -397,7 +420,6 @@ # need resolv.conf/hosts for internal chroot name resolution qxx (" cp /etc/resolv.conf $root/etc 2>&1 "); qxx (" cp /etc/hosts $root/etc 2>&1 "); - qxx (" cp $main::KConfig $root/.kconfig 2>&1 "); $kiwi -> done(); #========================================== # Create package keys @@ -461,19 +483,6 @@ print FD "devpts /dev/pts devpts mode=0620,gid=5 0 0\n"; print FD "proc /proc proc defaults 0 0\n"; close FD; - - #================================== - # Create /etc/ImageVersion file - #---------------------------------- - my $imageVersionFile = "$root/etc/ImageVersion"; - my $imageVersion = $xml -> getImageVersion(); - my $imageName = $xml -> getImageName(); - if ( ! open (FD,">$imageVersionFile")) { - $kiwi -> error ("Failed to create version file: $!"); - $kiwi -> failed (); - return undef; - } - print FD $imageName."-".$imageVersion; close FD; #================================== # Return object reference #---------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIXML.pm new/kiwi/modules/KIWIXML.pm --- old/kiwi/modules/KIWIXML.pm 2011-02-07 14:45:57.000000000 +0100 +++ new/kiwi/modules/KIWIXML.pm 2011-02-11 14:21:47.000000000 +0100 @@ -197,7 +197,9 @@ #========================================== # Add default split section if not defined #------------------------------------------ - $this -> __addDefaultSplitNode(); + if (! $this -> __addDefaultSplitNode()) { + return undef; + } #========================================== # Set global packagemanager value #------------------------------------------ @@ -268,6 +270,11 @@ } print $FD $xmlu; close $FD; + if ($main::OverlayRootTree) { + qxx ("mkdir -p $main::OverlayRootTree"); + qxx ("cp $file $main::OverlayRootTree"); + undef $main::OverlayRootTree; + } return $this; } @@ -2821,7 +2828,7 @@ next; } if ($type ne "metapackages") { - if (($package =~ /@/) && ($manager eq "zypper")) { + if (($package =~ /@/) && $manager && ($manager eq "zypper")) { $package =~ s/@/\./; } } @@ -4011,7 +4018,10 @@ #------------------------------------------ foreach my $element (@tnodes) { my $image = $element -> getAttribute("image"); - if (($image eq "split") || ($image eq "iso")) { + my $flags = $element -> getAttribute("flags"); + if (($image eq "split") || + (($image eq "iso") && ($flags eq "compressed")) + ) { my @splitsections = $element -> getElementsByTagName ("split"); if (! @splitsections) { push (@snodes,$element); @@ -4043,9 +4053,11 @@ #========================================== # append default section to selected nodes #------------------------------------------ + my $defaultSplit = $splitTree + -> getElementsByTagName ("split") -> get_node(1); foreach my $element (@snodes) { - $element -> appendChild ( - $splitTree -> getElementsByTagName ("split") + $element -> addChild ( + $defaultSplit -> cloneNode (1) ); } $this -> updateXML(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/system/boot/ix86/netboot/suse-linuxrc new/kiwi/system/boot/ix86/netboot/suse-linuxrc --- old/kiwi/system/boot/ix86/netboot/suse-linuxrc 2011-01-25 11:11:07.000000000 +0100 +++ new/kiwi/system/boot/ix86/netboot/suse-linuxrc 2011-02-11 14:21:47.000000000 +0100 @@ -46,6 +46,7 @@ export SYSTEM_MD5STATUS export systemIntegrity="unknown" export haveDisk=0 +export haveRamDisk=0 #====================================== # Exports (clicfs usage) @@ -267,20 +268,24 @@ #====================================== # 11) Check for diskful station #-------------------------------------- -if \ - [ $LOCAL_BOOT = "no" ] && \ - ([ ! -z "$PART" ] || [ ! -z "$IMAGE" ]) && \ - [ -z "$NFSROOT" ] && \ - [ -z "$NBDROOT" ] && \ - [ -z "$AOEROOT" ] -then - if ! waitForStorageDevice $DISK;then - systemException \ - "Disk $DISK doesn't appear... fatal !" \ - "reboot" +if [ $LOCAL_BOOT = "no" ];then + checkDevice=$DISK + if [ -z "$checkDevice" ];then + checkDevice=$(echo $IMAGE | cut -f1 -d\;) + fi + if [ ! -z "$checkDevice" ];then + if ! waitForStorageDevice $checkDevice;then + systemException \ + "Block device $checkDevice doesn't appear... fatal !" \ + "reboot" + fi + if echo $checkDevice | grep -q dev\/ram;then + export haveRamDisk=1 + else + export haveDisk=1 + export imageDiskDevice=$checkDevice + fi fi - export haveDisk=1 - export imageDiskDevice=$DISK fi #====================================== @@ -437,7 +442,10 @@ # 14) Setup root device environment #-------------------------------------- runHook predownload -if [ $LOCAL_BOOT = "no" ] && [ $haveDisk = "1" ];then +if \ + [ $LOCAL_BOOT = "no" ] && \ + ([ $haveDisk = "1" ] || [ $haveRamDisk = "1" ]) +then #====================================== # 14.1) Download network client image #-------------------------------------- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org