Hello community, here is the log from the commit of package kiwi for openSUSE:Factory checked in at Tue Aug 3 01:49:06 CEST 2010. -------- --- kiwi/kiwi.changes 2010-07-26 17:47:53.000000000 +0200 +++ /mounts/work_src_done/STABLE/kiwi/kiwi.changes 2010-08-02 14:28:53.000000000 +0200 @@ -1,0 +2,31 @@ +Mon Aug 2 12:19:22 CEST 2010 - ms@suse.de + +- v4.53 +- when creating a new cpio image make sure an eventually + existing old version of .splash.gz will be removed +- again fixed the check for specific parted versions. I now + changed it to directly check for the available options in + parted instead of the parted version number +- put patterns into image package section instead of bootstrap + I discovered strange errors with older zypper versions when + building newer images + +------------------------------------------------------------------- +Tue Jul 27 07:23:38 CEST 2010 - ms@suse.de + +- v4.52 +- added log information about used boot-theme +- added support for image caching. With this feature you can + provide a cache directory along with the option --cache. + kiwi in prepare step looks into the directory if it finds + a cache serving as the base-root for the system image. + If it can't find one it creates caches based on the + patterns used in the image description which speeds + up subsequent prepare calls for this and other images +- fixed PARTED_VER setup and tests. If the parted version + is below or equal 1.8.8 we switch to fdisk. This applies for + sle10 where parted doesn't have some options which we require +- don't create splash initrd if it already exists +- fixed use of uninitialized value for $overlay + +------------------------------------------------------------------- calling whatdependson for head-i586 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kiwi.spec ++++++ --- /var/tmp/diff_new_pack.urP5ct/_old 2010-08-03 01:48:29.000000000 +0200 +++ /var/tmp/diff_new_pack.urP5ct/_new 2010-08-03 01:48:29.000000000 +0200 @@ -1,5 +1,5 @@ # -# spec file for package kiwi (Version 4.51) +# spec file for package kiwi (Version 4.53) # # Copyright (c) 2010 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -60,7 +60,7 @@ Requires: clicfs %endif Summary: OpenSuSE - KIWI Image System -Version: 4.51 +Version: 4.53 Release: 1 Group: System/Management License: GPLv2 ++++++ 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-07-26 17:16:35.000000000 +0200 +++ new/kiwi/.revision 2010-08-02 14:25:22.000000000 +0200 @@ -1 +1 @@ -a9f5bc3a7fe93a7911d7181ff2a7fd401a65eec6 +b09d3c157215366cbc3b3e567969cab7f1244dcc diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/kiwi.pl new/kiwi/kiwi.pl --- old/kiwi/kiwi.pl 2010-07-26 17:16:35.000000000 +0200 +++ new/kiwi/kiwi.pl 2010-08-02 14:25:22.000000000 +0200 @@ -46,7 +46,7 @@ #============================================ # Globals (Version) #-------------------------------------------- -our $Version = "4.51"; +our $Version = "4.53"; our $Publisher = "SUSE LINUX Products GmbH"; our $Preparer = "KIWI - http://kiwi.berlios.de"; our $openSUSE = "http://download.opensuse.org"; @@ -168,6 +168,8 @@ our @AddRepositoryAlias; # alias name for the repository our @AddRepositoryPriority; # priority for the repository our @AddPackage; # add packages to the image package list +our @AddPattern; # add patterns to the image package list +our $ImageCache; # build an image cache for later re-use our @RemovePackage; # remove package by adding them to the remove list our $IgnoreRepos; # ignore repositories specified so far our $SetRepository; # set first repository for building physical extend @@ -368,6 +370,9 @@ # Prepare image and build chroot system #---------------------------------------- if (defined $Prepare) { + #========================================== + # Process system image description + #------------------------------------------ $kiwi -> info ("Reading image description [Prepare]...\n"); my $xml = new KIWIXML ( $kiwi,$Prepare,\%ForeignRepo,undef,\@Profiles ); if (! defined $xml) { @@ -377,10 +382,220 @@ $kiwi -> warning ("Description provides no MD5 hash, check"); $kiwi -> skipped (); } + my %type = %{$xml->getImageTypeAndAttributes()}; + #========================================== + # Setup image cache if requested (1) + #------------------------------------------ + my $CacheDistro; # cache base name + my @CachePatterns; # image patterns building the cache + my @CachePackages; # image packages building the cache + my $CacheScan; # image scan, for cache package check + my %Cache; # valid caches + if ($ImageCache) { + $kiwi -> info ("Setting up image pattern cache\n"); + #========================================== + # Check if we have boot type for the cname + #------------------------------------------ + if ($type{boot} =~ /.*\/(.*)/) { + $CacheDistro = $1; + } else { + $kiwi -> warning ("Can't setup cache without a boot type"); + $kiwi -> skipped (); + undef $ImageCache; + } + #========================================== + # Check for cachable patterns + #------------------------------------------ + my @sections = ("bootstrap","image"); + foreach my $section (@sections) { + my @list = $xml -> getList ($section); + foreach my $pac (@list) { + if ($pac =~ /^pattern:(.*)/) { + push @CachePatterns,$1; + } elsif ($pac =~ /^product:(.*)/) { + # no cache for products at the moment + } else { + push @CachePackages,$pac; + } + } + } + if (! @CachePatterns) { + $kiwi -> warning ("No cachable patterns used in this image"); + $kiwi -> skipped (); + undef $ImageCache; + } + #========================================== + # Create image package list + #------------------------------------------ + $listXMLInfo = $Prepare; + @listXMLInfoSelection = ("packages"); + $CacheScan = listXMLInfo ("internal"); + if (! $CacheScan) { + undef $ImageCache; + } + undef $listXMLInfo; + undef @listXMLInfoSelection; + } + #========================================== + # Setup image cache if requested (2) + #------------------------------------------ + if ($ImageCache) { + my $haveCache = 0; + my %plist = (); + #========================================== + # Search for a suitable cache + #------------------------------------------ + my @packages = $CacheScan -> getElementsByTagName ("package"); + foreach my $node (@packages) { + my $name = $node -> getAttribute ("name"); + my $arch = $node -> getAttribute ("arch"); + my $pver = $node -> getAttribute ("version"); + $plist{"$name-$pver.$arch"} = $name; + } + my $pcnt = keys %plist; + my @file = (); + #========================================== + # setup cache file names... + #------------------------------------------ + if (@CachePackages) { + my $cstr = $xml -> getImageName(); + my $cdir = $ImageCache."/".$CacheDistro."-".$cstr; + push @file,$cdir; + } + foreach my $pattern (@CachePatterns) { + my $cdir = $ImageCache."/".$CacheDistro."-".$pattern; + push @file,$cdir; + } + #========================================== + # walk through cache files + #------------------------------------------ + foreach my $cdir (@file) { + #========================================== + # check cache files + #------------------------------------------ + my $meta = $cdir.".cache"; + my $CACHE_FD; + if ((! -d $cdir) || (! open ($CACHE_FD,$meta))) { + next; + } + #========================================== + # read cache file + #------------------------------------------ + my @cpac = <$CACHE_FD>; chomp @cpac; + my $ccnt = @cpac; close $CACHE_FD; + $kiwi -> loginfo ( + "Cache: $cdir $ccnt packages, Image: $pcnt packages\n" + ); + #========================================== + # check validity of cache + #------------------------------------------ + my $invalid = 0; + if ($ccnt > $pcnt) { + # cache is bigger than image solved list + $invalid = 1; + } else { + foreach my $p (@cpac) { + if (! defined $plist{$p}) { + # cache package not part of image solved list + $kiwi -> loginfo ( + "Cache: $cdir $p not in image list\n" + ); + $invalid = 1; last; + } + } + } + #========================================== + # store valid cache + #------------------------------------------ + if (! $invalid) { + $Cache{$cdir} = int (100 * ($ccnt / $pcnt)); + $haveCache = 1; + } + } + #========================================== + # Use/select cache if possible + #------------------------------------------ + if ($haveCache) { + my $max = 0; + #========================================== + # Find best match + #------------------------------------------ + foreach my $cdir (keys %Cache) { + if ($Cache{$cdir} > $max) { + $max = $Cache{$cdir}; + } + } + #========================================== + # Setup overlay for best match + #------------------------------------------ + foreach my $cdir (keys %Cache) { + if ($Cache{$cdir} == $max) { + $kiwi -> info ("Using cache overlay [ $max% ]: $cdir"); + $BaseRoot = $cdir; + $BaseRootMode = "copy"; + $kiwi -> done(); + last; + } + } + } + #========================================== + # Build cache if no cache was found + #------------------------------------------ + if (! $haveCache) { + qxx ("mkdir -p $ImageCache 2>&1"); + my $backupPrepare = $main::Prepare; + my $backupRootTree = $main::RootTree; + my $backupForceNewRoot = $main::ForceNewRoot; + my @backupPatterns = @main::AddPattern; + my @backupPackages = @main::AddPackage; + my $imageCacheDir = $ImageCache; + undef $ImageCache; + if (! defined $LogFile) { + $kiwi -> setRootLog ( + $main::RootTree."."."$$".".screenrc.log" + ); + } + if (@CachePackages) { + push @CachePatterns,"package-cache" + } + foreach my $pattern (@CachePatterns) { + if ($pattern eq "package-cache") { + $pattern = $xml -> getImageName(); + push @CachePackages,$xml->getPackageManager(); + undef @main::AddPattern; + @main::AddPackage = @CachePackages; + } else { + @main::AddPackage = $xml->getPackageManager(); + @main::AddPattern = $pattern; + } + $kiwi -> info ( + "--> Building cache file for pattern: $pattern\n" + ); + $main::Prepare = $BasePath."/modules"; + $main::RootTree = $imageCacheDir."/"; + $main::RootTree .= $CacheDistro."-".$pattern; + $main::Survive = "yes"; + $main::ForceNewRoot = 1; + if (! defined main::main()) { + $main::Survive = "default"; + my $code = kiwiExit (1); return $code; + } + my $meta = $main::RootTree.".cache"; + my $root = $main::RootTree; + my $ignore = "'gpg-pubkey|bundle-lang'"; + qxx ("rpm --root $root -qa | grep -vE $ignore > $meta"); + } + $main::Prepare = $backupPrepare; + $main::ForceNewRoot = $backupForceNewRoot; + @main::AddPattern = @backupPatterns; + @main::AddPackage = @backupPackages; + $main::RootTree = $backupRootTree; + $main::Survive = "default"; + } + } #========================================== # Check for bootprofile in xml descr. #------------------------------------------ - my %type = %{$xml->getImageTypeAndAttributes()}; if (! @Profiles) { if ($type{"type"} eq "cpio") { if ($type{bootprofile}) { @@ -426,6 +641,13 @@ if (! $xml -> checkProfiles (\@Profiles)) { my $code = kiwiExit (1); return $code; } + my $theme = $xml -> getBootTheme(); + if ($theme) { + $kiwi -> info ("Using boot theme: $theme"); + } else { + $kiwi -> warning ("No boot theme set, default is openSUSE"); + } + $kiwi -> done (); } #========================================== # Check for default root in XML @@ -481,6 +703,12 @@ $xml -> addImagePackages (@AddPackage); } #========================================== + # Check for add-pattern option + #------------------------------------------ + if (defined @AddPattern) { + $xml -> addImagePatterns (@AddPattern); + } + #========================================== # Check for del-package option #------------------------------------------ if (defined @RemovePackage) { @@ -652,7 +880,7 @@ $kiwi -> failed (); $kiwi -> info ("No destination directory specified"); $kiwi -> failed (); - if (defined $BaseRoot) { + if ((defined $BaseRoot) && ($overlay)) { $overlay -> resetOverlay(); } my $code = kiwiExit (1); return $code; @@ -1060,6 +1288,14 @@ ); } #========================================== + # Check for add-pattern option + #------------------------------------------ + if (defined @AddPattern) { + foreach my $pattern (@AddPattern) { + push (@AddPackage,"pattern:$pattern"); + } + } + #========================================== # Initialize root system, use existing root #------------------------------------------ $root = new KIWIRoot ( @@ -1332,6 +1568,8 @@ "add-repoalias=s" => \@AddRepositoryAlias, "add-repopriority=i" => \@AddRepositoryPriority, "add-package=s" => \@AddPackage, + "add-pattern=s" => \@AddPattern, + "cache=s" => \$ImageCache, "del-package=s" => \@RemovePackage, "set-repo=s" => \$SetRepository, "set-repotype=s" => \$SetRepositoryType, @@ -1569,12 +1807,12 @@ print " kiwi -b | --build <image-path> -d <destination>\n"; print "Image Preparation/Creation in two steps:\n"; print " kiwi -p | --prepare <image-path>\n"; - print " [ --root <image-root> ]\n"; + print " [ --root <image-root> --cache <dir> ]\n"; print " kiwi -c | --create <image-root> -d <destination>\n"; print " [ --type <image-type> ]\n"; print "Image Upgrade:\n"; print " kiwi -u | --upgrade <image-root>\n"; - print " [ --add-package <name> ]\n"; + print " [ --add-package <name> --add-pattern <name> ]\n"; print "System to Image migration:\n"; print " kiwi -m | --migrate <name>\n"; print " [ --exclude <directory> --exclude <...> ]\n"; @@ -1676,6 +1914,9 @@ print " [ --add-package <package> ]\n"; print " Adds the given package name to the list of image packages.\n"; print "\n"; + print " [ --add-pattern <name> ]\n"; + print " Adds the given pattern name to the list of image patters.\n"; + print "\n"; print " [ --del-package <package> ]\n"; print " Removes the given package by adding it the list of packages\n"; print " to become removed.\n"; @@ -1780,6 +2021,7 @@ # information listed here is for information only # before a prepare and/or create command is called # --- + my $internal = shift; my %select; my $gotselection = 0; my $meta; @@ -1852,7 +2094,7 @@ #========================================== # Setup loop sources #------------------------------------------ - my @mountlist = (); + my @mountInfolist = (); if ($xml->{urlhash}) { foreach my $source (keys %{$xml->{urlhash}}) { #========================================== @@ -1870,7 +2112,7 @@ rmdir $dir; exit 1; } - push (@mountlist,$dir); + push (@mountInfolist,$dir); } } } @@ -1878,11 +2120,12 @@ my @list = shift; return sub { foreach my $dir (@list) { + next if ! defined $dir; qxx ("umount $dir ; rmdir $dir 2>&1"); } } } - *cleanMount = newCleanMount (@mountlist); + *cleanInfoMount = newCleanMount (@mountInfolist); #========================================== # Initialize XML imagescan element #------------------------------------------ @@ -1901,7 +2144,7 @@ $xml->getInstallSize(); if (! $meta) { $kiwi -> failed(); - cleanMount(); + cleanInfoMount(); exit 1; } } @@ -1928,7 +2171,7 @@ $xml->getInstallSize(); if (! $meta) { $kiwi -> failed(); - cleanMount(); + cleanInfoMount(); exit 1; } } @@ -1982,7 +2225,7 @@ $xml->getInstallSize(); if (! $meta) { $kiwi -> failed(); - cleanMount(); + cleanInfoMount(); exit 1; } } @@ -2020,7 +2263,7 @@ $xml->getInstallSize(); if (! $meta) { $kiwi -> failed(); - cleanMount(); + cleanInfoMount(); exit 1; } } @@ -2065,14 +2308,18 @@ #========================================== # Cleanup mount list #------------------------------------------ - cleanMount(); + cleanInfoMount(); #========================================== # print scan results #------------------------------------------ - open (my $F, "|xsltproc $main::Pretty -"); - print $F $scan->toString(); - close $F; - exit 0; + if ($internal) { + return $scan; + } else { + open (my $F, "|xsltproc $main::Pretty -"); + print $F $scan->toString(); + close $F; + exit 0; + } } #========================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWIBoot.pm new/kiwi/modules/KIWIBoot.pm --- old/kiwi/modules/KIWIBoot.pm 2010-07-23 10:59:54.000000000 +0200 +++ new/kiwi/modules/KIWIBoot.pm 2010-07-30 13:01:19.000000000 +0200 @@ -3341,6 +3341,24 @@ my $newird; my $result; #========================================== + # check if compressed and setup splash.gz + #------------------------------------------ + if ($initrd =~ /\.gz$/) { + $zipped = 1; + } + if ($zipped) { + $newird = $initrd; $newird =~ s/\.gz/\.splash.gz/; + } else { + $newird = $initrd.".splash.gz"; + } + #========================================== + # check if splash initrd is already there + #------------------------------------------ + if ((! -l $newird) && (-f $newird)) { + # splash initrd already created... + return $newird; + } + #========================================== # create temp dir for operations #------------------------------------------ $kiwi -> info ("Setting up splash screen..."); @@ -3354,17 +3372,7 @@ } chomp $spldir; my $irddir = "$spldir/initrd"; - #========================================== - # check if compressed and setup splash.gz - #------------------------------------------ - if ($initrd =~ /\.gz$/) { - $zipped = 1; - } - if ($zipped) { - $newird = $initrd; $newird =~ s/\.gz/\.splash.gz/; - } else { - $newird = $initrd.".splash.gz"; - } + #========================================== # unpack initrd files #------------------------------------------ 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 1970-01-01 01:00:00.000000000 +0100 +++ new/kiwi/modules/KIWICache.kiwi 2010-07-30 13:01:19.000000000 +0200 @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> + +<image schemaversion="4.7" name="cache-builder"> + <description type="system"> + <author>Marcus Schäfer</author> + <contact>ms@novell.com</contact> + <specification> + cache template for building pattern based caches + </specification> + </description> + <preferences> + <type image="ext2"/> + <version>1.1.1</version> + <packagemanager>zypper</packagemanager> + <rpm-excludedocs>true</rpm-excludedocs> + </preferences> + <repository type="yast2"> + <source path="some-repo-path"/> + </repository> + <packages type="image"> + <!-- patterns for building the cache are added on the fly here --> + </packages> + <packages type="bootstrap"> + <package name="filesystem"/> + <package name="glibc-locale"/> + </packages> +</image> 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 2010-07-23 10:59:54.000000000 +0200 +++ new/kiwi/modules/KIWIImage.pm 2010-08-02 14:25:22.000000000 +0200 @@ -776,6 +776,7 @@ my $pwd = qxx ("pwd"); chomp $pwd; my @cpio = ("--create", "--format=newc", "--quiet"); my $dest = $this->{imageDest}."/".$name.".gz"; + my $dspl = $this->{imageDest}."/".$name.".splash.gz"; my $data; if (! $compress) { $dest = $this->{imageDest}."/".$name; @@ -783,6 +784,12 @@ if ($dest !~ /^\//) { $dest = $pwd."/".$dest; } + if ($dspl !~ /^\//) { + $dspl = $pwd."/".$dspl; + } + if (-e $dspl) { + qxx ("rm -f $dspl 2>&1"); + } if ($compress) { $data = qxx ( "cd $imageTree && find . | cpio @cpio | $main::Gzip -f > $dest" @@ -1017,6 +1024,10 @@ $lookup = $main::PrebuiltBootImage."/"; } my $pinitrd = $lookup.$main::ImageName.".gz"; + my $psplash; + if (-f $lookup.$main::ImageName.".splash.gz") { + $psplash = $lookup.$main::ImageName.".splash.gz"; + } my $plinux = $lookup.$main::ImageName.".kernel"; if (! -f $pinitrd) { $pinitrd = $lookup.$main::ImageName; @@ -1035,6 +1046,9 @@ $kiwi -> done(); $pblt = 1; } else { + if ($psplash) { + qxx ("cp -a $psplash $main::Destination 2>&1"); + } my $data = qxx ("cp -a $pinitrd $main::Destination 2>&1"); my $code = $? >> 8; if ($code != 0) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWILinuxRC.sh new/kiwi/modules/KIWILinuxRC.sh --- old/kiwi/modules/KIWILinuxRC.sh 2010-07-26 17:16:35.000000000 +0200 +++ new/kiwi/modules/KIWILinuxRC.sh 2010-08-02 14:25:22.000000000 +0200 @@ -43,12 +43,20 @@ test -z "$LANG" && export LANG=en_US.utf8 test -z "$UTIMER" && export UTIMER=0 test -z "$VGROUP" && export VGROUP=kiwiVG +test -z "$PARTED_HAVE_ALIGN" && export PARTED_HAVE_ALIGN=0 +test -z "$PARTED_HAVE_MACHINE"&& export PARTED_HAVE_MACHINE=0 if [ -x /sbin/blogd ];then test -z "$CONSOLE" && export CONSOLE=/dev/console test -z "$REDIRECT" && export REDIRECT=/dev/tty1 fi -if [ -z "$PARTED_VERSION" ];then - export PARTED_VER=$(parted -v | head -n 1 | cut -f4 -d" " | cut -f1-2 -d.) +if parted -h | grep -q '\-\-align';then + export PARTED_HAVE_ALIGN=1 +fi +if parted -h | grep -q '\-\-machine';then + export PARTED_HAVE_MACHINE=1 +fi +if [ ! $PARTED_HAVE_MACHINE ];then + export PARTITIONER=sfdisk fi #====================================== @@ -5290,7 +5298,7 @@ local device=$1 local cmds=$2 local opts - if [ $PARTED_VER = "2.2" ];then + if [ $PARTED_HAVE_ALIGN ];then opts="-a cyl" fi if ! parted $opts -m $device unit cyl $cmds;then 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 2010-05-21 15:52:45.000000000 +0200 +++ new/kiwi/modules/KIWIRoot.pm 2010-07-30 13:01:20.000000000 +0200 @@ -1057,6 +1057,11 @@ qxx ("mount --bind $cache $root/$cache 2>&1"); push (@mountList,"$root/$cache"); } + if (! -f "$root/proc/mounts") { + qxx ("mkdir -p $root/proc"); + qxx ("mount -t proc proc $root/proc"); + push (@mountList,"$root/proc"); + } $this->{mountList} = \@mountList; return @mountList; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rnc new/kiwi/modules/KIWISchema.rnc --- old/kiwi/modules/KIWISchema.rnc 2010-07-23 10:59:54.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rnc 2010-07-30 13:01:20.000000000 +0200 @@ -1546,12 +1546,12 @@ ## The shell for this user attribute shell { text } k.user.attlist = - k.user.name.attribute & + k.user.home.attribute & k.user.id.attribute? & - k.user.realname.attribute? & + k.user.name.attribute & k.user.pwd.attribute & k.user.pwdformat? & - k.user.home.attribute & + k.user.realname.attribute? & k.user.shell.attribute? k.user = ## A User with Name, Password, Path to Its Home And Shell diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kiwi/modules/KIWISchema.rng new/kiwi/modules/KIWISchema.rng --- old/kiwi/modules/KIWISchema.rng 2010-07-23 10:59:54.000000000 +0200 +++ new/kiwi/modules/KIWISchema.rng 2010-07-30 13:01:20.000000000 +0200 @@ -2233,18 +2233,18 @@ </define> <define name="k.user.attlist"> <interleave> - <ref name="k.user.name.attribute"/> + <ref name="k.user.home.attribute"/> <optional> <ref name="k.user.id.attribute"/> </optional> - <optional> - <ref name="k.user.realname.attribute"/> - </optional> + <ref name="k.user.name.attribute"/> <ref name="k.user.pwd.attribute"/> <optional> <ref name="k.user.pwdformat"/> </optional> - <ref name="k.user.home.attribute"/> + <optional> + <ref name="k.user.realname.attribute"/> + </optional> <optional> <ref name="k.user.shell.attribute"/> </optional> 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 2010-07-14 17:49:32.000000000 +0200 +++ new/kiwi/modules/KIWIXML.pm 2010-08-02 14:25:22.000000000 +0200 @@ -2388,6 +2388,42 @@ } #========================================== +# addPatterns +#------------------------------------------ +sub addPatterns { + # ... + # Add the given pattern list to the specified packages + # type section of the xml description parse tree. + # ---- + my $this = shift; + my $ptype = shift; + my $nodes = shift; + my @patts = @_; + if (! defined $nodes) { + $nodes = $this->{packageNodeList}; + } + my $nodeNumber = 1; + for (my $i=1;$i<= $nodes->size();$i++) { + my $node = $nodes -> get_node($i); + my $type = $node -> getAttribute ("type"); + if (! $this -> requestedProfile ($node)) { + next; + } + if ($type eq $ptype) { + $nodeNumber = $i; last; + } + } + foreach my $pack (@patts) { + my $addElement = new XML::LibXML::Element ("opensusePattern"); + $addElement -> setAttribute("name",$pack); + $nodes -> get_node($nodeNumber) + -> appendChild ($addElement); + } + $this -> updateXML(); + return $this; +} + +#========================================== # addArchives #------------------------------------------ sub addArchives { @@ -2437,6 +2473,18 @@ } #========================================== +# addImagePatterns +#------------------------------------------ +sub addImagePatterns { + # ... + # Add the given pattern list to the type=bootstrap packages + # section of the xml description parse tree. + # ---- + my $this = shift; + return $this -> addPatterns ("image",undef,@_); +} + +#========================================== # addRemovePackages #------------------------------------------ sub addRemovePackages { @@ -3811,15 +3859,17 @@ # merge all solvables into one #------------------------------------------ if ($count > 1) { - my $data = qxx ("mergesolv @index > $solv"); + my $data = qxx ("mergesolv @index > $solv.system"); my $code = $? >> 8; if ($code != 0) { $kiwi -> error ("--> Couldn't merge solve files"); $kiwi -> failed (); return undef } + } else { + qxx ("cp $solv $solv.system 2>&1"); } - return $solv; + return $solv.".system"; } #========================================== ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org