Chris Gianelloni wrote:
On Wed, 2006-08-23 at 06:58 +0200, Bardur Arantsson wrote:
I think the livecd_stage2_target.py should probably give the user a
slightly more informative error message ;).
Feel free to file a bug with a patch. Remember that catalyst isn't
really targeted for end-users (how many times do you hear that about a
project) but instead Gentoo developers. We release it mostly for
transparency reasons and because of our social contract. That being
said, we do work bug reports, especially ones with patches.
Fair enough, but bugs are meant to be squashed aren't they? ;) All your
hard work _is_ appreciated even if it wasn't meant for general
consumption :).
I can't be bothered to open up a bug report, but I've attached a trivial
patch.
I think the logic in there still looks suspect though: AFAICT there may
be other scenarios than the one I accidentally tried where 'unpack' may
remain True while unpack_cmd does not get set to anything meaningful.
With my patch this will result in the new error message as well -- I'm
not sure how appropriate that is.
Anyway, the patch certainly certainly shouldn't cause any regressions.
The new message only triggers when an undefined variable would be
accessed anyway.
The only thing resembling the file name above is the source_subpath
setting, but I'm not sure why that would get turned into a .tar.bz2 file
name by catalyst when catalyst itself clearly expects a directory name.
The "change to the name of a .tar.bz2" bit still puzzles me and I'm not
sure it's desirable behavior.
It is. It is all due to seedcache and how it works. It first searches
for a directory, then for a tarball. That's not saying that there isn't
a bug in there somewhere, but the design is to use a directory first
when options=seedcache and a tarball only otherwise for all targets
*except* livecd-stage2.
Ok, I'll take your word for it :).
--
Bardur Arantsson
<[EMAIL PROTECTED]>
- I've got a plan so cunning, you could put a tail on it and call
it a weasel.
Edmund Blackadder, 'Blackadder'
--- livecd_stage2_target.py.orig 2006-08-23 19:33:53.000000000 +0200
+++ livecd_stage2_target.py 2006-08-23 20:20:13.000000000 +0200
@@ -75,6 +75,7 @@
def unpack(self):
unpack=True
+ display_msg=None
clst_unpack_hash=read_from_clst(self.settings["autoresume_path"]+"unpack")
@@ -113,6 +114,9 @@
if not
os.path.exists(self.settings["pkgcache_path"]):
os.makedirs(self.settings["pkgcache_path"],0755)
+ if not display_msg:
+ raise CatalystError,"Could not find appropriate
source. Please check the 'source_subpath' setting in the spec file."
+
print display_msg
cmd(unpack_cmd,error_msg,env=self.env)