* check file conflicts
This commit is contained in:
@@ -150,6 +150,13 @@ class Install(AtomicOperation):
|
|||||||
if not packagedb.has_package(self.pkginfo.name):
|
if not packagedb.has_package(self.pkginfo.name):
|
||||||
db = packagedb.thirdparty_packagedb
|
db = packagedb.thirdparty_packagedb
|
||||||
db.add_package(self.pkginfo)
|
db.add_package(self.pkginfo)
|
||||||
|
|
||||||
|
# check file conflicts
|
||||||
|
for file in self.files.list:
|
||||||
|
if ctx.filesdb.has_file(file.path):
|
||||||
|
pkg, existing_file = ctx.filesdb.get_file(file.path)
|
||||||
|
if pkg != self.pkginfo.name:
|
||||||
|
raise Error(_('Trying to overwrite an existing file: %s') % file.path)
|
||||||
|
|
||||||
def check_reinstall(self):
|
def check_reinstall(self):
|
||||||
"check reinstall, confirm action, and schedule reinstall"
|
"check reinstall, confirm action, and schedule reinstall"
|
||||||
|
|||||||
Reference in New Issue
Block a user