abort/resume package builds could be a bit more controlled
gerard at linuxfromscratch.org
Sat May 27 16:04:49 PDT 2006
Jeremy Huntwork wrote:
> That unpacks the source directory and spits out the name of the
> directory it just unpacked to /tmp/unpacked.
Actually /tmp/unpacked contains every single file that tar just unpacked
last time I checked the contents of this file.
> So, if we want to remove any possible source directories before we start
> building a package, and we're not going to either unpack the directory
> first or store that static data somewhere, how are we going to know what
> directory to remove?
I guess I just don't understand what you are checking for. I see the
flow being as follows:
1) Right now you unpack a tarball. /tmp/unpacked contains a list of
files that tar just created during the unpacking. It's used to figure
out the directory name of the package we're about to build.
2) Build the package.
If the build gets interrupted for some reason, you restart "make."
The Makefile target checks for /tmp/unpacked to figure out the directory
name. If this file exists, remove the source directory extracted from
the file, and start over again (unpack && build).
If the file does not exist, don't attempt to remove a source directory
since it's not there anyways.
Now, after a package is built, the source directory is removed (unless
it's kept around for the special cases) but /tmp/unpacked remains. So
now when you try to build the *next* package, it finds /tmp/unpacked,
finds a directory name, tries to remove the *previous* package's source
Every time you unpack something, the /tmp/unpacked gets overwritten
anyways, so in its current state it's not going to be used for any
tracking. The current package doesn't need to know anything about the
previous package, not via /tmp/unpacked.
So what am I missing? I probably am missing something here.
/* If Linux doesn't have the solution, you have the wrong problem */
More information about the alfs-discuss