summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/Changelog6
-rw-r--r--i18n/de.po24
-rw-r--r--i18n/messages.pot21
-rw-r--r--plugins/etc_proposals.py2
-rw-r--r--plugins/exception.py2
-rw-r--r--plugins/gpytage.py2
-rw-r--r--plugins/new_version.py2
-rw-r--r--plugins/notify.py2
-rw-r--r--plugins/reload_portage.py2
-rw-r--r--portato/backend/__init__.py2
-rw-r--r--portato/backend/exceptions.py2
-rw-r--r--portato/backend/flags.py55
-rw-r--r--portato/backend/package.py2
-rw-r--r--portato/backend/portage/__init__.py2
-rw-r--r--portato/backend/portage/package.py5
-rw-r--r--portato/backend/portage/package_22.py2
-rw-r--r--portato/backend/portage/sets.py16
-rw-r--r--portato/backend/portage/settings.py2
-rw-r--r--portato/backend/portage/settings_22.py2
-rw-r--r--portato/backend/portage/system.py2
-rw-r--r--portato/backend/portage/system_22.py17
-rw-r--r--portato/backend/system_interface.py2
-rw-r--r--portato/config_parser.py2
-rw-r--r--portato/constants.py2
-rw-r--r--portato/db/__init__.py2
-rw-r--r--portato/db/database.py2
-rw-r--r--portato/db/dict.py2
-rw-r--r--portato/db/sql.py2
-rw-r--r--portato/dependency.py2
-rw-r--r--portato/gui/dialogs.py9
-rw-r--r--portato/gui/exception_handling.py17
-rw-r--r--portato/gui/exceptions.py2
-rw-r--r--portato/gui/queue.py19
-rw-r--r--portato/gui/session.py2
-rw-r--r--portato/gui/updater.py2
-rw-r--r--portato/gui/utils.py2
-rw-r--r--portato/gui/views.py5
-rw-r--r--portato/gui/windows/__init__.py2
-rw-r--r--portato/gui/windows/about.py2
-rw-r--r--portato/gui/windows/basic.py5
-rw-r--r--portato/gui/windows/mailinfo.py2
-rw-r--r--portato/gui/windows/main.py150
-rw-r--r--portato/gui/windows/plugin.py2
-rw-r--r--portato/gui/windows/preference.py2
-rw-r--r--portato/gui/windows/search.py2
-rw-r--r--portato/gui/windows/splash.py2
-rw-r--r--portato/gui/windows/update.py2
-rw-r--r--portato/gui/wrapper.py2
-rw-r--r--portato/helper.py31
-rw-r--r--portato/log.py19
-rw-r--r--portato/plistener.py2
-rw-r--r--portato/plugin.py2
-rw-r--r--portato/plugins/__init__.py2
-rw-r--r--portato/session.py2
-rw-r--r--portato/waiting_queue.py2
-rw-r--r--setup.py2
56 files changed, 263 insertions, 218 deletions
diff --git a/doc/Changelog b/doc/Changelog
index aaec860..1981cf9 100644
--- a/doc/Changelog
+++ b/doc/Changelog
@@ -1,10 +1,12 @@
next:
-- add (experimental) support for sqlite db
+- add support for sqlite db
- improvements in session handling
- sort by useflags in dependency list
- make uselist and deplist lazy - i.e. load only if needed
- remembers the height and width of the preference window
-- bugs fixed: #44, #41
+- debug improvements
+- check prerequisites before starting
+- bugs fixed: #44, #41, #15, #47
0.11.1:
- bugfixes
diff --git a/i18n/de.po b/i18n/de.po
index 95bd79b..0072569 100644
--- a/i18n/de.po
+++ b/i18n/de.po
@@ -2,8 +2,8 @@ msgid ""
msgstr ""
"Project-Id-Version: Portato\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-28 00:59+0100\n"
-"PO-Revision-Date: 2009-01-28 01:00+0100\n"
+"POT-Creation-Date: 2009-02-17 00:14+0100\n"
+"PO-Revision-Date: 2009-02-17 00:15+0100\n"
"Last-Translator: René 'Necoro' Neumann <necoro@necoro.net>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
@@ -647,21 +647,29 @@ msgstr "Wirklich die gesamte Queue löschen?"
msgid "A prerequisite for starting Portato was not matched."
msgstr "Eine Vorbedingung um Portato zu starten ist nicht erfüllt."
-#: portato/gui/views.py:84
+#: portato/gui/dialogs.py:115
+msgid ""
+"<b>Note</b>: On fresh Sabayon installs or its LiveDVD/-CD, there is no portage tree existing per default.\n"
+"Please run <i>emerge --sync &amp;&amp; layman -S</i>."
+msgstr ""
+"<b>Hinweis</b>: Auf frisch installierten Sabayon-Systemen bzw. der Sabayon LiveDVD/-CD existiert standardmäßig kein Portage-Tree.\n"
+"Bitte führe <i>emerge --sync &amp;&amp; layman -S</i> aus."
+
+#: portato/gui/views.py:85
msgid "Package is not installed"
msgstr "Paket ist nicht installiert"
-#: portato/gui/views.py:101
+#: portato/gui/views.py:102
#, python-format
msgid "No %(old)s language file installed. Falling back to %(new)s."
msgstr "Keine \"%(old)s\" Syntaxdatei gefunden. Benutze \"%(new)s\"-Syntax."
-#: portato/gui/views.py:110
+#: portato/gui/views.py:111
#, python-format
msgid "No %(old)s language file installed. Disable highlighting."
msgstr "Keine \"%(old)s\" Syntaxdatei gefunden. Deaktiviere Hervorhebung."
-#: portato/gui/views.py:129
+#: portato/gui/views.py:130
#: portato/gui/windows/main.py:536
#, python-format
msgid "Error: %s"
@@ -914,7 +922,7 @@ msgstr "Leere Datenbank..."
msgid "Populating database..."
msgstr "Fülle Datenbank..."
-#: portato/backend/flags.py:527
+#: portato/backend/flags.py:528
#, python-format
msgid "Conflicting values for masking status: %s"
msgstr "Konflikt beim Masking-Status: %s"
@@ -939,7 +947,7 @@ msgstr "Es konnte kein bester Treffer für das Paket '%(package)s' ermittelt wer
msgid "BUG in flags.new_masking_status. It returns '%s'"
msgstr "BUG in flags.new_masking_status. Es gibt '%s' zurück."
-#: portato/helper.py:76
+#: portato/helper.py:87
msgid "Invalid dependency string"
msgstr "Ungültiger Dependency-String."
diff --git a/i18n/messages.pot b/i18n/messages.pot
index c3e73e2..900500c 100644
--- a/i18n/messages.pot
+++ b/i18n/messages.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-01-28 00:59+0100\n"
+"POT-Creation-Date: 2009-02-17 00:14+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -630,21 +630,28 @@ msgstr ""
msgid "A prerequisite for starting Portato was not matched."
msgstr ""
-#: portato/gui/views.py:84
+#: portato/gui/dialogs.py:115
+msgid ""
+"<b>Note</b>: On fresh Sabayon installs or its LiveDVD/-CD, there is no "
+"portage tree existing per default.\n"
+"Please run <i>emerge --sync &amp;&amp; layman -S</i>."
+msgstr ""
+
+#: portato/gui/views.py:85
msgid "Package is not installed"
msgstr ""
-#: portato/gui/views.py:101
+#: portato/gui/views.py:102
#, python-format
msgid "No %(old)s language file installed. Falling back to %(new)s."
msgstr ""
-#: portato/gui/views.py:110
+#: portato/gui/views.py:111
#, python-format
msgid "No %(old)s language file installed. Disable highlighting."
msgstr ""
-#: portato/gui/views.py:129 portato/gui/windows/main.py:536
+#: portato/gui/views.py:130 portato/gui/windows/main.py:536
#, python-format
msgid "Error: %s"
msgstr ""
@@ -904,7 +911,7 @@ msgstr ""
msgid "Populating database..."
msgstr ""
-#: portato/backend/flags.py:527
+#: portato/backend/flags.py:528
#, python-format
msgid "Conflicting values for masking status: %s"
msgstr ""
@@ -930,7 +937,7 @@ msgstr ""
msgid "BUG in flags.new_masking_status. It returns '%s'"
msgstr ""
-#: portato/helper.py:76
+#: portato/helper.py:87
msgid "Invalid dependency string"
msgstr ""
diff --git a/plugins/etc_proposals.py b/plugins/etc_proposals.py
index 5b4f67a..bb8ce5a 100644
--- a/plugins/etc_proposals.py
+++ b/plugins/etc_proposals.py
@@ -3,7 +3,7 @@
# File: plugins/etc_proposals.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2007-2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/plugins/exception.py b/plugins/exception.py
index ff5a8e9..0dc6105 100644
--- a/plugins/exception.py
+++ b/plugins/exception.py
@@ -3,7 +3,7 @@
# File: plugins/exception.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/plugins/gpytage.py b/plugins/gpytage.py
index 5ebd6b4..43678ec 100644
--- a/plugins/gpytage.py
+++ b/plugins/gpytage.py
@@ -3,7 +3,7 @@
# File: plugins/gpytage.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/plugins/new_version.py b/plugins/new_version.py
index 5391507..7e4d3c0 100644
--- a/plugins/new_version.py
+++ b/plugins/new_version.py
@@ -3,7 +3,7 @@
# File: plugins/new_version.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/plugins/notify.py b/plugins/notify.py
index 7a3776a..8f21de5 100644
--- a/plugins/notify.py
+++ b/plugins/notify.py
@@ -3,7 +3,7 @@
# File: plugins/notify.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2007-2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/plugins/reload_portage.py b/plugins/reload_portage.py
index 1aea01f..539e949 100644
--- a/plugins/reload_portage.py
+++ b/plugins/reload_portage.py
@@ -3,7 +3,7 @@
# File: plugins/reload_portage.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2007-2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/__init__.py b/portato/backend/__init__.py
index 4a4144a..8eae806 100644
--- a/portato/backend/__init__.py
+++ b/portato/backend/__init__.py
@@ -3,7 +3,7 @@
# File: portato/backend/__init__.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2007 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/exceptions.py b/portato/backend/exceptions.py
index 46b2a3e..f20a33e 100644
--- a/portato/backend/exceptions.py
+++ b/portato/backend/exceptions.py
@@ -3,7 +3,7 @@
# File: portato/backend/exceptions.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2007 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index 56df231..baa1f37 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -3,7 +3,7 @@
# File: portato/backend/flags.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
@@ -203,10 +203,10 @@ def sort_use_flag_list (flaglist):
"""
def flag_key (flag):
- if flag[0] in "+-":
- return flag[1:]
- else:
- return flag
+ if flag[0] in "+-":
+ return flag[1:]
+ else:
+ return flag
flaglist.sort(key = flag_key)
return flaglist
@@ -262,7 +262,7 @@ def set_use_flag (pkg, flag):
if pkg.matches(crit):
# we have the inverted flag in the uselist/newuselist --> delete it
if invFlag in flags or (file, line, invFlag, False) in newUseFlags[cpv] or (file, line, flag, True) in newUseFlags[cpv]:
- if added: del newUseFlags[-1] # we currently added it as an extra option - delete it
+ if added: del newUseFlags[cpv][-1] # we currently added it as an extra option - delete it
added = True
jumpOut = False
for t in ((file, line, invFlag, False),(file, line, flag, True)):
@@ -343,22 +343,22 @@ def write_use_flags ():
"""This writes our changed useflags into the file."""
global newUseFlags, useFlags
+ def combine (list):
+ """Shortcut for reverting the list into a string."""
+ return " ".join(list)+"\n"
+
def insert (flag, list):
"""Shortcut for inserting a new flag right after the package-name."""
list.insert(1,flag)
def remove (flag, list):
"""Removes a flag."""
- try:
- list.remove(flag)
- except ValueError: # flag is given as flag\n
- list.remove(flag+"\n")
- list.append("\n") #re-insert the newline
+ list.remove(flag)
# no more flags there - comment it out
- if len(list) == 1 or list[1][0] in ("#","\n"):
+ if len(list) == 1 or list[1][0] == "#":
list[0] = "#"+list[0]
- insert("#removed by portato#",list)
+ list.append("#removed by portato#")
file_cache = {} # cache for having to read the file only once: name->[lines]
for cpv in newUseFlags:
@@ -381,14 +381,14 @@ def write_use_flags ():
while i < line: # stop at the given line
lines.append(f.readline())
i += 1
- l = f.readline().split(" ")
+ l = f.readline().split()
# delete or insert
if delete:
remove(flag,l)
else:
insert(flag,l)
- lines.append(" ".join(l))
+ lines.append(combine(l))
# read the rest
lines.extend(f.readlines())
@@ -396,33 +396,34 @@ def write_use_flags ():
file_cache[file] = lines
else: # in cache
- l = file_cache[file][line-1].split(" ")
+ l = file_cache[file][line-1].split()
if delete:
remove(flag, l)
else:
- insert(flag,l)
- file_cache[file][line-1] = " ".join(l)
+ insert(flag, l)
+ file_cache[file][line-1] = combine(l)
if flagsToAdd:
# write new lines
msg = "\n#portato update#\n"
+ comb = combine(flagsToAdd)
if CONFIG["usePerVersion"]: # add on a per-version-base
- msg += "=%s %s\n" % (cpv, ' '.join(flagsToAdd))
+ msg += "=%s %s" % (cpv, comb)
else: # add on a per-package-base
list = system.split_cpv(cpv)
- msg += "%s/%s %s\n" % (list[0], list[1], ' '.join(flagsToAdd))
+ msg += "%s/%s %s" % (list[0], list[1], combine)
+
if not file in file_cache:
- f = open(file, "a")
- f.write(msg)
- f.close()
+ with open(file, "a") as f:
+ f.write(msg)
else:
file_cache[file].append(msg)
# write to disk
- for file in file_cache.keys():
- f = open(file, "w")
- f.writelines(file_cache[file])
- f.close()
+ for file in file_cache:
+ with open(file, "w") as f:
+ f.writelines(file_cache[file])
+
# reset
useFlags = {}
newUseFlags = {}
diff --git a/portato/backend/package.py b/portato/backend/package.py
index bcc209a..8a80fd5 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -3,7 +3,7 @@
# File: portato/backend/package.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/portage/__init__.py b/portato/backend/portage/__init__.py
index 67eebfa..1daf51b 100644
--- a/portato/backend/portage/__init__.py
+++ b/portato/backend/portage/__init__.py
@@ -3,7 +3,7 @@
# File: portato/backend/portage/__init__.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2007 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 2c913f9..e1813bf 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -222,11 +222,14 @@ class PortagePackage (Package):
continue
if return_blocks:
+ if not blocked:
+ if not system.find_packages(dep, masked = True): continue # well - no packages affected - ignore
+
if with_criterions:
dep_pkgs.append((dep, dep))
else:
dep_pkgs.append(dep)
- else:
+ elif blocked:
raise BlockedException, (self.get_cpv(), blocked[0].get_cpv())
continue # finished with the blocking one -> next
diff --git a/portato/backend/portage/package_22.py b/portato/backend/portage/package_22.py
index 1dae1fe..ed804ce 100644
--- a/portato/backend/portage/package_22.py
+++ b/portato/backend/portage/package_22.py
@@ -3,7 +3,7 @@
# File: portato/backend/portage/package_22.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/portage/sets.py b/portato/backend/portage/sets.py
index 53025ab..dd8257d 100644
--- a/portato/backend/portage/sets.py
+++ b/portato/backend/portage/sets.py
@@ -3,7 +3,7 @@
# File: portato/backend/portage/sets.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2008 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
@@ -52,7 +52,7 @@ class FilterSet (Set):
t = set()
for pkg in self.get_list():
if is_regexp and key:
- if not re.match(key, pkg, re.I): continue
+ if not re.search(key, pkg, re.I): continue
if not with_version:
t.add(portage.dep.dep_getkey(pkg))
@@ -63,12 +63,11 @@ class FilterSet (Set):
class PortageSet (FilterSet):
def __init__ (self, name):
- FilterSet.__init__(self)
debug("Loading portage set '%s'", name)
- self.portageSet = system.settings.setsconfig.getSets()[name]
+ self.name = name
def get_list(self):
- return itt.imap(str, self.portageSet.getAtoms())
+ return itt.imap(str, system.settings.setsconfig.getSetAtoms(self.name))
class SystemSet (FilterSet):
@@ -86,6 +85,9 @@ class WorldSet (FilterSet):
yield cp
class InstalledSet (Set):
+ """For the moment do not use the portage-2.2 @installed set.
+ It only contains the current slot-cps - and to get the cpvs
+ via the PortageSet results in an infinite recursion :(."""
def get_pkgs (self, key, is_regexp, masked, with_version, only_cpv):
if is_regexp:
@@ -95,7 +97,7 @@ class InstalledSet (Set):
t = system.settings.vartree.dbapi.cp_all()
if key:
- t = filter(lambda x: re.match(key, x, re.I), t)
+ t = filter(lambda x: re.search(key, x, re.I), t)
return set(t)
else:
@@ -111,7 +113,7 @@ class TreeSet (Set):
t = system.settings.porttree.dbapi.cp_all()
if key:
- t = filter(lambda x: re.match(key, x, re.I), t)
+ t = filter(lambda x: re.search(key, x, re.I), t)
elif masked:
t = system.settings.porttree.dbapi.xmatch("match-all", key)
diff --git a/portato/backend/portage/settings.py b/portato/backend/portage/settings.py
index 155e847..8211f3b 100644
--- a/portato/backend/portage/settings.py
+++ b/portato/backend/portage/settings.py
@@ -3,7 +3,7 @@
# File: portato/backend/portage/settings.py
# This file is part of the Portato-Project, a graphical portage-frontend.
#
-# Copyright (C) 2006-2007 René 'Necoro' Neumann
+# Copyright (C) 2006-2009 René 'Necoro' Neumann
# This is free software. You may redistribute copies of it under the terms of
# the GNU General Public License version 2.
# There is NO WARRANTY, to the extent permitted by law.
diff --git a/portato/backend/portage/settings_22.py b/portato/backend/portage/settings_22.py
index 5274b3b..bae3424 100644
--- a/portato/backend/portage/settings_22.py
+++ b/portato/backend/portage/settings_22.py
@@ -3,7 +3,7 @@
# File: portato/backend/portage/settings_22.py