=== modified file 'libkeryx/definitions/dpkg/minideblib/AptRepoClient.py' (properties changed: +x to -x)
--- libkeryx/definitions/dpkg/minideblib/AptRepoClient.py	2009-10-09 03:23:10 +0000
+++ libkeryx/definitions/dpkg/minideblib/AptRepoClient.py	2009-10-10 19:36:07 +0000
@@ -424,16 +424,23 @@
         """Returns a list of packages that are dependencies of the provided
            package names.
         """
+        nfound = []  # List of packages that are requested but not found
+
         for package in packages:
-            # Add the package to the list of packages to download.
-            current += [package]
-
+            # If package is not wanted or already being handled, skip it
+            if (package in exclude or package in current): continue
             # Get the dependencies for this package.
             try:
                 data = self.get_binary_name_version(package)[0]
             except IndexError:
-                return []
+                # If package is not found, note it and skip
+                nfound += [package]
+                continue
+            # Add the package to the list of packages currently being handled.
+            current += [package]
             dependencies = []
+            nf = []
+            # Add each dependency from each field.
             if depends and data.has_key("depends"):
                 dependencies += [x.split()[0] for x in data["depends"].split(", ")]
             if predepends and data.has_key("pre-depends"):
@@ -441,14 +448,14 @@
             if recommends and data.has_key("recommends"):
                 dependencies += [x.split()[0] for x in data["recommends"].split(", ")]
 
-            # If the dependency is already in the download list, skip it. Otherwise, 
-            # find its dependencies, and add them to the download list.
-            for item in dependencies:
-                if not (item in exclude or item in current):
-                    current += self.get_binary_dependencies([item], exclude=exclude, current=current)
+            # Now get the dependencies of our dependencies though whats actually returned
+            # is list of currently handled packages as well as all handled by the dependencies.
+            if dependencies:
+                (current, nf) = self.get_binary_dependencies(dependencies, exclude=exclude, current=current)
+                nfound += nf
 
-        # Return the download list.
-        return current
+        # Return the download list, and list of not found packages.
+        return current, nfound
 
     def __get_best_version(self, package, base_url, pkgcache):
         """

