<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>191524</bug_id>
          
          <creation_ts>2007-09-06 18:36 0000</creation_ts>
          <short_desc>Catalyst will not build an tinderbox target without a pkgcache_path set</short_desc>
          <delta_ts>2007-10-12 00:08:15 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Hosted Projects</product>
          <component>Catalyst</component>
          <version>unspecified</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>daniel.colchete@gmail.com</reporter>
          <assigned_to>catalyst@gentoo.org</assigned_to>
          

      

      
          <long_desc isprivate="0">
            <who>daniel.colchete@gmail.com</who>
            <bug_when>2007-09-06 18:36:21 0000</bug_when>
            <thetext>Running catalyst with a tinderbox target with 2 pkgcache_path entries in the spec file will make it&apos;s python code fail.
The tinderbox spec file from the examples have 2 pkgcache_path lines.


Reproducible: Always

Steps to Reproduce:
1. Get a tinderbox.spec from /usr/share/doc/catalyst-2.0.4/examples/tinderbox_template.spec and configure it to compile a package against a ready and tested stage4 target.
2. run catalyst -f tinderbox_template.spec

Actual Results:  
The last lines of the error traceback are:

Caching snapshot to /var/tmp/catalyst/snapshot_cache/20070729/
The autoresume path is /var/tmp/catalyst/tmp/supra-2007.00/.autoresume-tinderbox-pentium4-2007.00/
portage_overlay directories are set to: &quot;/home/catalyst/projeto-supra/portage&quot;
Catalyst aborting....
Traceback (most recent call last):
  File &quot;/usr/bin/catalyst&quot;, line 384, in ?
    build_target(addlargs, targetmap)
  File &quot;/usr/bin/catalyst&quot;, line 200, in build_target
    mytarget=targetmap[addlargs[&quot;target&quot;]](conf_values, addlargs)
  File &quot;/usr/lib/catalyst/modules/tinderbox_target.py&quot;, line 14, in __init__
    generic_stage_target.__init__(self,spec,addlargs)
  File &quot;/usr/lib/catalyst/modules/generic_stage_target.py&quot;, line 181, in __init__
    print &quot;Location of the package cache is &quot; + self.settings[&quot;pkgcache_path&quot;]
KeyError: &apos;pkgcache_path&apos;


Expected Results:  
It should have started uncompressing the stage4 into the work dir.

A complete spec file to reproduce it:

subarch: pentium4
version_stamp: 2007.00
target: tinderbox
rel_type: supra-2007.00
profile: default-linux/x86/2007.0
snapshot: 20070729
source_subpath: supra-2007.00/stage4-pentium4-2007.00
distcc_hosts:
portage_confdir: /home/catalyst/projeto-supra/portage
portage_overlay: /home/catalyst/projeto-supra/portage
pkgcache_path: /tmp/packages
tinderbox/use: -ipv6 -X -kde -qt -qt3 -qt4 -gtk -gnome mysql sasl apache2 bzip2 gd-external gmp imap pdo-external sqlite3 sqlite jpeg png truetype xml pgsql mysqli
tinderbox/packages: dev-perl/SOAP-Lite
pkgcache_path: 
kerncache_path:</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>daniel.colchete@gmail.com</who>
            <bug_when>2007-09-06 18:41:59 0000</bug_when>
            <thetext>Correction: after doing a few more tests I have a more precise diagnostic. The problem was that my second pkgcache_path parameter was clean. You can have as many pkgcache_path lines as you want, as long as the last one have some dir on it.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>agaffney@gentoo.org</who>
            <bug_when>2007-09-08 19:19:48 0000</bug_when>
            <thetext>In order to prevent this kind of problem, catalyst will now die when parsing the spec if you have duplicate keys in the spec file. I&apos;ve also removed the duplicate pkgcache_path and kerncache_path entries from a few of the example specs.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>wolf31o2@gentoo.org</who>
            <bug_when>2007-10-12 00:08:15 0000</bug_when>
            <thetext>This should be fixed in 2.0.5_pre4.  Please test this version of catalyst (or newer) and report back if it does not work.

Thanks</thetext>
          </long_desc>
      
    </bug>

</bugzilla>