=== modified file 'stagebuilder.prolog' --- stagebuilder.prolog 2011-11-25 00:58:03 +0000 +++ stagebuilder.prolog 2011-11-22 15:24:13 +0000 @@ -15,7 +15,7 @@ % gentoo_mirror('ftp://ftp.linux.cz/pub/linux/gentoo/'). -work_dir('/var/prosys'). +work_dir('/home/ccx/bzr/prosys'). site_conf_dir(Work +/+ conf ) :- work_dir(Work). downloads_dir(Work +/+ downloads) :- work_dir(Work). stages_dir(Work +/+ stages ) :- work_dir(Work). @@ -185,18 +185,6 @@ cmd_tokens(run_replace([echo, String], File), Escaped). cmd_tokens(chroot(Dir, Args) , Escaped) :- cmd_tokens(run([Dir +/+ 'chroot.sh'|Args]) , Escaped). -cmd_tokens(comment(Text), Escaped) :- - str(Text, String), - make_comment(String, EscapedString), - append("\n", EscapedString, Escaped). - -make_comment([ ], "\n"). -make_comment([Char|String], EscapedString) :- - ( [Char] = "\n" - -> append("\n# ", Rest, EscapedString) - ; EscapedString = [Char|Rest] - ), - make_comment(String, Rest). format_cmd(Cmd, String) :- cmd_tokens(Cmd, Tokens), @@ -246,7 +234,7 @@ ; throw('functor does not have command list as first argument:' + X) ) ). - + % % Gentoo stuff below % @@ -292,8 +280,7 @@ script_dir(ScriptDir), downloads_dir(DownloadsDir) }, - [ comment('download gentoo stage: ' + Name) - , run_outvar([ScriptDir +/+ resolve_txt_uri + [ run_outvar([ScriptDir +/+ resolve_txt_uri ,Mirror +/+ releases +/+ Arch +/+ autobuilds +/+ Txt ,DownloadsDir +/+ Name ], digest_uri) @@ -326,7 +313,7 @@ ,[package_world('app-editors/vim') ] ,['vim', 'vim-pager', 'vim-syntax']). - + gentoo_package(zsh ,[package_world('app-shells/zsh') ,package_world('app-shells/zsh-completion') @@ -350,7 +337,6 @@ ,['device-mapper', xfs]). gentoo_package(network_utilities ,[package_world('ccx-meta/network-utilities') - ,package_use('net-analyzer/tcpdump -samba') ] ,[ssl,ipv6]). gentoo_package(vserver_init @@ -482,19 +468,13 @@ create_gentoo_builddir(Name, Dir) --> {gentoo_stage(Name, ArchName, _)}, download_gentoo_stage(Tarball, Name), - [comment('prepare build directory') - ,run([mkdir, '-p', Dir +/+ 'usr/portage', Dir +/+ 'var/portage']) - ], unpack_tarball(Tarball, Dir), create_chroot_script(Dir, ArchName), - {work_dir(Work), site_conf_dir(Conf)}, + {work_dir(Work)}, [run([rsync, '-a', Work +/+ 'overlay/' , Dir +/+ 'var/portage/ccx-autobuild' - ]), - run([rsync, '-a', Conf +/+ 'gentoo_scripts/' - , Dir +/+ 'root/prosys/' ])]. - + gentoo_build_stage3(Name, Dir) --> get_portage_timestamp(Dir, PortageVer), [chroot(Dir, ['/root/prosys/rebuild_stage3.sh'])],