build: Search old packages in {compiled,debug}_packages_dir too

This is similar to the behaviour before the build number removal except
that it does not search recursively.
This commit is contained in:
Fatih Aşıcı
2010-10-07 12:23:07 +00:00
parent 44c91bde39
commit a23bb1272b
+6 -1
View File
@@ -1059,10 +1059,15 @@ class Builder:
os.chdir(c) os.chdir(c)
old_package_dirs = (ctx.config.compiled_packages_dir(),
ctx.config.debug_packages_dir(),
outdir or ".")
for update in self.spec.history[1:]: for update in self.spec.history[1:]:
filename = self.package_filename(self.metadata.package, update) filename = self.package_filename(self.metadata.package, update)
path = util.join_path(outdir, filename) if outdir else filename
for package_dir in old_package_dirs:
path = util.join_path(package_dir, filename)
if os.path.exists(path): if os.path.exists(path):
self.old_packages.append(filename) self.old_packages.append(filename)