Bug 123267 - dev-util/catalyst-2.0_rc39 won't build portage snapshots
Bug#: 123267 Product:  Gentoo Linux Version: 2005.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: catalyst@gentoo.org Reported By: corsair@gentoo.org
Component: Applications
URL: 
Summary: dev-util/catalyst-2.0_rc39 won't build portage snapshots
Keywords:  
Status Whiteboard: 
Opened: 2006-02-18 06:11 0000
Description:   Opened: 2006-02-18 06:11 0000
Hi,

this is PPC64 and I just tried to build a portage snapshot, but it will not
finish. catalyst-2.0_rc38 worked fine a few days ago.

# catalyst2 -s 20060218
Gentoo Catalyst, version 2.0_rc39
Copyright 2003-2005 The Gentoo Foundation
Distributed under the GNU General Public License version 2

Using default Catalyst configuration file, /etc/catalyst2/catalyst2.conf
Setting sharedir to config file value "/usr/lib/catalyst2"
Setting snapshot_cache to default value "/var/tmp/catalyst2/snapshot_cache"
Setting hash_function to config file value "md5"
Setting storedir to config file value "/var/tmp/catalyst2"
Setting portdir to default value "/usr/portage"
Setting distdir to config file value "/usr/portage/distfiles"
Setting options to config file value "autoresume ccache kerncache pkgcache
seedcache snapcache"
Compiler cache support enabled.
Package cache support enabled.
Snapshot cache support enabled.
Seed cache support enabled.
Kernel cache support enabled.
Autoresuming support enabled.
Creating Portage tree snapshot 20060218 from /usr/portage...
Compressing Portage snapshot tarball...
Catalyst aborting....
Traceback (most recent call last):
  File "/usr/bin/catalyst2", line 380, in ?
    build_target(addlargs, targetmap)
  File "/usr/bin/catalyst2", line 198, in build_target
    mytarget.run()
  File "/usr/lib/catalyst2/modules/snapshot_target.py", line 63, in run
    self.gen_digest_file(self.settings["snapshot_path"])
AttributeError: snapshot_target instance has no attribute 'gen_digest_file'

------- Comment #1 From Rafael 2006-02-20 13:52:02 0000 -------
> Hi,
> 
> this is PPC64 and I just tried to build a portage snapshot, but it will not
> finish. catalyst-2.0_rc38 worked fine a few days ago.
(...)
Confirmed....

Following is a one-liner to fix the issue, apply to 
/usr/lib/catalyst2/modules/snapshot_target.py :

diff -pruN catalyst.old/snapshot_target.py catalyst.new/snapshot_target.py
--- catalyst.old/snapshot_target.py     2006-02-20 22:47:20.084095616 +0100
+++ catalyst.new/snapshot_target.py     2006-02-20 22:43:04.000000000 +0100
@@ -10,7 +10,7 @@ import os
 from catalyst_support import *
 from generic_stage_target import *

-class snapshot_target(generic_target):
+class snapshot_target(generic_stage_target):
        def __init__(self,myspec,addlargs):
                self.required_values=["version_stamp","target"]
                self.valid_values=["version_stamp","target","portdir_overlay"]

cheers,

T

------- Comment #2 From Rafael 2006-02-20 14:07:43 0000 -------
Created an attachment (id=80316) [details]
catalyst-2.0_rc39-snapshot-target-fix.patch

Ok, here again as a patch file, 
i just figured this is the appropriate way ;)

------- Comment #3 From Douglas Campos 2006-02-21 11:58:29 0000 -------
(In reply to comment #2)
> Created an attachment (id=80316) [edit] [details]
> catalyst-2.0_rc39-snapshot-target-fix.patch
> 
> Ok, here again as a patch file, 
> i just figured this is the appropriate way ;)
> 

actually, it builds the snapshot but doesn't compute digest

------- Comment #4 From Rafael 2006-02-21 12:14:22 0000 -------
(In reply to comment #3)
> actually, it builds the snapshot but doesn't compute digest
> 
But at the end it errors out.
Anyway the patch solves the issue.

------- Comment #5 From Chris Gianelloni (RETIRED) 2006-03-13 11:44:48 0000 -------
Fixed in 2.0_rc40... Thanks for the bug report and the patch, guys.