Hello community, here is the log from the commit of package autoyast2 for openSUSE:Factory checked in at 2013-02-11 20:44:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autoyast2 (Old) and /work/SRC/openSUSE:Factory/.autoyast2.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autoyast2", Maintainer is "f...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/autoyast2/autoyast2.changes 2012-11-14 16:34:31.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.autoyast2.new/autoyast2.changes 2013-02-11 20:44:19.000000000 +0100 @@ -1,0 +2,23 @@ +Mon Feb 11 16:41:11 CET 2013 - f...@suse.de + +- 2.23.3 +- fix failure to execute autoyast init scripts (bnc#803036) + +------------------------------------------------------------------- +Thu Feb 7 12:21:00 CET 2013 - f...@suse.de + +- 2.23.2 +- fix lag of progress bar in inst_autosetup (bnc#801866) + +------------------------------------------------------------------- +Tue Feb 5 13:04:03 CET 2013 - f...@suse.de + +- fix bug when disk has more than on unpartitioned gap (bnc#794505) + +------------------------------------------------------------------- +Thu Jan 24 11:43:57 CET 2013 - f...@suse.de + +- fix problem reuse of large number of partitions and few extra + partition slots available (e.g. 15 on cciss) (bnc#799725) + +------------------------------------------------------------------- Old: ---- autoyast2-2.23.1.tar.bz2 New: ---- autoyast2-2.23.3.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autoyast2.spec ++++++ --- /var/tmp/diff_new_pack.Grz6xU/_old 2013-02-11 20:44:22.000000000 +0100 +++ /var/tmp/diff_new_pack.Grz6xU/_new 2013-02-11 20:44:22.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package autoyast2 # -# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: autoyast2 -Version: 2.23.1 +Version: 2.23.3 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -81,7 +81,7 @@ installation sources. %package installation -Version: 2.23.1 +Version: 2.23.3 Release: 0 Summary: YaST2 - Auto Installation Modules Group: System/YaST ++++++ autoyast2-2.23.1.tar.bz2 -> autoyast2-2.23.3.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/MAINTAINER new/autoyast2-2.23.3/MAINTAINER --- old/autoyast2-2.23.1/MAINTAINER 2012-07-25 14:53:15.000000000 +0200 +++ new/autoyast2-2.23.3/MAINTAINER 2013-01-22 13:34:22.000000000 +0100 @@ -1 +1 @@ -Uwe Gansert <u...@suse.de> +Thomas Fehr <f...@suse.de> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/Makefile.in new/autoyast2-2.23.3/Makefile.in --- old/autoyast2-2.23.1/Makefile.in 2012-11-12 16:04:36.000000000 +0100 +++ new/autoyast2-2.23.3/Makefile.in 2013-02-11 17:06:41.000000000 +0100 @@ -684,7 +684,7 @@ *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod a+w $(distdir) + chmod -R a-w $(distdir); chmod u+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/VERSION new/autoyast2-2.23.3/VERSION --- old/autoyast2-2.23.1/VERSION 2012-11-12 15:57:15.000000000 +0100 +++ new/autoyast2-2.23.3/VERSION 2013-02-11 17:06:30.000000000 +0100 @@ -1 +1 @@ -2.23.1 +2.23.3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/configure new/autoyast2-2.23.3/configure --- old/autoyast2-2.23.1/configure 2012-11-12 16:04:34.000000000 +0100 +++ new/autoyast2-2.23.3/configure 2013-02-11 17:06:40.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for autoyast2 2.23.1. +# Generated by GNU Autoconf 2.69 for autoyast2 2.23.3. # # Report bugs to <http://bugs.opensuse.org/>. # @@ -579,8 +579,8 @@ # Identity of this package. PACKAGE_NAME='autoyast2' PACKAGE_TARNAME='autoyast2' -PACKAGE_VERSION='2.23.1' -PACKAGE_STRING='autoyast2 2.23.1' +PACKAGE_VERSION='2.23.3' +PACKAGE_STRING='autoyast2 2.23.3' PACKAGE_BUGREPORT='http://bugs.opensuse.org/' PACKAGE_URL='' @@ -1247,7 +1247,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures autoyast2 2.23.1 to adapt to many kinds of systems. +\`configure' configures autoyast2 2.23.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1318,7 +1318,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of autoyast2 2.23.1:";; + short | recursive ) echo "Configuration of autoyast2 2.23.3:";; esac cat <<\_ACEOF @@ -1398,7 +1398,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -autoyast2 configure 2.23.1 +autoyast2 configure 2.23.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1415,7 +1415,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by autoyast2 $as_me 2.23.1, which was +It was created by autoyast2 $as_me 2.23.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2354,7 +2354,7 @@ # Define the identity of the package. PACKAGE='autoyast2' - VERSION='2.23.1' + VERSION='2.23.3' cat >>confdefs.h <<_ACEOF @@ -2477,9 +2477,9 @@ -VERSION="2.23.1" +VERSION="2.23.3" RPMNAME="autoyast2" -MAINTAINER="Uwe Gansert <u...@suse.de>" +MAINTAINER="Thomas Fehr <f...@suse.de>" pkgconfigdir=\${libdir}/pkgconfig pkgconfigdatadir=\${datadir}/pkgconfig @@ -3407,7 +3407,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by autoyast2 $as_me 2.23.1, which was +This file was extended by autoyast2 $as_me 2.23.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3460,7 +3460,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -autoyast2 config.status 2.23.1 +autoyast2 config.status 2.23.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/configure.in new/autoyast2-2.23.3/configure.in --- old/autoyast2-2.23.1/configure.in 2012-11-12 16:04:30.000000000 +0100 +++ new/autoyast2-2.23.3/configure.in 2013-02-11 17:06:37.000000000 +0100 @@ -1,9 +1,9 @@ dnl configure.in for autoyast2 dnl -dnl -- This file is generated by y2autoconf 2.23.0 - DO NOT EDIT! -- +dnl -- This file is generated by y2autoconf 2.23.2 - DO NOT EDIT! -- dnl (edit configure.in.in instead) -AC_INIT(autoyast2, 2.23.1, http://bugs.opensuse.org/, autoyast2) +AC_INIT(autoyast2, 2.23.3, http://bugs.opensuse.org/, autoyast2) dnl Check for presence of file 'RPMNAME' AC_CONFIG_SRCDIR([RPMNAME]) @@ -18,9 +18,9 @@ AM_INIT_AUTOMAKE(tar-ustar -Wno-portability) dnl Important YaST2 variables -VERSION="2.23.1" +VERSION="2.23.3" RPMNAME="autoyast2" -MAINTAINER="Uwe Gansert <u...@suse.de>" +MAINTAINER="Thomas Fehr <f...@suse.de>" dnl pkgconfig honors lib64 pkgconfigdir=\${libdir}/pkgconfig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/scripts/autoyast-initscripts.sh new/autoyast2-2.23.3/scripts/autoyast-initscripts.sh --- old/autoyast2-2.23.1/scripts/autoyast-initscripts.sh 2012-11-13 11:55:22.000000000 +0100 +++ new/autoyast2-2.23.3/scripts/autoyast-initscripts.sh 2013-02-11 16:46:30.000000000 +0100 @@ -11,6 +11,8 @@ SCRIPT_DIR="/var/adm/autoinstall/scripts" INITSCRIPT_DIR="/var/adm/autoinstall/init.d" +systemctl disable autoyast-initscripts.service + if [ ! -d "$INITSCRIPT_DIR" ]; then exit 1 fi @@ -29,5 +31,3 @@ sh -x $script > $LOG_DIR/$BASENAME.log 2>&1 mv $script $SCRIPT_DIR done - -systemctl disable autoyast-initscript.service diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/src/clients/autoinst_scripts2_finish.ycp new/autoyast2-2.23.3/src/clients/autoinst_scripts2_finish.ycp --- old/autoyast2-2.23.1/src/clients/autoinst_scripts2_finish.ycp 2012-08-30 10:42:46.000000000 +0200 +++ new/autoyast2-2.23.3/src/clients/autoinst_scripts2_finish.ycp 2013-02-11 16:46:30.000000000 +0100 @@ -18,7 +18,6 @@ import "AutoinstScripts"; import "AutoInstall"; -import "Service"; any ret = nil; string func = ""; @@ -48,7 +47,11 @@ { AutoinstScripts::Write("chroot-scripts", true); // systemd requires the init script to be activated in 1st stage - Service::Enable("autoyast"); + string cmd = "systemctl enable autoyast-initscripts.service"; + y2milestone("executing:%1", cmd ); + map ret=(map)SCR::Execute( .target.bash_output, cmd ); + y2milestone("calling ret:%1", ret ); + //Service::Enable("autoyast"); AutoInstall::PXELocalBoot(); } else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/src/clients/inst_autosetup.ycp new/autoyast2-2.23.3/src/clients/inst_autosetup.ycp --- old/autoyast2-2.23.1/src/clients/inst_autosetup.ycp 2012-08-30 10:42:46.000000000 +0200 +++ new/autoyast2-2.23.3/src/clients/inst_autosetup.ycp 2013-02-07 12:26:30.000000000 +0100 @@ -77,6 +77,7 @@ [ _("Configuring general settings..."), _("Executing pre-install user scripts..."), + _("Setting up language"), _("Creating partition plans..."), _("Configuring Software selections..."), _("Configuring Bootloader..."), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/autoyast2-2.23.1/src/include/autopart.ycp new/autoyast2-2.23.3/src/include/autopart.ycp --- old/autoyast2-2.23.1/src/include/autopart.ycp 2012-10-23 15:41:13.000000000 +0200 +++ new/autoyast2-2.23.3/src/include/autopart.ycp 2013-02-05 15:11:31.000000000 +0100 @@ -540,9 +540,89 @@ { list region = [ e["start"]:0, e["end"]:0-e["start"]:0+1 ]; map part = $[]; - - if( e["extended"]:false && e["created"]:0 > 0 && size(e["created_primary"]:[]) == 0) + + if( e["extended"]:false && e["created"]:0>0 ) { + while( e["added",0,1]:(disk["max_primary"]:4+1) <= + disk["max_primary"]:4 ) + { + integer pindex = e["added",0,0]:0; + string mount = solution["partitions",pindex,"mount"]:""; + integer fsid = Partitions::fsid_native; + if( mount == "swap" ) + fsid = Partitions::fsid_swap; + part["format"] = solution["partitions",pindex,"format"]:true; + if( solution["partitions",pindex,"filesystem_id"]:0 != 0 ) + { + fsid = solution["partitions",pindex,"filesystem_id"]:0; + if( !haskey( solution["partitions",pindex]:$[], "filesystem" )) + part["format"] = false; + y2milestone( "partition id %1 format %2 part %3", fsid, + part["format"]:false, + solution["partitions",pindex]:$[] ); + } + part["create"] = true; + part["nr"] = e["created"]:0; + part["device"] = Storage::GetDeviceName( dev, part["nr"]:-1 ); + part["region"] = region; + part["region",1] = e["added",0,2]:0; + region[0] = region[0]:0 + part["region",1]:0; + region[1] = region[1]:0 - part["region",1]:0; + part["type"] = `primary; + part["mount"] = mount; + symbol mb = solution["partitions",pindex,"mountby"]:`no_mb; + if( mb != `no_mb ) + part["mountby"] = mb; + part["used_fs"] = + solution["partitions",pindex,"filesystem"]:((mount == "swap")?(`swap):(Partitions::DefaultFs())); + value = solution["partitions",pindex,"fstopt"]:""; + if( size(value)>0 ) + part["fstopt"] = value; + else + part["fstopt"] = FileSystems::DefaultFstabOptions( part ); + part = AddFilesysData( part, solution["partitions",pindex]:$[] ); + mapvalue = solution["partitions",pindex,"fs_options"]:$[]; + if( size(mapvalue)>0 ) + part["fs_options"] = mapvalue; + + if (solution["partitions",pindex,"loop_fs"]:false + || solution["partitions",pindex,"crypt_fs"]:false) + { + part["enc_type"] = solution["partitions",pindex,"enc_type"]:`twofish; + Storage::SetCryptPwd( part["device"]:"", + solution["partitions",pindex,"crypt_key"]:"" ); + } + + value = solution["partitions",pindex,"label"]:""; + if( size(value)>0 ) + part["label"] = value; + part["fsid"] = fsid; + part["fstype"] = Partitions::FsIdToString( fsid ); + if (solution["partitions",pindex,"lvm_group"]:"" != "") + { + part["used_fs"] = `unknown; + part["fsid"] = Partitions::fsid_lvm; + part["format"] = false; + part["lvm_group"] = solution["partitions",pindex,"lvm_group"]:""; + part["mount"] = ""; + part["fstype"] = "Linux LVM"; + } + else if (solution["partitions",pindex,"raid_name"]:"" != "") + { + part["used_fs"] = `unknown; + part["fsid"] = Partitions::fsid_raid; + part["format"] = false; + part["raid_name"] = solution["partitions",pindex,"raid_name"]:""; + part["raid_type"] = solution["partitions",pindex,"raid_type"]:"raid"; + part["mount"] = ""; + part["fstype"] = "Linux RAID"; + } + y2milestone( "process_partition_data auto partition %1", part ); + partitions = add( partitions, part ); + e["created"] = e["added",0,1]:0; + e["added"] = remove( e["added"]:[], 0 ); + part = $[]; + } part["create"] = true; part["nr"] = e["created"]:0; part["device"] = Storage::GetDeviceName( dev, part["nr"]:-1 ); @@ -550,6 +630,7 @@ part["type"] = `extended; part["fsid"] = Partitions::fsid_extended_win; part["fstype"] = Partitions::FsIdToString( part["fsid"]:0 ); + part["size_k"] = region[1]:0 * disk["cyl_size"]:0 / 1024; y2milestone( "extended auto partition %1", part ); partitions = add( partitions, eval(part)); } @@ -586,12 +667,6 @@ { part["type"] = `logical; } - - if(contains(e["created_primary"]:[], a[1]:0 )) - { - part["type"] = `primary; - } - part["mount"] = mount; symbol mb = solution["partitions",pindex,"mountby"]:`no_mb; if( mb != `no_mb ) { @@ -851,17 +926,13 @@ * available primaries and logical slots ) */ -/* - // FIXME: bnc#620212 - this test is buggy. Reusing more partitions than the hardware still could create will fail - // should be size(ps)-NUM_OF_REUSED - if( size(g["gap"]:[])>0 && - ((g["extended_possible"]:false && -// size(g["free_pnr"]:[])>0 && // reusing all 4 primaries will fail with this - size(ps)+1 <= size(g["ext_pnr"]:[])+size(g["free_pnr"]:[])) || - (!g["extended_possible"]:false && - size(ps) <= size(g["ext_pnr"]:[])+size(g["free_pnr"]:[]))) ) -*/ - if( size(g["gap"]:[])>0 ) + integer new_ps = size(filter( map p, (list<map>)ps, ``(p["create"]:true))); + integer free_pnr = size(g["free_pnr"]:[]); + if( g["extended_possible"]:false ) + free_pnr = free_pnr - 1 + size(g["ext_pnr"]:[]); + y2milestone( "get_perfect_list: size(ps):%1 new_ps:%2 sum_free:%3", + size(ps), new_ps, free_pnr ); + if( size(g["gap"]:[])>0 && new_ps <= free_pnr ) { map lg = (map) eval(g); @@ -875,13 +946,16 @@ lg["procpart"] = 0; list lp = (list) eval(ps); - + + integer add_prim = size(filter(map up, (list<map>)ps, ``( + ((up["partition_type"]:"none" == "primary" || + contains(lg["free_pnr"]:[], up["partition_nr"]:0))&& + up["create"]:true)))); + y2milestone( "get_perfect_list new_ps:%1 add_prim:%2 free_prim:%3", + new_ps, add_prim, size(g["free_pnr"]:[]) ); if( g["extended_possible"]:false && - size(ps)+1>=size(g["free_pnr"]:[]) && - size(filter(map up, (list<map>)ps, ``( - up["partition_type"]:"none" == "primary" || - contains(lg["free_pnr"]:[], up["partition_nr"]:0) ))) == 0 - ) + size(g["free_pnr"]:[])>0 && + add_prim<size(g["free_pnr"]:[]) ) { y2milestone( "creating extended" ); integer index = 0; @@ -893,12 +967,13 @@ gap["gap",index,"created"] = gap["free_pnr",0]:1; gap["free_pnr"] = remove( gap["free_pnr"]:[1], 0 ); gap["gap",index,"extended"] = true; + gap["extended_possible"] = false; add_part_recursive( ps, gap ); } index = index+1; }); } - else + if( new_ps<=size(g["free_pnr"]:[])+size(g["ext_pnr"]:[]) ) { y2milestone( "not creating extended now" ); add_part_recursive( ps, lg ); @@ -926,9 +1001,9 @@ */ define void add_part_recursive( list ps, map g ) ``{ - y2milestone( "partition index %1", g["procpart"]:0 ); - y2milestone( "partitions %1", ps ); - y2milestone( "gap %1", g ); + y2milestone( "add_part_recursive partition index %1", g["procpart"]:0 ); + y2milestone( "add_part_recursive partitions %1", ps ); + y2milestone( "add_part_recursive gap %1", g ); // creation_needed indicates the case, that we do not // create a single partition but are reusing some @@ -938,7 +1013,7 @@ creation_needed = true; } }); - y2milestone("creation is needed? %1",creation_needed); + y2milestone("add_part_recursive creation is needed? %1",creation_needed); map lg = (map) eval(g); @@ -949,7 +1024,7 @@ y2milestone( "working on partition %1", part ); foreach( map e, lg["gap"]:[], ``{ - y2milestone( "start: gap section %1", e ); + y2milestone( "add_part_recursive start: gap section %1", e ); // speed up partitioning calculation (bnc#620212) boolean reuseCondition = true; @@ -959,100 +1034,43 @@ reuseCondition = false; } + boolean primary = part["partition_type"]:"none" == "primary"; + if( reuseCondition && part["max_cyl"]:0 <= e["end"]:0 && part["cylinders"]:0 <= e["cylinders"]:0 && - (!e["extended"]:false && (size(lg["free_pnr"]:[])>0 || ! creation_needed ) || - e["extended"]:false && size(lg["ext_pnr"]:[])>0) - ) + (!creation_needed || + (!e["extended"]:false && size(lg["free_pnr"]:[])>0) || + (primary && e["created"]:0>0 && e["extended"]:false && size(lg["free_pnr"]:[])>0) || + (!primary && e["extended"]:false && size(lg["ext_pnr"]:[])>0))) { map llg = (map) eval(lg); - + if( e["exists"]:false ) + { + llg["gap",gindex,"cylinders"] = 0; + } + else + { + llg["gap",gindex,"cylinders"] = + llg["gap",gindex,"cylinders"]:0 - part["cylinders"]:0; + } list addl = [ pindex ]; + if( e["exists"]:false || e["reuse"]:false ) + addl = add( addl, e["nr"]:0 ); + else if( e["extended"]:false && !primary ) + { + addl = add( addl, llg["ext_pnr",0]:5 ); + llg["ext_pnr"] = remove( llg["ext_pnr"]:[0], 0 ); + } + else + { + addl = add( addl, llg["free_pnr",0]:1 ); + llg["free_pnr"] = remove( llg["free_pnr"]:[0], 0 ); + } + llg["gap",gindex,"added"] = + add( llg["gap",gindex,"added"]:[], addl ); - // number of needed primaries by user - integer sp = size(filter(map up, (list<map>)ps, - ``(up["partition_type"]:"none" == "primary" || - contains(llg["free_pnr"]:[], up["partition_nr"]:0)))); - - y2milestone("number of primaries requested: %1", sp ); - integer cp = 0; - foreach(map gg, llg["gap"]:[], ``{ - cp = cp + size(gg["created_primary"]:[]); - }); - - boolean ex = false; - y2milestone("number of created primaries: %1", cp ); - - // Extended - if( llg["extended_possible"]:false && - !e["extended"]:false && - size(ps)+1>=size(llg["free_pnr"]:[]) && // maybe not needed - cp == sp && sp > 0 ) - { - y2milestone( "creating extended" ); - - map gap = (map) eval(lg); - llg["gap",gindex,"created"] = llg["free_pnr",0]:1; - llg["free_pnr"] = remove( llg["free_pnr"]:[1], 0 ); - llg["gap",gindex,"extended"] = true; - // reset - llg["procpart"] = pindex ; - ex = true; - - } - // Logical - else if( e["extended"]:false ) // || - /* - ( ps[pindex,"partition_type"]:"none" != "primary" && - ps[pindex,"partition_type"]:"none" != "extended") - ) - */ - { - if (!e["reuse"]:false) - { - addl = add( addl, llg["ext_pnr",0]:5 ); - llg["ext_pnr"] = remove( llg["ext_pnr"]:[0], 0 ); - } else { - addl = add( addl, e["nr"]:0 ); - } - } - // Primary - else - { - if (e["exists"]:false) - { - addl = add( addl, e["nr"]:0 ); - llg["gap",gindex,"created_primary"] = add(llg["gap",gindex,"created_primary"]:[], - e["nr"]:0 ); - } else { - addl = add( addl, llg["free_pnr",0]:1 ); - llg["gap",gindex,"created_primary"] = add(llg["gap",gindex,"created_primary"]:[], - llg["free_pnr",0]:1 ); - llg["free_pnr"] = remove( llg["free_pnr"]:[0], 0 ); - } - - } - - if (!ex) - { - llg["gap",gindex,"added"] = - add( llg["gap",gindex,"added"]:[], addl ); - } - - if (!ex) { - if( e["exists"]:false ) - { - llg["gap",gindex,"cylinders"] = 0; - } - else - { - llg["gap",gindex,"cylinders"] = - llg["gap",gindex,"cylinders"]:0 - part["cylinders"]:0; - } - } - - if( pindex+1 < size(ps) || ex ) + if( pindex+1 < size(ps) ) { add_part_recursive( ps, llg ); } @@ -1060,7 +1078,7 @@ { map ng = normalize_gaps(ps, llg); integer val = do_weighting( ps, ng ); - y2milestone( "val %1 cur_weight %2 size %3", val, cur_weight, size(cur_gap)); + y2milestone( "add_part_recursive val %1 cur_weight %2 size %3", val, cur_weight, size(cur_gap)); if( val > cur_weight || size(cur_gap)==0 ) { cur_weight = val; @@ -1070,7 +1088,6 @@ } gindex = gindex+1; }); - }; @@ -1198,8 +1215,37 @@ gindex = gindex + 1; }); */ - y2milestone( "gap %1", g ); - return( g ); + foreach( map e, g["gap"]:[], + ``{ + if( !e["exists"]:false && size(e["added"]:[])>1 ) + { + y2milestone( "normalize_gaps old added %1", e["added"]:[] ); + list nums = maplist( list l, e["added"]:[], ``(l[1]:-1)); + y2milestone( "normalize_gaps old nums %1", nums ); + list sdd = sort( list a, list b, e["added"]:[], + ``({ + boolean ba = ps[a[0]:0,"partition_type"]:""=="primary"; + boolean bb = ps[b[0]:0,"partition_type"]:""=="primary"; + y2milestone( "ba:%1 bb:%2", ba, bb ); + if( ba&&!bb ) + return( true ); + else + return( false ); + })); + integer idx = 0; + foreach( list e, (list<list>)sdd, + ``{ + sdd[idx,1] = nums[idx]:0; + idx = idx+1; + }); + g["gap",gindex,"added"] = sdd; + y2milestone( "normalize_gaps sort added %1", + g["gap",gindex,"added"]:[] ); + } + gindex = gindex + 1; + }); + y2milestone( "normalize_gaps ret %1", g ); + return( g ); }; @@ -1259,7 +1305,7 @@ */ define integer do_weighting( list ps, map g ) ``{ - y2milestone( "gap %1", g["gap"]:[] ); + y2milestone( "do_weighting gap %1", g["gap"]:[] ); integer ret = 0; integer index = 0; if( cur_mode == `free ) @@ -1342,8 +1388,14 @@ y2milestone("weight (after rounding): %1", ret); } */ + if( e["extended"]:false ) + { + ret = ret-1; + if( size(e["added"]:[])==0 ) + ret = ret-100; + } }); - y2milestone( "weight: %1", ret ); + y2milestone( "do_weighting weight: %1", ret ); return( ret ); }; @@ -1628,6 +1680,8 @@ } pnr = pnr + 1; } + if( isempty(free_pnr) ) + ret["extended_possible"] = false; ret["free_pnr"] = free_pnr; list<integer> ext_pnr = [ 5, 6, 7, 8, 9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44, -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org