* 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:
Faik Uygur
2006-11-03 18:12:47 +00:00
parent c41f8cf05c
commit 13749ce912
2 changed files with 15 additions and 9 deletions
+13 -9
View File
@@ -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
+2
View File
@@ -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):