[Zope-CVS] SVN: zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/include.py fix remaining tests

Fred L. Drake, Jr. fdrake at gmail.com
Tue Aug 30 10:41:40 EDT 2005


Log message for revision 38156:
  fix remaining tests

Changed:
  U   zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/include.py

-=-
Modified: zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/include.py
===================================================================
--- zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/include.py	2005-08-30 14:19:14 UTC (rev 38155)
+++ zpkgtools/branches/fdrake-zconfig-branch/zpkgtools/include.py	2005-08-30 14:41:39 UTC (rev 38156)
@@ -84,7 +84,7 @@
                 excludes.append(k)
                 continue
             if v:
-                includes[k] = v
+                includes[v] = k
             else:
                 L = includes.setdefault(None, [])
                 L.append(k)
@@ -158,18 +158,23 @@
         cf, _ = cfgparser.loadConfig(get_schema(), package_conf)
         config = PackageConstruction(sourcedir, package_conf)
         if cf.collection is not None:
-            if cf.collection.excludes:
-                # XXX should make sure PACKAGE_CONF isn't already excluded
-                cf.collection.excludes.append(PACKAGE_CONF)
-            elif not cf.collection.includes:
-                # Nothing included or excluded; simply exclude PACKAGE_CONF:
-                cf.collection.excludes.append(PACKAGE_CONF)
             config.collection.excludes = cf.collection.excludes
             config.collection.includes = cf.collection.includes
         if cf.distribution is not None:
             config.distribution.includes = cf.distribution.includes
         if cf.loads is not None:
             config.loads.includes = cf.loads.includes
+
+        # Now that the configuration object is populated and we know
+        # that the PACKAGE_CONF file exists, make sure it isn't copied
+        # if there's nothing specified in the <collection> section.
+        #
+        if config.collection.excludes:
+            # XXX should make sure PACKAGE_CONF isn't already excluded
+            config.collection.excludes.append(PACKAGE_CONF)
+        elif not config.collection.includes:
+            # Nothing included or excluded; simply exclude PACKAGE_CONF:
+            config.collection.excludes.append(PACKAGE_CONF)
     else:
         config = PackageConstruction(sourcedir, None)
     return config



More information about the Zope-CVS mailing list