SF.net SVN: gar:[23671] csw/mgar/gar/v2/lib/python/relational_util.py

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Tue May 20 08:33:02 CEST 2014


Revision: 23671
          http://sourceforge.net/p/gar/code/23671
Author:   wahwah
Date:     2014-05-20 06:33:01 +0000 (Tue, 20 May 2014)
Log Message:
-----------
pkgdb: Delete only overrides, when cleaning lev 1

Level 1 registration only puts in the overrides, so don't delete anything else
on a PUT.

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/relational_util.py

Modified: csw/mgar/gar/v2/lib/python/relational_util.py
===================================================================
--- csw/mgar/gar/v2/lib/python/relational_util.py	2014-05-20 05:50:10 UTC (rev 23670)
+++ csw/mgar/gar/v2/lib/python/relational_util.py	2014-05-20 06:33:01 UTC (rev 23671)
@@ -104,7 +104,6 @@
   db_pkg_stats = None
   try:
     db_pkg_stats = models.Srv4FileStats.selectBy(md5_sum=md5_sum).getOne()
-    db_pkg_stats.DeleteDependentObjectsPopulatedFromPackageItself()
   except sqlobject.main.SQLObjectNotFound:
     logger.debug('Package %s not present in the relational db, '
                  'proceeding with insert.', parsed_basename)
@@ -159,6 +158,7 @@
         version_string=parsed_basename["full_version_string"],
         bundle=bundle)
   # Inserting overrides as rows into the database
+  db_pkg_stats.RemoveOverrides()
   for override_dict in pkg_stats["overrides"]:
     models.CheckpkgOverride(srv4_file=db_pkg_stats,
                            **override_dict)

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list