=== modified file 'stagebuilder.pl' --- stagebuilder.pl 2012-06-03 15:27:58 +0000 +++ stagebuilder.pl 2012-06-03 13:59:12 +0000 @@ -29,8 +29,6 @@ stages_dir(Work +/+ stages ) :- work_dir(Work). script_dir(Work +/+ scripts ) :- work_dir(Work). package_dir(Work +/+ packages ) :- work_dir(Work). - build_dir(Work +/+ build ) :- work_dir(Work). - targets_dir(Work +/+ targets ) :- work_dir(Work). %%%%%%%%%%%%%%%%%%%%%% % Gentoo stuff below % @@ -768,26 +766,8 @@ ( { stages_set_locale(Locale) } -> set_locale(Locale) ; { true } - ). - -% build ~arch variant from gentoo stage -target(TargetName) --> - { gentoo_stage(StageName, Arch, _Txt), - PrevTargetName =: gentoo_stage3_ + StageName, - TargetName =: PrevTargetName + '_testing', - % script_dir(Scripts), - targets_dir(TargetsDir), - build_dir(BuildDir), - B = variable(build_dir) - }, - get_portage_timestamp(PortageTS), - build_dir #= B, - commands #+ [ - build_dir = BuildDir+/+TargetName+'-p'+PortageTS, - [TargetsDir+/+PrevTargetName, variable(build_dir)], - echo('ACCEPT_KEYWORDS="~'+Arch+'"') >> (B+/+'etc/make.conf'), - chroot(B, ['/root/prosys/rebuild_stage3.sh']) - ]. + ), + into_build_dir(echo(TargetName) >> 'root/prosys/stages_completed'). clone_stage --> { script_dir(Scripts) }, @@ -798,16 +778,10 @@ verbatim('fi\n') ]. -% automatically add some stuff to stage commands -target_wrapper(Name) --> - target(Name), - into_build_dir(echo(Name) >> 'root/prosys/stages_completed'), - clone_stage. - % non-dcg variant of target, sets up parameters and calls dcg variant target(Name, Commands) :- list_to_assoc([ commands-(Commands-Commands) ], AssocIn), - phrase(target_wrapper(Name), AssocIn, AssocOut), + phrase(target(Name), AssocIn, AssocOut), get_assoc(commands, AssocOut, Commands-[]). debug_target(Name) :-