From edfb2e9b868017a1e55f11ae714a8cdfaa1c0445 Mon Sep 17 00:00:00 2001 From: guinux Date: Sun, 29 Sep 2013 11:49:42 +0200 Subject: [PATCH] little fixes --- pamac-refresh.py | 4 ++++ pamac.pot | 4 ++-- pamac/transaction.py | 6 +++--- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pamac-refresh.py b/pamac-refresh.py index 9061d62..1b62306 100644 --- a/pamac-refresh.py +++ b/pamac-refresh.py @@ -1,9 +1,11 @@ #! /usr/bin/pkexec /usr/bin/python3 # -*- coding:utf-8 -*- +from time import sleep from pamac import common, config if not common.pid_file_exists(): + common.write_pid_file() print('refreshing') handle = config.handle() for db in handle.get_syncdbs(): @@ -20,3 +22,5 @@ if not common.pid_file_exists(): break else: print('refreshing {} succeeded'.format(db.name)) + sleep(1) + common.rm_pid_file() diff --git a/pamac.pot b/pamac.pot index 0e58bd9..eb68602 100644 --- a/pamac.pot +++ b/pamac.pot @@ -327,12 +327,12 @@ msgstr "" #: pamac/transaction.py:331 #, python-brace-format -msgid "{pkgname1} will replace by {pkgname2}\n" +msgid "{pkgname1} will be replaced by {pkgname2}" msgstr "" #: pamac/transaction.py:334 #, python-brace-format -msgid "{pkgname1} conflicts with {pkgname2}\n" +msgid "{pkgname1} conflicts with {pkgname2}" msgstr "" #: pamac/transaction.py:383 diff --git a/pamac/transaction.py b/pamac/transaction.py index 25930af..4a498e6 100644 --- a/pamac/transaction.py +++ b/pamac/transaction.py @@ -328,10 +328,10 @@ class Transaction(): if event == 'ALPM_QUESTION_INSTALL_IGNOREPKG': return 0 #Do not install package in IgnorePkg/IgnoreGroup if event == 'ALPM_QUESTION_REPLACE_PKG': - self.warning += _('{pkgname1} will replace by {pkgname2}\n').format(pkgname1 = data_tupel[0].name, pkgname2 = data_tupel[1].name) + self.warning += _('{pkgname1} will be replaced by {pkgname2}').format(pkgname1 = data_tupel[0].name, pkgname2 = data_tupel[1].name)+'\n' return 1 #Auto-remove conflicts in case of replaces if event == 'ALPM_QUESTION_CONFLICT_PKG': - self.warning += _('{pkgname1} conflicts with {pkgname2}\n').format(pkgname1 = data_tupel[0], pkgname2 = data_tupel[1]) + self.warning += _('{pkgname1} conflicts with {pkgname2}').format(pkgname1 = data_tupel[0], pkgname2 = data_tupel[1])+'\n' return 1 #Auto-remove conflicts if event == 'ALPM_QUESTION_CORRUPTED_PKG': return 1 #Auto-remove corrupted pkgs in cache @@ -352,7 +352,7 @@ class Transaction(): if not (level & _logmask): return if level & pyalpm.LOG_ERROR: - self.error += line + #self.error += line _error = "ERROR: "+line end_iter = progress_buffer.get_end_iter() progress_buffer.insert(end_iter, _error)