diff --git a/osc/core.py b/osc/core.py index 45e25b38..3564415a 100644 --- a/osc/core.py +++ b/osc/core.py @@ -672,13 +672,14 @@ class Project: upstream_del = [ pac for pac in self.pacs_have if not pac in self.pacs_available and self.get_state(pac) != 'A'] for pac in upstream_del: - p = Package(os.path.join(self.dir, pac)) - self.delPackage(p, force = True) - delete_storedir(p.storedir) - try: - os.rmdir(pac) - except: - pass + if self.status(pac) != '!': + p = Package(os.path.join(self.dir, pac)) + self.delPackage(p, force = True) + delete_storedir(p.storedir) + try: + os.rmdir(pac) + except: + pass self.pac_root.remove(self.get_package_node(p.name)) self.pacs_have.remove(pac)