Apache OpenOffice (AOO) Bugzilla – Issue 14653
new options for deliver.pl: -link and -deloutput
Last modified: 2003-11-20 12:59:53 UTC
This patch adds 2 new options to deliver.pl, for people who are building the complete OOo but are short on disk space. The patch adds two new options and does not change the default functionality: -link hard link files into the solver to save disk space -deloutput remove the output tree -link is useful for anyone who is building OOo on a single partition and is not using a shared solver. With this option, deliver tries to hard link files when it would usually copy them, and falls back to copying if that fails. This saves over 800mb on a typical build on my machine, more if -g debugging information is enabled. -deloutput is for people who are really short on disk space and reduces the OOo build footprint to the size of the solver + source + output directory for a single tree, by deleting the output tree if the module was delivered successfully. This is useful for people who would otherwise have to resort to using precompiled solvers, or for situations where the intermediate object files never need to be reused such as a tinderbox that always rebuilds from scratch. The patch is against 1.1beta2 but should apply to almost any branch. rt: I've assigned to you because you performed the last few commits to deliver.pl but I'm happy to commit if no-one really owns the code.
Created attachment 6294 [details] Implementation of -link and -deloutput in solenv/bin/deliver.pl
Hi Chris, I've no objections against these two options. As long as the default behaviour is not changed new options won't hurt, and these ones really sound usefull. What i did not check out yet is what a windows perl is doing when confronted with "link", which is not implemented there. If it just does nothing and returns 0, everything should be OK. Concerning your delete_output: you perhaps should add some check whether expand_macros("../%__SRC%") gave the correct result. Otherwise if %_SRC% expands empty you'll delete your whole module. Go ahead, commit. Best against cws_srx644_ooo11beta2, I think. Rüdiger
Created attachment 7056 [details] Patch v2 with added changes suggested by Timm
I talked to Volker, and we decided we can't be sure what link() on Windows will do, and anyway it will never work for programs other than Cygwin binaries so I disabled the option completely for Windows. Secondly, in delete_output I now check that INPATH is not unset and refuse to delete if it is blank. I will check into 1.1rc if there are no objections. The patch is generated against the 11rc branch.
Comitted to branch /cvs/tools/solenv/bin/deliver.pl,v <-- deliver.pl new revision: 1.48.2.1; previous revision: 1.48
09:51 <@haggai> vq: have you got a 1.1rc deliver.pl in front of you? Does deliver -help show the -deloutput option but not -link ? I (hopefully) disabled -link for win as we discussed 09:54 < vq> Options: [...] 09:54 < vq> -link hard link files into the solver to save disk space 09:54 <@haggai> eek 09:55 <@haggai> if ( $^O ne 'MSWin32' ) { 09:55 <@haggai> print STDERR " -link\thard link files into the solver to save disk space\n"; 09:56 <@haggai> is your $^O not 'MSWin32'? 09:56 < vq> haggai: Ahh, well $^O is 'cygwin' for cygwin perl, your line should work for activestate perl 09:58 <@haggai> so I need if ( $^O ne 'MSWin32' && $^O ne 'cygwin' ) I guess 09:58 < vq> haggai: I think so too 10:02 < vq> haggai: How about: $ENV{GUI} ne 'WNT' ? Is better to read! I'm attaching a new patch.
Created attachment 7326 [details] Diff against 11rc with correction for windows
Done. /cvs/tools/solenv/bin/deliver.pl,v <-- deliver.pl new revision: 1.48.2.2; previous revision: 1.48.2.1
Released in 1.1.0, closing