]> err.no Git - dak/commitdiff
dak/import_archive.py: Add support to udeb packages
authorOtavio Salvador <otavio@ossystems.com.br>
Sat, 14 Jun 2008 18:11:31 +0000 (15:11 -0300)
committerOtavio Salvador <otavio@ossystems.com.br>
Sat, 14 Jun 2008 18:29:45 +0000 (15:29 -0300)
ChangeLog
dak/import_archive.py

index 3957281db39563fed8eae3c9d6cc27547372ef28..d2d99e04924d64ad1d4ba41ce9a3162fc7fd9280 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2008-06-14  Otavio Salvador  <otavio@debian.org>
 
+       * dak/import_archive.py: Add support to udeb packages
+
        * dak/control_suite.py (main): Handle SystemError exception in
        case of a incompatible commandline parameter
 
index 203221bee9d01a92e8c50d5c9219511765b3e8ac..4432ff1ac602c6b8008a2efcff154cbd9e9a3d23 100755 (executable)
@@ -433,8 +433,12 @@ def process_packages (filename, suite, component, archive):
         if not source_version:
             source_version = version
         filename = Scanner.Section["filename"]
+        if filename.endswith(".deb"):
+            type = "deb"
+        else:
+            type = "udeb"
         location = get_location_path(filename.split('/')[0])
-        location_id = database.get_location_id (location, component, archive)
+        location_id = database.get_location_id (location, component.replace("/debian-installer", ""), archive)
         filename = poolify (filename, location)
         if architecture == "all":
             filename = re_arch_from_filename.sub("binary-all", filename)
@@ -443,7 +447,6 @@ def process_packages (filename, suite, component, archive):
         size = Scanner.Section["size"]
         md5sum = Scanner.Section["md5sum"]
         files_id = get_or_set_files_id (filename, size, md5sum, location_id)
-        type = "deb"; # FIXME
         cache_key = "%s_%s_%s_%d_%d_%d_%d" % (package, version, repr(source_id), architecture_id, location_id, files_id, suite_id)
         if not arch_all_cache.has_key(cache_key):
             arch_all_cache[cache_key] = 1
@@ -566,7 +569,9 @@ Please read the documentation before running this script.
             process_packages (packages, suite, "", server)
         elif type == "legacy" or type == "pool":
             for suite in Cnf.ValueList("Location::%s::Suites" % (location)):
-                for component in Cnf.SubTree("Component").List():
+                udeb_components = map(lambda x: x+"/debian-installer",
+                                      Cnf.ValueList("Suite::%s::UdebComponents" % suite))
+                for component in Cnf.SubTree("Component").List() + udeb_components:
                     architectures = filter(utils.real_arch,
                                            Cnf.ValueList("Suite::%s::Architectures" % (suite)))
                     for architecture in architectures: