# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
# $Id: $
+ 14 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
+ modules/generic_stage_target.py:
+ Apparently, python doesn't like it when you put a set of comments in front
+ of an elif. Thanks to Robin Johnson <robbat2@gentoo.org> for pointing it out
+ and the patch.
+
13 Feb 2008; Chris Gianelloni <wolf31o2@gentoo.org>
modules/generic_stage_target.py:
Huge refactoring of modules/generic_stage_target.py to fix indentation and
" to "+self.settings["chroot_path"]+" failed."
if self.settings.has_key("AUTORESUME"):
- """ Autoresume is valid, SEEDCACHE is valid """
if os.path.isdir(self.settings["source_path"]) \
and os.path.exists(self.settings["autoresume_path"]+"unpack"):
+ """ Autoresume is valid, SEEDCACHE is valid """
unpack=False
invalid_snapshot=False
- """ Autoresume is valid, tarball is valid """
elif os.path.isfile(self.settings["source_path"]) \
and self.settings["source_path_hash"]==clst_unpack_hash:
+ """ Autoresume is valid, tarball is valid """
unpack=False
invalid_snapshot=True
- """ Autoresume is invalid, SEEDCACHE """
elif os.path.isdir(self.settings["source_path"]) \
and not os.path.exists(self.settings["autoresume_path"]+\
"unpack"):
+ """ Autoresume is invalid, SEEDCACHE """
unpack=True
invalid_snapshot=False
- """ Autoresume is invalid, tarball """
elif os.path.isfile(self.settings["source_path"]) \
and self.settings["source_path_hash"]!=clst_unpack_hash:
+ """ Autoresume is invalid, tarball """
unpack=True
invalid_snapshot=True
else:
if os.path.isdir(self.settings["source_path"]):
unpack=True
invalid_snapshot=False
- """ Tarball so unpack and remove anything already there """
elif os.path.isfile(self.settings["source_path"]):
+ """ Tarball so unpack and remove anything already there """
unpack=True
invalid_snapshot=True
- """ No autoresume, no SEEDCACHE """
+ """ No autoresume, no SEEDCACHE """
else:
""" Tarball so unpack and remove anything already there """
if os.path.isfile(self.settings["source_path"]):
unpack=True
invalid_snapshot=True
- """ We should never reach this, so something is very wrong """
elif os.path.isdir(self.settings["source_path"]):
+ """ We should never reach this, so something is very wrong """
raise CatalystError,\
"source path is a dir but seedcache is not enabled"