From 7f2f2ccbbcae26556ea786ee01a6d1e6e2752633 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fatih=20A=C5=9F=C4=B1c=C4=B1?= Date: Mon, 28 Jun 2010 07:53:13 +0000 Subject: [PATCH] delta: Check the names of old and new packages Warns and skips if the package names are different. --- pisi/operations/delta.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pisi/operations/delta.py b/pisi/operations/delta.py index f4799509..6c053e6c 100644 --- a/pisi/operations/delta.py +++ b/pisi/operations/delta.py @@ -56,6 +56,12 @@ def create_delta_packages(old_packages, new_package): old_pkg = pisi.package.Package(old_package) old_pkg_info = old_pkg.metadata.package + if old_pkg_info.name != new_pkg_info.name: + ctx.ui.warning(_("The file '%s' belongs to a different package " + "other than '%s'. Skipping it...") + % (old_package, new_pkg_info.name)) + continue + if old_pkg_info.build == new_pkg_info.build: ctx.ui.warning(_("Package '%s' has the same build number with " "the new package. Skipping it...") % old_package)