monarch has asked for the wisdom of the Perl Monks concerning the following question:
e.g. I create a directory /tmp/install, and have my source in /tmp/build. My script does the following:
I can tar up the contents of /tmp/install and have a clean build that can be applied to the root file system of similar machines.
My problem is that I want to build mod_perl and this a)needs Perl and b)wants to install things into the Perl library directories. A simple mount of the Perl directory is not sufficient because the Perl modules installed will go straight into my system (and I don't want that).
So I want to copy all of /usr/local/perl into /tmp/install/usr/local/perl, run my chroot(), do the make install, remove all the copied files from /tmp/install/usr/local/perl, and then be left with the Perl modules that were created in /tmp/install/usr/local/perl/lib/....
I thought about maybe using File::Find and File::Copy along with File::Path to automatically create directories, and storing each copied file into an array for subsequent deletion. Is this the best approach? How have other people applied a directory copy then removal (leaving any new artifacts in place).
update: corrected spelling.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Copying File Structure, then Removing
by Hue-Bond (Priest) on Sep 06, 2006 at 11:18 UTC | |
|
Re: Copying File Structure, then Removing
by BrowserUk (Patriarch) on Sep 06, 2006 at 12:52 UTC | |
|
Re: Copying File Structure, then Removing
by planetscape (Chancellor) on Sep 07, 2006 at 16:38 UTC | |
| A reply falls below the community's threshold of quality. You may see it by logging in. |