Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 70663 - Separate specific target logic out of the generic targets modules
Summary: Separate specific target logic out of the generic targets modules
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: Catalyst (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Catalyst Developers
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2004-11-10 06:42 UTC by Eric Edgar (RETIRED)
Modified: 2005-01-14 11:50 UTC (History)
0 users

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


Attachments
This patch defines the routines needed to fill the self.settings variable (catalyst_patch1.patch,6.82 KB, patch)
2004-11-10 06:44 UTC, Eric Edgar (RETIRED)
Details | Diff
The second patch in this set that finishes cleaning specific target information in a generic target class (catalyst_patch2.patch,12.81 KB, patch)
2004-11-10 06:46 UTC, Eric Edgar (RETIRED)
Details | Diff
The second patch in this set that finishes cleaning specific target information in a generic target class ... fixes a bug found in the previous patch (catalyst_patch2a.patch,12.59 KB, patch)
2004-11-10 07:00 UTC, Eric Edgar (RETIRED)
Details | Diff
fixed a missing default case in the previous patch (catalyst_patch2b.patch,12.62 KB, patch)
2004-11-10 08:21 UTC, Eric Edgar (RETIRED)
Details | Diff
fixed another little default case issue (catalyst_patch2c.patch,12.64 KB, patch)
2004-11-10 08:30 UTC, Eric Edgar (RETIRED)
Details | Diff
Separation of class logic (catalyst_patch2d.patch,12.64 KB, patch)
2004-11-11 10:13 UTC, Eric Edgar (RETIRED)
Details | Diff
Separation of class logic - making catalyst more modular (modular.patch,15.41 KB, patch)
2005-01-04 08:41 UTC, Eric Edgar (RETIRED)
Details | Diff
Separation of class logic - making catalyst more modular (modular.patch,15.41 KB, patch)
2005-01-04 11:03 UTC, Eric Edgar (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Edgar (RETIRED) gentoo-dev 2004-11-10 06:42:15 UTC
These two patches separate any specific target information from the generic target modules.  Each module can now stand on its own.  Adding a new module only needs to modify the valid_build_targets array in catalyst_support.py

Reproducible: Always
Steps to Reproduce:
1. run catalyst
2.
3.

Actual Results:  
Catalyst works as advertised however adding modules is not as easy as it could 
be.

Expected Results:  
catalyst should function the same as it did before these patches.
Comment 1 Eric Edgar (RETIRED) gentoo-dev 2004-11-10 06:44:56 UTC
Created attachment 43653 [details, diff]
This patch defines the routines needed to fill the self.settings variable
Comment 2 Eric Edgar (RETIRED) gentoo-dev 2004-11-10 06:46:22 UTC
Created attachment 43654 [details, diff]
The second patch in this set that finishes cleaning specific target information in a generic target class
Comment 3 Eric Edgar (RETIRED) gentoo-dev 2004-11-10 07:00:19 UTC
Created attachment 43655 [details, diff]
The second patch in this set that finishes cleaning specific target information in a generic target class  ... fixes a bug found in the previous patch

The second patch in this set that finishes cleaning specific target information
in a generic target class

fixes the set_action_sequence in grp_target.py and livecd_stage2.py
Comment 4 Eric Edgar (RETIRED) gentoo-dev 2004-11-10 08:21:17 UTC
Created attachment 43662 [details, diff]
fixed a missing default case in the previous patch
Comment 5 Eric Edgar (RETIRED) gentoo-dev 2004-11-10 08:30:16 UTC
Created attachment 43664 [details, diff]
fixed another little default case issue
Comment 6 Eric Edgar (RETIRED) gentoo-dev 2004-11-11 10:13:18 UTC
Created attachment 43729 [details, diff]
Separation of class logic

Found a typo in the embedded module.  This patch corrects that.
Comment 7 Chris Gianelloni (RETIRED) gentoo-dev 2004-12-15 18:37:41 UTC
OK.  I am just now getting a chance to look into this.  So I need just the first and last patches, correct?
Comment 8 Eric Edgar (RETIRED) gentoo-dev 2004-12-16 14:49:51 UTC
Yes that is correct.  Apply the first one first and then the last one.
Comment 9 Chris Gianelloni (RETIRED) gentoo-dev 2004-12-16 15:11:48 UTC
OK... This is added into CVS and will show up in 1.1.2, which I will release in the next few days.
Comment 10 Chris Gianelloni (RETIRED) gentoo-dev 2004-12-17 13:22:50 UTC
OK... these patches completely broke building...  If you want, I can get you a copy of the current CVS for you to work from, since it would take you a while to do so via viewcvs).

Anyway, I reverted these two patches and livecd-stage1 building worked again.  I'll be honest, I don't know python, so I can't tell you where the problem was with it.

.....and now I know to leave the python-fu to zhen and for me to stick with the shell-fu
Comment 11 Eric Edgar (RETIRED) gentoo-dev 2005-01-04 08:41:08 UTC
Created attachment 47598 [details, diff]
Separation of class logic - making catalyst more modular
Comment 12 Chris Gianelloni (RETIRED) gentoo-dev 2005-01-04 10:24:09 UTC
I applied the patch and got the following...

# catalyst-cvs -f livecd-stage1-environmental.spec
Gentoo Catalyst, version 1.1.2
Copyright 2003-2004 The Gentoo Foundation
Distributed under the GNU General Public License version 2

Using default Catalyst configuration file, /etc/catalyst/catalyst.conf
Setting storedir to default value "/var/tmp/catalyst"
Setting portdir to default value "/usr/portage"
Setting distdir to config file value "/usr/portage/distfiles"
Setting options to config file value "ccache pkgcache"
Setting sharedir to config file value "/var/cvsroot/gentoo/src/catalyst"
Compiler cache support enabled.
Package cache support enabled.
Envscript support enabled.
Traceback (most recent call last):
  File "/var/cvsroot/gentoo/src/catalyst/catalyst", line 278, in ?
    targetmap=import_modules()
  File "/var/cvsroot/gentoo/src/catalyst/catalyst", line 133, in import_modules
    module=imp.load_module(x,fh,"modules/"+x+".py",(".py","r",imp.PY_SOURCE))
  File "modules/embedded_target.py", line 85
    print "embedded stage path is "self.settings["stage_path"]
                                      ^
SyntaxError: invalid syntax
Comment 13 Eric Edgar (RETIRED) gentoo-dev 2005-01-04 11:03:45 UTC
Created attachment 47624 [details, diff]
Separation of class logic - making catalyst more modular

This fixes the print statement bug
Comment 14 Chris Gianelloni (RETIRED) gentoo-dev 2005-01-14 11:50:06 UTC
Catalyst 1.1.2 is now out!