[yast-commit] r41910 - in /trunk/product-creator: package/yast2-product-creator.changes src/ProductCreator.ycp
Author: lslezak Date: Fri Nov 9 11:29:26 2007 New Revision: 41910 URL: http://svn.opensuse.org/viewcvs/yast?rev=41910&view=rev Log: - copy PPC boot files in /suseboot, /ppc and /PS3 (#335177) Modified: trunk/product-creator/package/yast2-product-creator.changes trunk/product-creator/src/ProductCreator.ycp Modified: trunk/product-creator/package/yast2-product-creator.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/package/yast2-product-creator.changes?rev=41910&r1=41909&r2=41910&view=diff ============================================================================== --- trunk/product-creator/package/yast2-product-creator.changes (original) +++ trunk/product-creator/package/yast2-product-creator.changes Fri Nov 9 11:29:26 2007 @@ -2,6 +2,7 @@ Fri Nov 9 10:36:55 CET 2007 - lslezak@suse.cz - properly download /boot, /docu and slideshow files (#338625) +- copy PPC boot files in /suseboot, /ppc and /PS3 (#335177) - install required package createrepo (#331530), install additional packages on PPC - fixed ISO image creation on PPC when the path contained spaces Modified: trunk/product-creator/src/ProductCreator.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/product-creator/src/ProductCreator.ycp?rev=41910&r1=41909&r2=41910&view=diff ============================================================================== --- trunk/product-creator/src/ProductCreator.ycp (original) +++ trunk/product-creator/src/ProductCreator.ycp Fri Nov 9 11:29:26 2007 @@ -896,9 +896,86 @@ boolean CopyPPCBoot(integer srcid, string target) { - return CopyDirectoryRec(srcid, 1, "/ppc", target) - && CopyDirectoryRec(srcid, 1, "/etc", target) - && CopyDirectoryRec(srcid, 1, "/suseboot", target); + y2milestone("Copying PPC boot files"); + + list<string> lst = GetList(srcid, 1, ""); + if (lst == nil) + { + lst = []; + } + + boolean ret = true; + + if (contains(lst, "ppc/")) + { + y2internal("Copying /ppc subdirectory"); + boolean r = CopyDirectoryRecOpt(srcid, 1, "/ppc", target); + + if (!r) + { + y2internal("Directory listing may be missing, copying /ppc/bootinfo.txt"); + CopyFile(srcid, 1, "/ppc/bootinfo.txt", target + "/ppc"); + } + + ret = ret && r; + } + + if (contains(lst, "PS3/")) + { + y2internal("Copying /ppc subdirectory"); + boolean r = CopyDirectoryRecOpt(srcid, 1, "/PS3", target); + + if (!r) + { + y2internal("Directory listing may be missing, copying /ppc/bootinfo.txt"); + Exec(sformat("/bin/mkdir -p '%1/PS3/otheros'", String::Quote(target))); + CopyFile(srcid, 1, "/PS3/otheros/otheros.bld", target + "/PS3/otheros"); + } + + ret = ret && r; + } + + if (contains(lst, "suseboot/")) + { + y2internal("Copying /suseboot subdirectory"); + boolean r = CopyDirectoryRecOpt(srcid, 1, "/suseboot", target); + y2internal("Result: %1", r); + + if (!r) + { + list<string> files = [ + "/suseboot/inst32", "/suseboot/inst64", "/suseboot/os-chooser", + "/suseboot/yaboot", "/suseboot/yaboot.cnf", "/suseboot/yaboot.ibm", + "/suseboot/yaboot.txt" + ]; + + y2internal("Directory listing may be missing using fixed list: %1", files); + + foreach(string f, files, + { + CopyFile(srcid, 1, f, target + f); + } + ); + } + + ret = ret && r; + } + + if (contains(lst, "etc/")) + { + y2internal("Copying /etc subdirectory"); + boolean r = CopyDirectoryRecOpt(srcid, 1, "/etc", target); + + if (!r) + { + y2internal("Directory listing may be missing, copying /etc/yaboot.conf"); + CopyFile(srcid, 1, "/etc/yaboot.conf", target + "/etc"); + } + + ret = ret && r; + } + + return ret; } string UpDir(string input) @@ -1122,9 +1199,12 @@ integer base_source = checkProductDependency(); boolean bootable_product = isBootSource(base_source); - if (bootable_product) + // ppc64 has /boot/ppc + string boot_architecture = (arch == "ppc64") ? "ppc" : arch; + + if (bootable_product && Config["code10"]:false) { - Exec(sformat("/bin/mkdir -p '%1/boot/%2'", String::Quote(skel_root), String::Quote(arch))); + Exec(sformat("/bin/mkdir -p '%1/boot/%2'", String::Quote(skel_root), String::Quote(boot_architecture))); } list<integer> enabled = Pkg::SourceGetCurrent(true); @@ -1150,7 +1230,7 @@ } else if (Arch::ppc() || Arch::ppc64()) { - Exec(sformat("/bin/mkdir -p '%1/etc'", String::Quote(skel_root))); + Exec(sformat("/bin/mkdir -p '%1/PS3'", String::Quote(skel_root))); Exec(sformat("/bin/mkdir -p '%1/ppc'", String::Quote(skel_root))); Exec(sformat("/bin/mkdir -p '%1/suseboot'", String::Quote(skel_root))); } @@ -1406,6 +1486,13 @@ CopyDirectoryRec(base_source, 1, "boot/loader", sformat("%1/boot", skel_root)); } } + else if (Arch::ppc() || Arch::ppc64()) + { + CopyPPCBoot(base_source, skel_root); + + // recursive copy of /boot + CopyDirectoryRec(base_source, 1, "boot", skel_root); + } else { // recursive copy of /boot/loader/* @@ -1414,7 +1501,12 @@ } else { - CopyDirectoryRec(base_source, 1, "/boot", skel_root); + CopyDirectoryRec(base_source, 1, "boot", skel_root); + + if (Arch::ppc() || Arch::ppc64()) + { + CopyPPCBoot(base_source, skel_root); + } } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org
participants (1)
-
lslezak@svn.opensuse.org