* if post-install fails do not fail pisi, just print a warning and
mark package as configure-pending. This will help for two reasons. First the user will find out the failed configurations. And second, failing "pisi cp <package>" session, an advanced user may even update the script and "pisi cp" it again. So marking it as cp is not a bad idea. * fix for a scenario that came to mind and resulted as expected. faik@iago traceroute $ pisi lp traceroute faik@iago traceroute $ sudo pisi rm traceroute Bağımlılıkları sağlamak için bu paketler verilen sırada kaldırılacaktır: traceroute traceroute paketi kaldırılıyor Paket kaldırılmak üzere yapılandırılıyor traceroute paketi kaldırıldı faik@iago traceroute $ pisi lp traceroute faik@iago traceroute $ sudo pisi cp Program sonlandırıldı. Paket traceroute bulunamadı
This commit is contained in:
@@ -240,15 +240,19 @@ class Install(AtomicOperation):
|
||||
self.config_later = False
|
||||
if ctx.comar:
|
||||
import pisi.comariface
|
||||
ctx.ui.notify(pisi.ui.configuring, package = self.pkginfo, files = self.files)
|
||||
pisi.comariface.post_install(
|
||||
self.pkginfo.name,
|
||||
self.metadata.package.providesComar,
|
||||
self.package.comar_dir(),
|
||||
os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml),
|
||||
os.path.join(self.package.pkg_dir(), ctx.const.files_xml),
|
||||
)
|
||||
ctx.ui.notify(pisi.ui.configured, package = self.pkginfo, files = self.files)
|
||||
try:
|
||||
ctx.ui.notify(pisi.ui.configuring, package = self.pkginfo, files = self.files)
|
||||
pisi.comariface.post_install(
|
||||
self.pkginfo.name,
|
||||
self.metadata.package.providesComar,
|
||||
self.package.comar_dir(),
|
||||
os.path.join(self.package.pkg_dir(), ctx.const.metadata_xml),
|
||||
os.path.join(self.package.pkg_dir(), ctx.const.files_xml),
|
||||
)
|
||||
ctx.ui.notify(pisi.ui.configured, package = self.pkginfo, files = self.files)
|
||||
except pisi.comariface.Error:
|
||||
ctx.ui.warning(_('%s configuration failed.') % self.pkginfo.name)
|
||||
self.config_later = True
|
||||
else:
|
||||
self.config_later = True
|
||||
|
||||
|
||||
@@ -189,6 +189,8 @@ class InstallDB:
|
||||
info = self.d.get(pkg, txn)
|
||||
info.state = 'r'
|
||||
self.d.put(pkg, info, txn)
|
||||
if self.dp.has_key(pkg):
|
||||
self.dp.delete(pkg, txn)
|
||||
self.d.txn_proc(proc, txn)
|
||||
|
||||
def purge(self, pkg, txn = None):
|
||||
|
||||
Reference in New Issue
Block a user