Date: Fri, 24 Jan 2014 20:33:45 +0400 From: Boris Samorodov <bsam@passap.ru> To: lev@FreeBSD.org, ports@FreeBSD.org Subject: Re: Is it Ok to write files into ${STAGEDIR}/${PREFIX} on "build" stage? Message-ID: <52E295E9.6080406@passap.ru> In-Reply-To: <1731518990.20140120000401@serebryakov.spb.ru> References: <1731518990.20140120000401@serebryakov.spb.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
20.01.2014 00:04, Lev Serebryakov пишет: > Hello, Ports. > > I'm writing port, which has complex, multi-stage build. In the middle ofg > build some files should be installed into some directory with exactly same > structure, as final result -- some ${TEMPROOT}/${PREFIX}. I could create > special place for files, and in "do-install" simple do "tar -cf - -C > ${TEMPROOT} . | tar -xf - -C ${STAGEDIR}" -- it will be correct install to > stage dir for this port. But it looks strange -- to have two copies of all > final files. > > Now I'm using ${STAGEDIR}/${PREFIX} instead of ${TEMPROOT}/${PREFIX} and > it works nicely -- do-install: becomes no-op, everything is in-place and > port doesn't spent another 250MiB of disk place. > > But, maybe, I don't something significant flaw in this approach and it is > bad idea? This is a bad idea in general. And if you try to test the port then at stage time you should get an error like "the the file system touched before the stage phase". Those stages are: 1. fetch, ...; 2. build; 3. stage (install to a STAGEDIR); 4. actual install (to PREFIX). Our staging allows having a full install at STAGEDIR but doing a partially install to PREFIX. I.e. DOCS, EXAMPLES, NLS, etc. may be installed to real filesystem (PREFIX) only if an appropriate option is checked up. In the future this allows us to get different binary packages (libs-*, bin-*, what_you_like-*) from one source (STAGEDIR). And yes, this system has a drawback. If you write an application only for FreeBSD, it is a monolith one (no docs, examples, etc.) and you use only ports system (no packages) then you'll get your application duplicate disk consumption (at stage/install phase). -- WBR, Boris Samorodov (bsam) FreeBSD Committer, http://www.FreeBSD.org The Power To Serve
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52E295E9.6080406>