Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 135051 - stage2 tries untaring a stage1root directory if seedache is not specified in config
Summary: stage2 tries untaring a stage1root directory if seedache is not specified in ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Other
: High normal (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-05-31 08:22 UTC by Joshua Kinard
Modified: 2006-06-08 17:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Rewrite SEEDCACHE extraction logic (cat2-fix-seedcache.patch,1.97 KB, patch)
2006-05-31 08:23 UTC, Joshua Kinard
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua Kinard gentoo-dev 2006-05-31 08:22:30 UTC
Logic in modules/generic_stage_target.py:575 attempts to deduce if both SEEDCACHE is defined in the catalyst config AND if the source_path is a directory.  If both are true, then it is supposed to rsync the stage1root directory over as the stage2 build directory.  If false, it attempts to run a tar extraction.

In the event SEEDCACHE is not defined, but stage1root exists, catalyst inadvertently tries to run a tar extraction on a directory, which bombs most fantastically.  Example:

Using seed-stage from /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/
Delete this folder if you wish to use a seed stage tarball instead

The autoresume path is /usr/catalyst/tmp/default/.autoresume-stage2-mips3-2006.1-pre/
Location of the package cache is /usr/catalyst/packages/default/stage2-mips3-2006.1-pre/
Location of the kerncache is /usr/catalyst/kerncache/default/stage2-mips3-2006.1-pre/
Checking for processes running in chroot and killing them.
Running action sequence: unpack

Starting tar extract from /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/
to /usr/catalyst/tmp/default/stage2-mips3-2006.1-pre/ (This may take some time) ...

tar: /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/: Cannot read: Is a directory
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Invalid argument
        Input file = (stdin), output file = (stdout)

[snip]


To resolve this, a patch is attached the re-writes the logic of this conditional block as such (abbreviated hacky C logic):

if has_key(SEEDCACHE) {
Comment 1 Joshua Kinard gentoo-dev 2006-05-31 08:22:30 UTC
Logic in modules/generic_stage_target.py:575 attempts to deduce if both SEEDCACHE is defined in the catalyst config AND if the source_path is a directory.  If both are true, then it is supposed to rsync the stage1root directory over as the stage2 build directory.  If false, it attempts to run a tar extraction.

In the event SEEDCACHE is not defined, but stage1root exists, catalyst inadvertently tries to run a tar extraction on a directory, which bombs most fantastically.  Example:

Using seed-stage from /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/
Delete this folder if you wish to use a seed stage tarball instead

The autoresume path is /usr/catalyst/tmp/default/.autoresume-stage2-mips3-2006.1-pre/
Location of the package cache is /usr/catalyst/packages/default/stage2-mips3-2006.1-pre/
Location of the kerncache is /usr/catalyst/kerncache/default/stage2-mips3-2006.1-pre/
Checking for processes running in chroot and killing them.
Running action sequence: unpack

Starting tar extract from /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/
to /usr/catalyst/tmp/default/stage2-mips3-2006.1-pre/ (This may take some time) ...

tar: /usr/catalyst/tmp/default/stage1-mips3-2006.1-pre/tmp/stage1root/: Cannot read: Is a directory
tar: At beginning of tape, quitting now
tar: Error is not recoverable: exiting now

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Invalid argument
        Input file = (stdin), output file = (stdout)

[snip]


To resolve this, a patch is attached the re-writes the logic of this conditional block as such (abbreviated hacky C logic):

if has_key(SEEDCACHE) {
··· if isdir(source_path) {
······ /* Directory exists, use rsync */
······ run rsync();
··· } else {
······ /* Directory does not exist, or is not a
······ ** directory.  Attempt tar extract instead
······ **/
······ run tar_extract();
··· }
} else {
··· /* No SEEDCACHE, extract tarball */
··· run tar_extract();
}
Comment 2 Joshua Kinard gentoo-dev 2006-05-31 08:23:23 UTC
Created attachment 87988 [details, diff]
Rewrite SEEDCACHE extraction logic
Comment 3 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-08 14:27:09 UTC
I've added this to CVS
Comment 4 Chris Gianelloni (RETIRED) gentoo-dev 2006-06-08 17:48:19 UTC
Fixed in 2.0_rc47