import sys
import time
import types
+import utils
+from binary import Binary
################################################################################
################################################################################
-def copy_temporary_contents(package, version, deb):
+def copy_temporary_contents(package, version, deb, reject):
"""
copy the previously stored contents from the temp table to the permanant one
subst = {
"__PACKAGE__": package,
"__VERSION__": version,
- "__TO_ADDRESS__": Cnf["Dinstall::MyAdminAddress",
- "__DAK_ADDRESS__": Cnf["Dinstall::MyEmailAddress"]
- }
+ "__TO_ADDRESS__": Cnf["Dinstall::MyAdminAddress"],
+ "__DAK_ADDRESS__": Cnf["Dinstall::MyEmailAddress"] }
- message = utils.TemplateSubst(Subst, Cnf["Dir::Templates"]+"/missing-contents")
+ message = utils.TemplateSubst(subst, Cnf["Dir::Templates"]+"/missing-contents")
utils.send_mail( message )
- exists = DBConn().insert_content_path(package, version, deb)
+ Binary(deb, reject).scan_package()
if exists:
sql = """INSERT INTO content_associations(binary_pkg,filepath,filename)