From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 76319138247 for ; Fri, 22 Nov 2013 07:13:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5375EE0AD1; Fri, 22 Nov 2013 07:13:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id CC73EE0AD1 for ; Fri, 22 Nov 2013 07:13:35 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 9143233F348 for ; Fri, 22 Nov 2013 07:13:31 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 1B4C5D00F4 for ; Fri, 22 Nov 2013 07:13:29 +0000 (UTC) From: "Brian Dolbec" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Brian Dolbec" Message-ID: <1385100156.135ca3a1453e038840c7af49b2e6085e24ff69fd.dol-sen@gentoo> Subject: [gentoo-commits] proj/catalyst:rewrite-on-master commit in: catalyst/base/, catalyst/targets/ X-VCS-Repository: proj/catalyst X-VCS-Files: catalyst/base/stagebase.py catalyst/targets/livecd_stage2.py catalyst/targets/stage2.py X-VCS-Directories: catalyst/base/ catalyst/targets/ X-VCS-Committer: dol-sen X-VCS-Committer-Name: Brian Dolbec X-VCS-Revision: 135ca3a1453e038840c7af49b2e6085e24ff69fd X-VCS-Branch: rewrite-on-master Date: Fri, 22 Nov 2013 07:13:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 70883da8-3e4c-4d45-ae00-5eff59d94d9c X-Archives-Hash: bec49b3af6f8e7854f0594b2f84e353c commit: 135ca3a1453e038840c7af49b2e6085e24ff69fd Author: Brian Dolbec gentoo org> AuthorDate: Thu Jun 27 23:41:39 2013 +0000 Commit: Brian Dolbec gmail com> CommitDate: Fri Nov 22 06:02:36 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/catalyst.git;a=commit;h=135ca3a1 Strip trailing slash from subpath's if they exist when creating filenames. This bug was introduced in commit 52c9d37ff5de18981d6ecbe5bdde524b2bf4ebda when a trailing slash was added to target_subpath. --- catalyst/base/stagebase.py | 10 +++++----- catalyst/targets/livecd_stage2.py | 2 +- catalyst/targets/stage2.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/catalyst/base/stagebase.py b/catalyst/base/stagebase.py index ba8cab6..99f4015 100644 --- a/catalyst/base/stagebase.py +++ b/catalyst/base/stagebase.py @@ -314,7 +314,7 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_target_path(self): self.settings["target_path"]=normpath(self.settings["storedir"]+\ - "/builds/"+self.settings["target_subpath"]+".tar.bz2") + "/builds/"+self.settings["target_subpath"].rstrip('/')+".tar.bz2") if "autoresume" in self.settings["options"]\ and self.resume.is_enabled("setup_target_path"): print \ @@ -398,7 +398,7 @@ class StageBase(TargetBase, ClearBase, GenBase): "/tmp/"+self.settings["source_subpath"]) else: self.settings["source_path"]=normpath(self.settings["storedir"]+\ - "/builds/"+self.settings["source_subpath"]+".tar.bz2") + "/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2") if os.path.isfile(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes? if os.path.exists(self.settings["source_path"]): @@ -413,7 +413,7 @@ class StageBase(TargetBase, ClearBase, GenBase): print "\tseedcache in the options of catalyst.conf the source path" print "\twill then be "+\ normpath(self.settings["storedir"]+"/builds/"+\ - self.settings["source_subpath"]+".tar.bz2\n") + self.settings["source_subpath"].rstrip('/')+".tar.bz2\n") def set_dest_path(self): if "root_path" in self.settings: @@ -429,7 +429,7 @@ class StageBase(TargetBase, ClearBase, GenBase): def set_snapshot_path(self): self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"]+".tar.xz") + self.settings["snapshot"].rstrip('/')+".tar.xz") if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=\ @@ -440,7 +440,7 @@ class StageBase(TargetBase, ClearBase, GenBase): else: self.settings["snapshot_path"]=normpath(self.settings["storedir"]+\ "/snapshots/" + self.settings["snapshot_name"] + - self.settings["snapshot"]+".tar.bz2") + self.settings["snapshot"].rstrip('/')+".tar.bz2") if os.path.exists(self.settings["snapshot_path"]): self.settings["snapshot_path_hash"]=\ diff --git a/catalyst/targets/livecd_stage2.py b/catalyst/targets/livecd_stage2.py index e8bee7d..5f6e86c 100644 --- a/catalyst/targets/livecd_stage2.py +++ b/catalyst/targets/livecd_stage2.py @@ -38,7 +38,7 @@ class livecd_stage2(StageBase): file_locate(self.settings, ["cdtar","controller_file"]) def set_source_path(self): - self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2") + self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2") if os.path.isfile(self.settings["source_path"]): self.settings["source_path_hash"] = \ self.settings["hash_map"].generate_hash( diff --git a/catalyst/targets/stage2.py b/catalyst/targets/stage2.py index c447fac..116871c 100644 --- a/catalyst/targets/stage2.py +++ b/catalyst/targets/stage2.py @@ -23,7 +23,7 @@ class stage2(StageBase): if "seedcache" in self.settings["options"] and os.path.isdir(normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/")): self.settings["source_path"]=normpath(self.settings["storedir"]+"/tmp/"+self.settings["source_subpath"]+"/tmp/stage1root/") else: - self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2") + self.settings["source_path"]=normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2") if os.path.isfile(self.settings["source_path"]): if os.path.exists(self.settings["source_path"]): # XXX: Is this even necessary if the previous check passes? @@ -35,7 +35,7 @@ class stage2(StageBase): print "Source path set to "+self.settings["source_path"] if os.path.isdir(self.settings["source_path"]): print "\tIf this is not desired, remove this directory or turn of seedcache in the options of catalyst.conf" - print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"]+".tar.bz2\n") + print "\tthe source path will then be "+normpath(self.settings["storedir"]+"/builds/"+self.settings["source_subpath"].rstrip('/')+".tar.bz2\n") # XXX: How do these override_foo() functions differ from the ones in # StageBase and why aren't they in stage3_target?