* call pisi.finalize before exiting interrupt handler
* PİSİ PİSİ
This commit is contained in:
@@ -23,13 +23,18 @@ import gettext
|
||||
__trans = gettext.translation('pisi', fallback=True)
|
||||
_ = __trans.ugettext
|
||||
|
||||
|
||||
def exit():
|
||||
pisi.api.finalize()
|
||||
sys.exit(1)
|
||||
|
||||
def handle_exception(exception, value, tb):
|
||||
|
||||
ui = pisi.cli.CLI() # make a temporary UI
|
||||
show_traceback = False
|
||||
if exception == exceptions.KeyboardInterrupt:
|
||||
ui.error(_("Keyboard Interrupt: Exiting..."))
|
||||
sys.exit(1)
|
||||
exit()
|
||||
elif isinstance(value, pisi.Error):
|
||||
ui.error(_("Fatal Error. Program Terminated."))
|
||||
show_traceback = ctx.get_option('debug')
|
||||
@@ -54,8 +59,8 @@ Please file a bug report. (http://bugs.uludag.org.tr)"""))
|
||||
else:
|
||||
ui.info(_("Use --debug to see a traceback."))
|
||||
|
||||
sys.exit(1)
|
||||
|
||||
exit()
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
sys.excepthook = handle_exception
|
||||
|
||||
+12
-11
@@ -84,17 +84,18 @@ def init(database = True, options = None, ui = None, comar = True):
|
||||
ctx.initialized = True
|
||||
|
||||
def finalize():
|
||||
pisi.repodb.finalize()
|
||||
pisi.installdb.finalize()
|
||||
if ctx.filesdb != None:
|
||||
ctx.filesdb.close()
|
||||
if ctx.componentdb != None:
|
||||
ctx.componentdb.close()
|
||||
packagedb.finalize_db()
|
||||
pisi.sourcedb.finalize()
|
||||
ctx.ui.debug('PISI API finalized')
|
||||
ctx.ui.close()
|
||||
ctx.initialized = False
|
||||
if ctx.initialized:
|
||||
pisi.repodb.finalize()
|
||||
pisi.installdb.finalize()
|
||||
if ctx.filesdb != None:
|
||||
ctx.filesdb.close()
|
||||
if ctx.componentdb != None:
|
||||
ctx.componentdb.close()
|
||||
packagedb.finalize_db()
|
||||
pisi.sourcedb.finalize()
|
||||
ctx.ui.debug('PISI API finalized')
|
||||
ctx.ui.close()
|
||||
ctx.initialized = False
|
||||
|
||||
def list_upgradable():
|
||||
ignore_build = ctx.config.options and ctx.config.options.ignore_build_no
|
||||
|
||||
@@ -9,7 +9,7 @@ msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: tr\n"
|
||||
"POT-Creation-Date: 2005-11-22 15:09+EET\n"
|
||||
"PO-Revision-Date: 2005-11-22 15:11+0200\n"
|
||||
"PO-Revision-Date: 2005-11-22 15:53+0200\n"
|
||||
"Last-Translator: Eray Özkural <eray@uludag.org.tr>\n"
|
||||
"Language-Team: Türkçe <tr@li.org>\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@@ -266,7 +266,7 @@ msgstr "Paket %s bulunamadı."
|
||||
|
||||
#: pisi/api.py:237
|
||||
msgid "* Building index of PISI files under %s"
|
||||
msgstr "* %s altındaki PISI dosyalarının bir endeksi yapılıyor."
|
||||
msgstr "* %s altındaki PİSİ dosyalarının bir endeksi yapılıyor."
|
||||
|
||||
#: pisi/api.py:240
|
||||
msgid "* Index file written"
|
||||
@@ -430,7 +430,7 @@ msgstr "Yol %s birden çok pakete ait"
|
||||
|
||||
#: pisi/build.py:168
|
||||
msgid "Building PISI source package: %s"
|
||||
msgstr "PISI kaynak paketi %s inşa ediliyor"
|
||||
msgstr "PİSİ kaynak paketi %s inşa ediliyor"
|
||||
|
||||
#: pisi/build.py:208
|
||||
msgid "IceCream detected. Make sure your daemon is up and running..."
|
||||
@@ -569,7 +569,7 @@ msgstr "%s yaratılıyor,"
|
||||
|
||||
#: pisi/build.py:626
|
||||
msgid "Creating PISI package %s."
|
||||
msgstr "PISI paketi %s yaratılıyor."
|
||||
msgstr "PİSİ paketi %s yaratılıyor."
|
||||
|
||||
#: pisi/build.py:658
|
||||
msgid "Done."
|
||||
@@ -758,11 +758,11 @@ msgid ""
|
||||
"You can give a URI of the pspec.xml file. PISI will\n"
|
||||
"fetch all necessary files and build the package for you.\n"
|
||||
msgstr ""
|
||||
"pspec.xml kullanarak bir PISI paketi inşa et\n"
|
||||
"pspec.xml kullanarak bir PİSİ paketi inşa et\n"
|
||||
"\n"
|
||||
"Kullanım: build <pspec.xml>\n"
|
||||
"\n"
|
||||
"pspec.xml dosyasının URI'ını verebilirsiniz. PISI sizin\n"
|
||||
"pspec.xml dosyasının URI'ını verebilirsiniz. PİSİ sizin\n"
|
||||
"için gerekli tüm dosyaları çekip inşa edecektir.\n"
|
||||
|
||||
#: pisi/cli/commands.py:337
|
||||
@@ -797,7 +797,7 @@ msgid ""
|
||||
"You can also specify components instead of package names, which will be\n"
|
||||
"expanded to package names.\n"
|
||||
msgstr ""
|
||||
"PISI paketlerini yükle\n"
|
||||
"PİSİ paketlerini yükle\n"
|
||||
"\n"
|
||||
"Kullanım: install <package1> <package2> ... <packagen>\n"
|
||||
"\n"
|
||||
@@ -828,7 +828,7 @@ msgid ""
|
||||
"You can also specify components instead of package names, which will be\n"
|
||||
"expanded to package names.\n"
|
||||
msgstr ""
|
||||
"PISI paketlerini yükselt\n"
|
||||
"PİSİ paketlerini yükselt\n"
|
||||
"\n"
|
||||
"Kullanım: Upgrade <package1> <package2> ... <packagen>\n"
|
||||
"\n"
|
||||
@@ -852,7 +852,7 @@ msgid ""
|
||||
"You can also specify components instead of package names, which will be\n"
|
||||
"expanded to package names.\n"
|
||||
msgstr ""
|
||||
"PISI paketlerini kaldır\n"
|
||||
"PİSİ paketlerini kaldır\n"
|
||||
"\n"
|
||||
"Kullanım: remove <package1> <package2> ... <packagen>\n"
|
||||
"\n"
|
||||
@@ -915,11 +915,11 @@ msgid ""
|
||||
"named by default 'pisi-index.xml'. In particular, it indexes both\n"
|
||||
"source and binary packages.\n"
|
||||
msgstr ""
|
||||
"Verilen bir dizindeki PISI dosyalarının endeksle\n"
|
||||
"Verilen bir dizindeki PİSİ dosyalarının endeksle\n"
|
||||
"\n"
|
||||
"Kullanım: index <directory>\n"
|
||||
"\n"
|
||||
"Bu komut bir dizindeki bütüm PİSİ dosyalarını arastırır, PIS\n"
|
||||
"Bu komut bir dizindeki bütüm PİSİ dosyalarını arastırır, PİSİ\n"
|
||||
"etiketlerini toplar ve bilgiyi çıktı, varsayılan adı 'pisi-index.xml',olan "
|
||||
"XML dosyasında birleştirir. Özellikle, hem ikili hem kaynak\n"
|
||||
"paketlerini endeksler.\n"
|
||||
@@ -1432,7 +1432,7 @@ msgstr ""
|
||||
|
||||
#: pisi/lockeddbshelve.py:78
|
||||
msgid "Another instance of PISI is running. Try later!"
|
||||
msgstr "PISI bir yerde daha çalışıyor. Yine deneyin!"
|
||||
msgstr "PİSİ bir yerde daha çalışıyor. Yine deneyin!"
|
||||
|
||||
#: pisi/metadata.py:58
|
||||
msgid "Build: % s, Distribution: %s, Dist. Release: %s\n"
|
||||
|
||||
Reference in New Issue
Block a user