summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornecoro <>2007-08-16 15:52:53 +0000
committernecoro <>2007-08-16 15:52:53 +0000
commitb48d1b86ad5dc9ec069be256c37d9571759111b8 (patch)
tree5338c4ba3ad49e7aa8cf85c045d040b1c84d5edc
parenteae9ec73ba26638e25d23ba2261422461150ad73 (diff)
downloadportato-b48d1b86ad5dc9ec069be256c37d9571759111b8.tar.gz
portato-b48d1b86ad5dc9ec069be256c37d9571759111b8.tar.bz2
portato-b48d1b86ad5dc9ec069be256c37d9571759111b8.zip
improved update-world; now showing differences between installed and set use-flags
-rw-r--r--doc/Changelog1
-rw-r--r--doc/TODO1
-rw-r--r--i18n/messages.pot283
-rw-r--r--portato/backend/flags.py3
-rw-r--r--portato/backend/package.py49
-rw-r--r--portato/backend/portage/package.py24
-rw-r--r--portato/backend/portage/system.py35
-rw-r--r--portato/gui/gtk/usetips.py22
-rw-r--r--portato/gui/gtk/windows.py26
-rw-r--r--portato/gui/gtk/wrapper.py17
-rw-r--r--portato/gui/gui_helper.py23
-rw-r--r--portato/gui/templates/portato.glade423
-rw-r--r--portato/gui/wrapper.py6
13 files changed, 473 insertions, 440 deletions
diff --git a/doc/Changelog b/doc/Changelog
index fa48774..64ba911 100644
--- a/doc/Changelog
+++ b/doc/Changelog
@@ -6,6 +6,7 @@ next:
- added splash screen
- added notifies
- added listener / launch gksu/kdesu by ourselves
+- now showing differences between "installed" and "enabled" useflags
0.8.1:
- bugfixes
diff --git a/doc/TODO b/doc/TODO
index e3821d7..c687059 100644
--- a/doc/TODO
+++ b/doc/TODO
@@ -31,7 +31,6 @@ Main Point: user preferences:
GTK:
----
- make oneshot better
-- better infos in queue for "newuse"
Qt (stopped):
---
diff --git a/i18n/messages.pot b/i18n/messages.pot
index bc62feb..d2a0d03 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: 2007-08-11 22:50-0700\n"
+"POT-Creation-Date: 2007-08-16 01:22-0700\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"
@@ -29,28 +29,28 @@ msgid "Re_load Portage"
msgstr ""
#: portato/gui/templates/portato.glade:68
-#: portato/gui/templates/portato.glade:1575
+#: portato/gui/templates/portato.glade:1577
msgid "gtk-quit"
msgstr ""
#: portato/gui/templates/portato.glade:81
-#: portato/gui/templates/portato.glade:514
msgid "_Emerge"
msgstr ""
#: portato/gui/templates/portato.glade:89
-#: portato/gui/templates/portato.glade:719 portato/gui/gtk/windows.py:691
+#: portato/gui/templates/portato.glade:571
+#: portato/gui/templates/portato.glade:721 portato/gui/gtk/windows.py:699
msgid "E_merge"
msgstr ""
#: portato/gui/templates/portato.glade:104
-#: portato/gui/templates/portato.glade:523
-#: portato/gui/templates/portato.glade:728
+#: portato/gui/templates/portato.glade:580
+#: portato/gui/templates/portato.glade:730
msgid "_Unmerge"
msgstr ""
#: portato/gui/templates/portato.glade:118
-#: portato/gui/templates/portato.glade:740
+#: portato/gui/templates/portato.glade:742
msgid "Update _World"
msgstr ""
@@ -62,279 +62,279 @@ msgstr ""
msgid "_Sync"
msgstr ""
-#: portato/gui/templates/portato.glade:155
+#: portato/gui/templates/portato.glade:156
msgid "Save _Flags"
msgstr ""
-#: portato/gui/templates/portato.glade:176
-#: portato/gui/templates/portato.glade:269
-#: portato/gui/templates/portato.glade:1550
+#: portato/gui/templates/portato.glade:177
+#: portato/gui/templates/portato.glade:271
+#: portato/gui/templates/portato.glade:1552
msgid "Emerge _Paused"
msgstr ""
-#: portato/gui/templates/portato.glade:183
-#: portato/gui/templates/portato.glade:251
-#: portato/gui/templates/portato.glade:1557
+#: portato/gui/templates/portato.glade:185
+#: portato/gui/templates/portato.glade:253
+#: portato/gui/templates/portato.glade:1559
msgid "_Kill Emerge"
msgstr ""
-#: portato/gui/templates/portato.glade:206
+#: portato/gui/templates/portato.glade:208
msgid "_Queue"
msgstr ""
-#: portato/gui/templates/portato.glade:214
+#: portato/gui/templates/portato.glade:216
msgid "Oneshot"
msgstr ""
-#: portato/gui/templates/portato.glade:226
+#: portato/gui/templates/portato.glade:228
msgid "_Console"
msgstr ""
-#: portato/gui/templates/portato.glade:234
+#: portato/gui/templates/portato.glade:236
msgid "_Copy"
msgstr ""
-#: portato/gui/templates/portato.glade:280
-#: portato/gui/templates/portato.glade:318
+#: portato/gui/templates/portato.glade:282
+#: portato/gui/templates/portato.glade:320
msgid "_Plugins"
msgstr ""
-#: portato/gui/templates/portato.glade:292
+#: portato/gui/templates/portato.glade:294
msgid "_?"
msgstr ""
-#: portato/gui/templates/portato.glade:300
+#: portato/gui/templates/portato.glade:302
msgid "_About"
msgstr ""
-#: portato/gui/templates/portato.glade:334
+#: portato/gui/templates/portato.glade:336
msgid "Show _Log"
msgstr ""
-#: portato/gui/templates/portato.glade:364
+#: portato/gui/templates/portato.glade:366
msgid "gtk-find"
msgstr ""
-#: portato/gui/templates/portato.glade:461
-msgid "Installed"
-msgstr ""
-
-#: portato/gui/templates/portato.glade:474 portato/gui/gtk/windows.py:668
-#: portato/gui/gtk/windows.py:671 portato/gui/gtk/windows.py:674
-#: portato/gui/gtk/windows.py:773 portato/gui/gtk/windows.py:776
-#: portato/gui/gtk/windows.py:783 portato/gui/gtk/windows.py:787
-msgid "Masked"
+#: portato/gui/templates/portato.glade:474
+msgid "<b>Installed, but not in portage anymore</b>"
msgstr ""
-#: portato/gui/templates/portato.glade:488 portato/gui/gtk/windows.py:681
-#: portato/gui/gtk/windows.py:684 portato/gui/gtk/windows.py:745
-#: portato/gui/gtk/windows.py:750
-msgid "Testing"
+#: portato/gui/templates/portato.glade:553
+msgid "<span foreground='red'><b>MISSING KEYWORD</b></span>"
msgstr ""
-#: portato/gui/templates/portato.glade:535
+#: portato/gui/templates/portato.glade:592
msgid "Re_vert"
msgstr ""
-#: portato/gui/templates/portato.glade:547
+#: portato/gui/templates/portato.glade:604
msgid "E_build"
msgstr ""
-#: portato/gui/templates/portato.glade:568
-msgid "<span foreground='red'><b>MISSING KEYWORD</b></span>"
+#: portato/gui/templates/portato.glade:630 portato/gui/gtk/windows.py:550
+msgid "Installed"
msgstr ""
-#: portato/gui/templates/portato.glade:647
-msgid "<b>Installed, but not in portage anymore</b>"
+#: portato/gui/templates/portato.glade:643 portato/gui/gtk/windows.py:676
+#: portato/gui/gtk/windows.py:679 portato/gui/gtk/windows.py:682
+#: portato/gui/gtk/windows.py:781 portato/gui/gtk/windows.py:784
+#: portato/gui/gtk/windows.py:791 portato/gui/gtk/windows.py:795
+msgid "Masked"
+msgstr ""
+
+#: portato/gui/templates/portato.glade:657 portato/gui/gtk/windows.py:689
+#: portato/gui/gtk/windows.py:692 portato/gui/gtk/windows.py:753
+#: portato/gui/gtk/windows.py:758
+msgid "Testing"
msgstr ""
-#: portato/gui/templates/portato.glade:682 portato/gui/gtk/windows.py:128
+#: portato/gui/templates/portato.glade:684 portato/gui/gtk/windows.py:128
msgid "Package"
msgstr ""
-#: portato/gui/templates/portato.glade:752
+#: portato/gui/templates/portato.glade:754
msgid "_Remove"
msgstr ""
-#: portato/gui/templates/portato.glade:777 portato/gui/gtk/windows.py:998
+#: portato/gui/templates/portato.glade:779 portato/gui/gtk/windows.py:1005
msgid "Queue"
msgstr ""
-#: portato/gui/templates/portato.glade:805 portato/gui/gtk/windows.py:1095
+#: portato/gui/templates/portato.glade:807 portato/gui/gtk/windows.py:1102
msgid "Console"
msgstr ""
-#: portato/gui/templates/portato.glade:835
+#: portato/gui/templates/portato.glade:837
msgid "Portato - A Portage GUI"
msgstr ""
-#: portato/gui/templates/portato.glade:852
+#: portato/gui/templates/portato.glade:854
msgid "Search Results"
msgstr ""
-#: portato/gui/templates/portato.glade:892
-#: portato/gui/templates/portato.glade:1502
-#: portato/gui/templates/portato.glade:1706
+#: portato/gui/templates/portato.glade:894
+#: portato/gui/templates/portato.glade:1504
+#: portato/gui/templates/portato.glade:1705
msgid "gtk-cancel"
msgstr ""
-#: portato/gui/templates/portato.glade:904
+#: portato/gui/templates/portato.glade:906
msgid "gtk-jump-to"
msgstr ""
-#: portato/gui/templates/portato.glade:919
+#: portato/gui/templates/portato.glade:921
msgid "gtk-ok"
msgstr ""
-#: portato/gui/templates/portato.glade:940
+#: portato/gui/templates/portato.glade:942
msgid "Preferences"
msgstr ""
-#: portato/gui/templates/portato.glade:975
+#: portato/gui/templates/portato.glade:977
msgid "Debug"
msgstr ""
-#: portato/gui/templates/portato.glade:988
+#: portato/gui/templates/portato.glade:990
msgid "Browser command: "
msgstr ""
-#: portato/gui/templates/portato.glade:1014
+#: portato/gui/templates/portato.glade:1016
msgid "<b>General Options</b>"
msgstr ""
-#: portato/gui/templates/portato.glade:1064
+#: portato/gui/templates/portato.glade:1066
msgid "<b>Update World Options</b>"
msgstr ""
-#: portato/gui/templates/portato.glade:1092
+#: portato/gui/templates/portato.glade:1094
msgid "Sync command: "
msgstr ""
-#: portato/gui/templates/portato.glade:1113
+#: portato/gui/templates/portato.glade:1115
msgid "<b>Sync Options</b>"
msgstr ""
-#: portato/gui/templates/portato.glade:1154
-msgid "<u><i>Masking Keywords</i></u>"
+#: portato/gui/templates/portato.glade:1166
+msgid "File name to use, if package.use is a directory: "
msgstr ""
-#: portato/gui/templates/portato.glade:1169
-msgid "<u><i>Testing Keywords</i></u>"
+#: portato/gui/templates/portato.glade:1177
+msgid "Add only exact version to package.use"
msgstr ""
-#: portato/gui/templates/portato.glade:1184
-msgid "<u><i>Use-Flags</i></u>"
+#: portato/gui/templates/portato.glade:1190
+msgid "Add only exact version to package.keywords"
msgstr ""
-#: portato/gui/templates/portato.glade:1206
-msgid ""
-"<u>You may use the following placeholders:</u>\n"
-"\n"
-"<i>$(cat)</i>: category\n"
-"<i>$(pkg)</i>: package name\n"
-"<i>$(cat-1)/$(cat-2)</i>: first/second part of the category"
+#: portato/gui/templates/portato.glade:1204
+msgid "File name to use, if package.keywords is a directory: "
msgstr ""
-#: portato/gui/templates/portato.glade:1230
-msgid "Add only exact version to package.mask/package.unmask"
+#: portato/gui/templates/portato.glade:1238
+msgid "File name to use, if package.mask/package.unmask is a directory: "
msgstr ""
-#: portato/gui/templates/portato.glade:1244
-msgid "File name to use, if package.mask/package.unmask is a directory: "
+#: portato/gui/templates/portato.glade:1249
+msgid "Add only exact version to package.mask/package.unmask"
msgstr ""
-#: portato/gui/templates/portato.glade:1278
-msgid "File name to use, if package.keywords is a directory: "
+#: portato/gui/templates/portato.glade:1271
+msgid ""
+"<u>You may use the following placeholders:</u>\n"
+"\n"
+"<i>$(cat)</i>: category\n"
+"<i>$(pkg)</i>: package name\n"
+"<i>$(cat-1)/$(cat-2)</i>: first/second part of the category"
msgstr ""
-#: portato/gui/templates/portato.glade:1289
-msgid "Add only exact version to package.keywords"
+#: portato/gui/templates/portato.glade:1297
+msgid "<u><i>Use-Flags</i></u>"
msgstr ""
-#: portato/gui/templates/portato.glade:1302
-msgid "Add only exact version to package.use"
+#: portato/gui/templates/portato.glade:1312
+msgid "<u><i>Testing Keywords</i></u>"
msgstr ""
-#: portato/gui/templates/portato.glade:1316
-msgid "File name to use, if package.use is a directory: "
+#: portato/gui/templates/portato.glade:1327
+msgid "<u><i>Masking Keywords</i></u>"
msgstr ""
-#: portato/gui/templates/portato.glade:1342
+#: portato/gui/templates/portato.glade:1344
msgid "<b>Use Flag and Keyword Options</b>"
msgstr ""
-#: portato/gui/templates/portato.glade:1363
+#: portato/gui/templates/portato.glade:1365
msgid "General"
msgstr ""
-#: portato/gui/templates/portato.glade:1387
+#: portato/gui/templates/portato.glade:1389
msgid "Show emerge progress in title - similar to the console tab"
msgstr ""
-#: portato/gui/templates/portato.glade:1398
+#: portato/gui/templates/portato.glade:1400
msgid "Turn Use-Tips on"
msgstr ""
-#: portato/gui/templates/portato.glade:1412
+#: portato/gui/templates/portato.glade:1414
msgid "Enable systray"
msgstr ""
-#: portato/gui/templates/portato.glade:1426
+#: portato/gui/templates/portato.glade:1428
msgid "Hide on minimization (only if systray is enabled)"
msgstr ""
-#: portato/gui/templates/portato.glade:1445
+#: portato/gui/templates/portato.glade:1447
msgid "Console Font"
msgstr ""
-#: portato/gui/templates/portato.glade:1455
+#: portato/gui/templates/portato.glade:1457
msgid "Chose a console font"
msgstr ""
-#: portato/gui/templates/portato.glade:1483
+#: portato/gui/templates/portato.glade:1485
msgid "Visual"
msgstr ""
-#: portato/gui/templates/portato.glade:1511
-#: portato/gui/templates/portato.glade:1718
+#: portato/gui/templates/portato.glade:1513
+#: portato/gui/templates/portato.glade:1717
msgid "gtk-apply"
msgstr ""
-#: portato/gui/templates/portato.glade:1584
+#: portato/gui/templates/portato.glade:1586
msgid "Updateble Packages"
msgstr ""
-#: portato/gui/templates/portato.glade:1619
+#: portato/gui/templates/portato.glade:1618
msgid "_Close"
msgstr ""
-#: portato/gui/templates/portato.glade:1631
+#: portato/gui/templates/portato.glade:1630
msgid "Select _All"
msgstr ""
-#: portato/gui/templates/portato.glade:1646
+#: portato/gui/templates/portato.glade:1645
msgid "_Install Selected"
msgstr ""
-#: portato/gui/templates/portato.glade:1667
+#: portato/gui/templates/portato.glade:1666
msgid "Plugins"
msgstr ""
-#: portato/gui/templates/portato.glade:1739
+#: portato/gui/templates/portato.glade:1738
msgid "About Portato"
msgstr ""
-#: portato/gui/templates/portato.glade:1749
+#: portato/gui/templates/portato.glade:1748
msgid ""
"This software is licensed under the terms of the GPLv2.\n"
"Copyright (C) 2006-2007 René 'Necoro' Neumann <necoro@necoro.net>"
msgstr ""
-#: portato/gui/templates/portato.glade:1751
+#: portato/gui/templates/portato.glade:1750
msgid "A Portage GUI"
msgstr ""
-#: portato/gui/templates/portato.glade:1782
+#: portato/gui/templates/portato.glade:1785
msgid "Logging Output"
msgstr ""
@@ -376,7 +376,7 @@ msgid "Authors"
msgstr ""
#: portato/gui/gtk/windows.py:81 portato/gui/gtk/windows.py:127
-#: portato/gui/gtk/windows.py:542
+#: portato/gui/gtk/windows.py:549
msgid "Enabled"
msgstr ""
@@ -388,65 +388,65 @@ msgstr ""
msgid "<no description>"
msgstr ""
-#: portato/gui/gtk/windows.py:524
+#: portato/gui/gtk/windows.py:527
msgid "This is an expanded use flag and cannot be selected"
msgstr ""
-#: portato/gui/gtk/windows.py:543
+#: portato/gui/gtk/windows.py:551
msgid "Flag"
msgstr ""
-#: portato/gui/gtk/windows.py:544
+#: portato/gui/gtk/windows.py:552
msgid "Description"
msgstr ""
-#: portato/gui/gtk/windows.py:623
+#: portato/gui/gtk/windows.py:631
#, python-format
msgid "Package could not be found: %s"
msgstr ""
-#: portato/gui/gtk/windows.py:694
+#: portato/gui/gtk/windows.py:702
msgid "Re_merge"
msgstr ""
-#: portato/gui/gtk/windows.py:885
+#: portato/gui/gtk/windows.py:893
msgid "Creating Database"
msgstr ""
-#: portato/gui/gtk/windows.py:890
+#: portato/gui/gtk/windows.py:898
msgid "Loading Config"
msgstr ""
-#: portato/gui/gtk/windows.py:901
+#: portato/gui/gtk/windows.py:909
msgid "Loading Plugins"
msgstr ""
-#: portato/gui/gtk/windows.py:914
+#: portato/gui/gtk/windows.py:922
msgid "Finishing startup"
msgstr ""
-#: portato/gui/gtk/windows.py:1001
+#: portato/gui/gtk/windows.py:1008
msgid "Options"
msgstr ""
-#: portato/gui/gtk/windows.py:1019
+#: portato/gui/gtk/windows.py:1026
msgid "Categories"
msgstr ""
-#: portato/gui/gtk/windows.py:1034
+#: portato/gui/gtk/windows.py:1041
msgid "Packages"
msgstr ""
-#: portato/gui/gtk/windows.py:1097
+#: portato/gui/gtk/windows.py:1104
#, python-format
msgid "Console (%(title)s)"
msgstr ""
-#: portato/gui/gtk/windows.py:1149
+#: portato/gui/gtk/windows.py:1156
msgid "use flags"
msgstr ""
-#: portato/gui/gtk/windows.py:1156
+#: portato/gui/gtk/windows.py:1163
msgid "masking keywords"
msgstr ""
@@ -467,6 +467,19 @@ msgstr ""
msgid "updating"
msgstr ""
+#: portato/gui/gtk/wrapper.py:49
+#, python-format
+msgid "downgrading from version %s"
+msgstr ""
+
+#: portato/gui/gtk/wrapper.py:51
+msgid "downgrading"
+msgstr ""
+
+#: portato/gui/gtk/wrapper.py:55
+msgid "IUSE changes:"
+msgstr ""
+
#: portato/gui/gtk/dialogs.py:17
msgid ""
"There are some packages in the emerge queue and/or an emerge process is "
@@ -567,18 +580,18 @@ msgstr ""
msgid "No best match for %s. It seems not to be in the tree anymore."
msgstr ""
-#: portato/backend/portage/system.py:343
+#: portato/backend/portage/system.py:350
#, python-format
msgid "Found a not installed dependency: %s."
msgstr ""
-#: portato/backend/portage/system.py:383
+#: portato/backend/portage/system.py:386
#, python-format
msgid ""
"Bug? No best match could be found for '%(package)s'. Needed by: '%(cpv)s'."
msgstr ""
-#: portato/backend/flags.py:482
+#: portato/backend/flags.py:483
#, python-format
msgid "Conflicting values for masking status: %s"
msgstr ""
@@ -638,48 +651,48 @@ msgstr ""
msgid "Listener has not been started."
msgstr ""
-#: portato.py:40
+#: portato.py:39
msgid "runs pychecker (should only be used by developers)"
msgstr ""
-#: portato.py:43
+#: portato.py:42
#, python-format
msgid "the frontend to use - possible values are: %s [default: %%default]"
msgstr ""
-#: portato.py:46
+#: portato.py:45
msgid "opens the ebuild viewer instead of launching Portato"
msgstr ""
-#: portato.py:49
+#: portato.py:48
msgid "validates the given plugin xml instead of launching Portato"
msgstr ""
-#: portato.py:52
+#: portato.py:51
msgid "do not start listener"
msgstr ""
-#: portato.py:65
+#: portato.py:64
#, python-format
msgid "Unknown frontend '%(frontend)s'. Correct frontends are: %(list)s"
msgstr ""
-#: portato.py:73
+#: portato.py:72
#, python-format
msgid ""
"'%(frontend)s' should be installed, but cannot be imported. This is "
"definitly a bug. (%(error)s)"
msgstr ""
-#: portato.py:83
+#: portato.py:82
#, python-format
msgid "Validation failed. XML syntax error: %s."
msgstr ""
-#: portato.py:86
+#: portato.py:85
msgid "Validation failed. Does not comply with schema."
msgstr ""
-#: portato.py:89
+#: portato.py:88
msgid "Validation succeeded."
msgstr ""
diff --git a/portato/backend/flags.py b/portato/backend/flags.py
index dd1e462..99ff56f 100644
--- a/portato/backend/flags.py
+++ b/portato/backend/flags.py
@@ -382,6 +382,7 @@ def write_use_flags ():
# reset
useFlags = {}
newUseFlags = {}
+ system.reload_settings()
### MASKING PART ###
new_masked = {}
@@ -586,6 +587,7 @@ def write_masked ():
# reset
new_masked = {}
new_unmasked = {}
+ system.reload_settings()
### TESTING PART ###
newTesting = {}
@@ -704,3 +706,4 @@ def write_testing ():
f.close()
# reset
newTesting = {}
+ system.reload_settings()
diff --git a/portato/backend/package.py b/portato/backend/package.py
index ef0be11..343dc51 100644
--- a/portato/backend/package.py
+++ b/portato/backend/package.py
@@ -74,7 +74,7 @@ class Package (object):
if self.is_installed():
uses = set(self.get_use_flags().split()) # all set at installation time
- iuses = set(self.get_all_use_flags(installed=True)) # all you can set for the package
+ iuses = set(self.get_iuse_flags(installed=True)) # all you can set for the package
return list(uses.intersection(iuses))
else:
@@ -89,23 +89,22 @@ class Package (object):
return flags.get_new_use_flags(self)
def get_actual_use_flags (self):
- """This returns the result of installed_use_flags + new_use_flags. If the package is not installed, it returns only the new flags.
+ """This returns all currently set use-flags including the new ones.
@return: list of flags
@rtype: string[]"""
- if self.is_installed():
- i_flags = self.get_installed_use_flags()
- for f in self.get_new_use_flags():
-
+ i_flags = self.get_global_settings("USE").split()
+ for f in self.get_new_use_flags():
+
+ if f[0] == '-':
if flags.invert_use_flag(f) in i_flags:
i_flags.remove(flags.invert_use_flag(f))
-
- elif f not in i_flags:
- i_flags.append(f)
- return i_flags
- else:
- return self.get_new_use_flags()
+
+ elif f not in i_flags:
+ i_flags.append(f)
+
+ return i_flags
def set_use_flag (self, flag):
"""Set a use-flag.
@@ -120,28 +119,6 @@ class Package (object):
flags.remove_new_use_flags(self)
- def is_use_flag_enabled (self, flag):
- """Looks whether a given useflag is enabled for the package, taking all options
- (ie. even the new flags) into account.
-
- @param flag: the flag to check
- @type flag: string
- @returns: True or False
- @rtype: bool"""
-
- if self.is_installed() and flag in self.get_actual_use_flags(): # flags set during install
- return True
-
- elif (not self.is_installed()) and flag in self.get_global_settings("USE").split() \
- and not flags.invert_use_flag(flag) in self.get_new_use_flags(): # flags that would be set
- return True
-
- elif flag in self.get_new_use_flags():
- return True
-
- else:
- return False
-
def use_expanded (self, flag, suggest = None):
"""Tests whether a useflag is an expanded one. If it is, this method returns the USE_EXPAND-value.
@@ -156,7 +133,7 @@ class Package (object):
if flag.startswith(suggest.lower()):
return suggest
- for exp in self.get_global_settings("USE_EXPAND").split(" "):
+ for exp in self.get_global_settings("USE_EXPAND").split():
lexp = exp.lower()
if flag.startswith(lexp):
return exp
@@ -290,7 +267,7 @@ class Package (object):
@returns: the reason for masking the package
@rtype: string"""
- def get_all_use_flags (self, installed = False):
+ def get_iuse_flags (self, installed = False):
"""Returns a list of _all_ useflags for this package, i.e. all useflags you can set for this package.
@param installed: do not take the ones stated in the ebuild, but the ones it has been installed with
diff --git a/portato/backend/portage/package.py b/portato/backend/portage/package.py
index 7ab1713..65522ec 100644
--- a/portato/backend/portage/package.py
+++ b/portato/backend/portage/package.py
@@ -124,7 +124,7 @@ class PortagePackage (Package):
else:
return reason
- def get_all_use_flags (self, installed = False):
+ def get_iuse_flags (self, installed = False):
if installed or not self.is_in_system():
tree = self._settings.vartree
else:
@@ -134,22 +134,13 @@ class PortagePackage (Package):
def get_matched_dep_packages (self, depvar):
# change the useflags, because we have internally changed some, but not made them visible for portage
- newUseFlags = self.get_new_use_flags()
- actual = self.get_global_settings("USE").split()
- if newUseFlags:
- for u in newUseFlags:
- if u[0] == "-" and flags.invert_use_flag(u) in actual:
- actual.remove(flags.invert_use_flag(u))
- elif u not in actual:
- actual.append(u)
+ actual = self.get_actual_use_flags()
depstring = ""
for d in depvar:
- depstring += self.get_package_settings(d)+" "
+ depstring += self.get_package_settings(d, tree = self._settings.porttree)+" "
- portage_dep._dep_check_strict = False
deps = portage.dep_check(depstring, None, self._settings.settings, myuse = actual, trees = self._trees)
- portage_dep._dep_check_strict = True
if not deps: # FIXME: what is the difference to [1, []] ?
return []
@@ -171,14 +162,7 @@ class PortagePackage (Package):
dep_pkgs = [] # the package list
# change the useflags, because we have internally changed some, but not made them visible for portage
- newUseFlags = self.get_new_use_flags()
- actual = self.get_global_settings("USE").split()
- if newUseFlags:
- for u in newUseFlags:
- if u[0] == "-" and flags.invert_use_flag(u) in actual:
- actual.remove(flags.invert_use_flag(u))
- elif u not in actual:
- actual.append(u)
+ actual = self.get_actual_use_flags()
depstring = ""
for d in depvar:
diff --git a/portato/backend/portage/system.py b/portato/backend/portage/system.py
index c40473e..f6b2a3b 100644
--- a/portato/backend/portage/system.py
+++ b/portato/backend/portage/system.py
@@ -323,11 +323,19 @@ class PortageSystem (SystemInterface):
checked = []
updating = []
- raw_checked = []
+ raw_checked = {}
def check (p, add_not_installed = True):
"""Checks whether a package is updated or not."""
- if p.get_cp() in checked: return
- else: checked.append(p.get_cp())
+
+ if p.get_slot_cp() in checked:
+ return
+ else:
+ if (not p.is_installed()) and (not add_not_installed):
+ # don't add these packages to checked as we may see them again
+ # - and then we might have add_not_installed being True
+ return
+ else:
+ checked.append(p.get_slot_cp())
appended = False
tempDeep = False
@@ -339,11 +347,9 @@ class PortageSystem (SystemInterface):
else:
oldList = self.sort_package_list(self.find_installed_packages(p.get_cp()))
if not oldList:
- if add_not_installed:
- info(_("Found a not installed dependency: %s.") % p.get_cpv())
- oldList = [p]
- else:
- return
+ info(_("Found a not installed dependency: %s.") % p.get_cpv())
+ oldList = [p]
+
old = oldList[-1]
updating.append((p, old))
@@ -352,8 +358,8 @@ class PortageSystem (SystemInterface):
if newuse and p.is_installed() and p.is_in_system(): # there is no use to check newuse for a package which is not existing in portage anymore :)
- new_iuse = set(p.get_all_use_flags(installed = False)) # IUSE in the ebuild
- old_iuse = set(p.get_all_use_flags(installed = True)) # IUSE in the vardb
+ new_iuse = set(p.get_iuse_flags(installed = False)) # IUSE in the ebuild
+ old_iuse = set(p.get_iuse_flags(installed = True)) # IUSE in the vardb
if new_iuse.symmetric_difference(old_iuse): # difference between new_iuse and old_iuse
tempDeep = True
@@ -362,10 +368,7 @@ class PortageSystem (SystemInterface):
appended = True
else:
- old = set(p.get_installed_use_flags())
- new = set(p.get_global_settings("USE").split())
-
- if new_iuse.intersection(new) != old_iuse.intersection(old):
+ if new_iuse.intersection(p.get_actual_use_flags()).symmetric_difference(p.get_installed_use_flags()):
tempDeep = True
if not appended:
updating.append((p,p))
@@ -376,8 +379,8 @@ class PortageSystem (SystemInterface):
for state in states:
for i in p.get_matched_dep_packages(state[0]):
- if i not in raw_checked:
- raw_checked.append(i)
+ if i not in raw_checked or raw_checked[i] == False:
+ raw_checked.update({i : state[1]})
bm = self.get_new_packages([i])
if not bm:
warning(_("Bug? No best match could be found for '%(package)s'. Needed by: '%(cpv)s'."), {"package" : i, "cpv": p.get_cpv()})
diff --git a/portato/gui/gtk/usetips.py b/portato/gui/gtk/usetips.py
index 1d8ce20..2c51d88 100644
--- a/portato/gui/gtk/usetips.py
+++ b/portato/gui/gtk/usetips.py
@@ -53,21 +53,35 @@ class UseTips (TreeViewTooltips):
disabled = []
expanded = set()
- pkg_flags = pkg.get_all_use_flags()
+ pkg_flags = pkg.get_iuse_flags()
if not pkg_flags: # no flags - stop here
return None
pkg_flags.sort()
+ actual = pkg.get_actual_use_flags()
+
+ if pkg.is_installed():
+ installed = pkg.get_installed_use_flags()
+ else:
+ inst = system.find_installed_packages(pkg.get_slot_cp())
+ if inst:
+ installed = inst[0].get_installed_use_flags()
+ else:
+ installed = []
+
for use in pkg_flags:
exp = pkg.use_expanded(use)
if exp:
expanded.add(exp)
else:
- if pkg.is_use_flag_enabled(use):
- enabled.append(use)
+ useStr = use
+ if installed and ((use in actual) != (use in installed)):
+ useStr += " %"
+ if use in actual:
+ enabled.append(useStr)
else:
- disabled.append(use)
+ disabled.append(useStr)
string = ""
diff --git a/portato/gui/gtk/windows.py b/portato/gui/gtk/windows.py
index c0037af..bf6f0f7 100644
--- a/portato/gui/gtk/windows.py
+++ b/portato/gui/gtk/windows.py
@@ -509,41 +509,49 @@ class PackageTable:
def fill_use_list(self):
pkg = self.actual_package()
- pkg_flags = pkg.get_all_use_flags()
+ pkg_flags = pkg.get_iuse_flags()
pkg_flags.sort()
actual_exp = None
actual_exp_it = None
+ euse = pkg.get_actual_use_flags()
+ instuse = pkg.get_installed_use_flags()
+
store = self.useList.get_model()
for use in pkg_flags:
exp = pkg.use_expanded(use, suggest = actual_exp)
if exp is not None:
if exp != actual_exp:
- actual_exp_it = store.append(None, [None, exp, "<i>%s</i>" % _("This is an expanded use flag and cannot be selected")])
+ actual_exp_it = store.append(None, [None, None, exp, "<i>%s</i>" % _("This is an expanded use flag and cannot be selected")])
actual_exp = exp
else:
actual_exp_it = None
actual_exp = None
- store.append(actual_exp_it, [pkg.is_use_flag_enabled(use), use, system.get_use_desc(use, self.cp)])
+ enabled = use in euse
+ installed = use in instuse
+ store.append(actual_exp_it, [enabled, installed, use, system.get_use_desc(use, self.cp)])
def build_use_list (self):
"""Builds the useList."""
- store = gtk.TreeStore(bool, str, str)
+ store = gtk.TreeStore(bool, bool, str, str)
self.useList.set_model(store)
# build view
cell = gtk.CellRendererText()
+ iCell = gtk.CellRendererToggle()
+ iCell.set_property("activatable", False)
tCell = gtk.CellRendererToggle()
tCell.set_property("activatable", True)
tCell.connect("toggled", self.cb_use_flag_toggled, store)
self.useList.append_column(gtk.TreeViewColumn(_("Enabled"), tCell, active = 0))
- self.useList.append_column(gtk.TreeViewColumn(_("Flag"), cell, text = 1))
- self.useList.append_column(gtk.TreeViewColumn(_("Description"), cell, markup = 2))
+ self.useList.append_column(gtk.TreeViewColumn(_("Installed"), iCell, active = 1))
+ self.useList.append_column(gtk.TreeViewColumn(_("Flag"), cell, text = 2))
+ self.useList.append_column(gtk.TreeViewColumn(_("Description"), cell, markup = 3))
- self.useList.set_search_column(1)
+ self.useList.set_search_column(2)
self.useList.set_enable_tree_lines(True)
def build_vers_list (self):
@@ -793,10 +801,10 @@ class PackageTable:
def cb_use_flag_toggled (self, cell, path, store):
"""Callback for a toggled use-flag button."""
- flag = store[path][1]
+ flag = store[path][2]
pkg = self.actual_package()
- if flag in pkg.get_global_settings("USE_EXPAND").split(" "): # ignore expanded flags
+ if flag in pkg.get_global_settings("USE_EXPAND").split(): # ignore expanded flags
return False
store[path][0] = not store[path][0]
diff --git a/portato/gui/gtk/wrapper.py b/portato/gui/gtk/wrapper.py
index 286cffd..f085efa 100644
--- a/portato/gui/gtk/wrapper.py
+++ b/portato/gui/gtk/wrapper.py
@@ -30,19 +30,32 @@ class GtkTree (Tree):
self.emergeIt = self.append(None, ["Emerge", ""])
self.unmergeIt = self.append(None, ["Unmerge", ""])
- def build_append_value (self, cpv, oneshot = False, update = False, version = None):
+ def build_append_value (self, cpv, oneshot = False, update = False, downgrade = False, version = None, useChange = []):
string = ""
if oneshot:
string += "<i>%s</i>" % _("oneshot")
- if update: string += "; "
if update:
+ if oneshot: string += "; "
if version is not None:
string += "<i>%s</i>" % (_("updating from version %s") % version)
else:
string += "<i>%s</i>" % _("updating")
+ elif downgrade:
+ if oneshot: string += "; "
+ if version is not None:
+ string += "<i>%s</i>" % (_("downgrading from version %s") % version)
+ else:
+ string += "<i>%s</i>" % _("downgrading")
+
+ if useChange:
+ if update or downgrade or oneshot: string += "; "
+ string += "<i><b>%s </b></i>" % _("IUSE changes:")
+ useChange.sort()
+ string += "<i>%s</i>" % " ".join(useChange)
+
return [cpv, string]
def get_emerge_it (self):
diff --git a/portato/gui/gui_helper.py b/portato/gui/gui_helper.py
index 507fa41..110b241 100644
--- a/portato/gui/gui_helper.py
+++ b/portato/gui/gui_helper.py
@@ -354,15 +354,32 @@ class EmergeQueue:
# try to find an already installed instance
update = False
+ downgrade = False
uVersion = None
+ changedUse = []
try:
pkg = self._get_pkg_from_cpv(cpv, unmask)
if not pkg.is_installed():
old = system.find_installed_packages(pkg.get_slot_cp())
if old:
old = old[0] # assume we have only one there
- update = True
- uVersion = old.get_version()
+ cmp = pkg.compare_version(old)
+ if cmp > 0:
+ update = True
+ elif cmp < 0:
+ downgrade = True
+
+ if cmp != 0:
+ uVersion = old.get_version()
+
+ old_iuse = set(old.get_iuse_flags())
+ new_iuse = set(pkg.get_iuse_flags())
+
+ for i in old_iuse.difference(new_iuse):
+ changedUse.append("-"+i)
+
+ for i in new_iuse.difference(old_iuse):
+ changedUse.append("+"+i)
except backend.PackageNotFoundException, e: # package not found / package is masked -> delete current tree and re-raise the exception
if self.tree.iter_has_parent(it):
@@ -372,7 +389,7 @@ class EmergeQueue:
raise
# add iter
- subIt = self.tree.append(it, self.tree.build_append_value(cpv, oneshot = oneshot, update = update, version = uVersion))
+ subIt = self.tree.append(it, self.tree.build_append_value(cpv, oneshot = oneshot, update = update, downgrade = downgrade, version = uVersion, useChange = changedUse))
self.iters.update({cpv: subIt})
# get dependencies
diff --git a/portato/gui/templates/portato.glade b/portato/gui/templates/portato.glade
index ec4ae9d..c7598b4 100644
--- a/portato/gui/templates/portato.glade
+++ b/portato/gui/templates/portato.glade
@@ -452,54 +452,109 @@
<property name="n_rows">5</property>
<property name="n_columns">3</property>
<child>
- <widget class="GtkHBox" id="checkHB">
+ <widget class="GtkHBox" id="pkgLinkBox">
<property name="visible">True</property>
- <property name="spacing">1</property>
- <property name="homogeneous">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<child>
- <widget class="GtkCheckButton" id="installedCheck">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Installed</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="button_press_event" handler="cb_button_pressed"/>
- </widget>
- <packing>
- <property name="fill">False</property>
- </packing>
+ <placeholder/>
</child>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="x_options">GTK_EXPAND</property>
+ <property name="y_options"></property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="notInSysLabel">
+ <property name="visible">True</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">&lt;b&gt;Installed, but not in portage anymore&lt;/b&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
+ <property name="y_options">GTK_FILL</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkHBox" id="hbox2">
+ <property name="visible">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="spacing">5</property>
<child>
- <widget class="GtkCheckButton" id="maskedCheck">
+ <widget class="GtkScrolledWindow" id="versionListScroll">
<property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Masked</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="cb_masked_toggled"/>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="versionList">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
+ <property name="headers_clickable">True</property>
+ <property name="show_expanders">False</property>
+ <signal name="cursor_changed" handler="cb_vers_list_changed"/>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="fill">False</property>
- <property name="position">1</property>
+ <property name="expand">False</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="testingCheck">
+ <widget class="GtkScrolledWindow" id="useListScroll">
<property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">Testing</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
- <signal name="toggled" handler="cb_testing_toggled"/>
+ <property name="can_focus">False</property>
+ <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
+ <child>
+ <widget class="GtkTreeView" id="useList">
+ <property name="visible">True</property>
+ </widget>
+ </child>
</widget>
<packing>
- <property name="fill">False</property>
- <property name="position">2</property>
+ <property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="right_attach">3</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
+ <property name="x_padding">5</property>
+ <property name="y_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="descLabel">
+ <property name="visible">True</property>
+ <property name="justify">GTK_JUSTIFY_CENTER</property>
+ <property name="wrap">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
+ <property name="x_options">GTK_FILL</property>
+ <property name="y_options"></property>
+ <property name="y_padding">10</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="missingLabel">
+ <property name="visible">True</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">&lt;span foreground='red'&gt;&lt;b&gt;MISSING KEYWORD&lt;/b&gt;&lt;/span&gt;</property>
+ <property name="use_markup">True</property>
+ </widget>
+ <packing>
+ <property name="right_attach">3</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
<property name="y_options">GTK_FILL</property>
@@ -564,90 +619,51 @@
</packing>
</child>
<child>
- <widget class="GtkLabel" id="missingLabel">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">&lt;span foreground='red'&gt;&lt;b&gt;MISSING KEYWORD&lt;/b&gt;&lt;/span&gt;</property>
- <property name="use_markup">True</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="y_options">GTK_FILL</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="descLabel">
- <property name="visible">True</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">True</property>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="x_options">GTK_FILL</property>
- <property name="y_options"></property>
- <property name="y_padding">10</property>
- </packing>
- </child>
- <child>
- <widget class="GtkHBox" id="hbox2">
+ <widget class="GtkHBox" id="checkHB">
<property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="spacing">5</property>
+ <property name="spacing">1</property>
+ <property name="homogeneous">True</property>
<child>
- <widget class="GtkScrolledWindow" id="versionListScroll">
+ <widget class="GtkCheckButton" id="installedCheck">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="hscrollbar_policy">GTK_POLICY_NEVER</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="versionList">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <property name="headers_clickable">True</property>
- <property name="show_expanders">False</property>
- <signal name="cursor_changed" handler="cb_vers_list_changed"/>
- </widget>
- </child>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Installed</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="button_press_event" handler="cb_button_pressed"/>
</widget>
<packing>
- <property name="expand">False</property>
+ <property name="fill">False</property>
</packing>
</child>
<child>
- <widget class="GtkScrolledWindow" id="useListScroll">
+ <widget class="GtkCheckButton" id="maskedCheck">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <child>
- <widget class="GtkTreeView" id="useList">
- <property name="visible">True</property>
- </widget>
- </child>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Masked</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="cb_masked_toggled"/>
</widget>
<packing>
+ <property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_padding">5</property>
- <property name="y_padding">5</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="notInSysLabel">
- <property name="visible">True</property>
- <property name="no_show_all">True</property>
- <property name="label" translatable="yes">&lt;b&gt;Installed, but not in portage anymore&lt;/b&gt;</property>
- <property name="use_markup">True</property>
+ <child>
+ <widget class="GtkCheckButton" id="testingCheck">
+ <property name="visible">True</property>
+ <property name="no_show_all">True</property>
+ <property name="label" translatable="yes">Testing</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
+ <signal name="toggled" handler="cb_testing_toggled"/>
+ </widget>
+ <packing>
+ <property name="fill">False</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="right_attach">3</property>
@@ -656,22 +672,6 @@
<property name="y_options">GTK_FILL</property>
</packing>
</child>
- <child>
- <widget class="GtkHBox" id="pkgLinkBox">
- <property name="visible">True</property>
- <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
- <child>
- <placeholder/>
- </child>
- </widget>
- <packing>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">GTK_EXPAND</property>
- <property name="y_options"></property>
- </packing>
- </child>
</widget>
<packing>
<property name="tab_expand">False</property>
@@ -1149,189 +1149,189 @@
<placeholder/>
</child>
<child>
- <widget class="GtkLabel" id="maskLabel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Masking Keywords&lt;/i&gt;&lt;/u&gt;</property>
- <property name="use_markup">True</property>
- <property name="single_line_mode">True</property>
- </widget>
- <packing>
- <property name="top_attach">7</property>
- <property name="bottom_attach">8</property>
- <property name="y_padding">5</property>
- </packing>
- </child>
- <child>
- <widget class="GtkLabel" id="testLabel">
+ <widget class="GtkEntry" id="useFileEdit">
<property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Testing Keywords&lt;/i&gt;&lt;/u&gt;</property>
- <property name="use_markup">True</property>
- <property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">4</property>
- <property name="bottom_attach">5</property>
- <property name="y_padding">5</property>
+ <property name="left_attach">1</property>
+ <property name="right_attach">2</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="useLabel">
+ <widget class="GtkLabel" id="useEditLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="xpad">5</property>
- <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Use-Flags&lt;/i&gt;&lt;/u&gt;</property>
- <property name="use_markup">True</property>
+ <property name="label" translatable="yes">File name to use, if package.use is a directory: </property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="y_padding">6</property>
+ <property name="top_attach">3</property>
+ <property name="bottom_attach">4</property>
</packing>
</child>
<child>
- <widget class="GtkEventBox" id="hintEB">
+ <widget class="GtkCheckButton" id="usePerVersionCheck">
<property name="visible">True</property>
- <child>
- <widget class="GtkFrame" id="hintFrame">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <child>
- <widget class="GtkLabel" id="hintLabel">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">&lt;u&gt;You may use the following placeholders:&lt;/u&gt;
-
-&lt;i&gt;$(cat)&lt;/i&gt;: category
-&lt;i&gt;$(pkg)&lt;/i&gt;: package name
-&lt;i&gt;$(cat-1)/$(cat-2)&lt;/i&gt;: first/second part of the category</property>
- <property name="use_markup">True</property>
- </widget>
- </child>
- <child>
- <placeholder/>
- <packing>
- <property name="type">label_item</property>
- </packing>
- </child>
- </widget>
- </child>
+ <property name="label" translatable="yes">Add only exact version to package.use</property>
+ <property name="response_id">0</property>
+ <property name="draw_indicator">True</property>
</widget>
<packing>
<property name="right_attach">2</property>
+ <property name="top_attach">2</property>
+ <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="maskPerVersionCheck">
+ <widget class="GtkCheckButton" id="testPerVersionCheck">
<property name="visible">True</property>
- <property name="label" translatable="yes">Add only exact version to package.mask/package.unmask</property>
+ <property name="label" translatable="yes">Add only exact version to package.keywords</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">8</property>
- <property name="bottom_attach">9</property>
+ <property name="top_attach">5</property>
+ <property name="bottom_attach">6</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="maskEditLabel">
+ <widget class="GtkLabel" id="testEditLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">File name to use, if package.mask/package.unmask is a directory: </property>
+ <property name="label" translatable="yes">File name to use, if package.keywords is a directory: </property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="maskFileEdit">
+ <widget class="GtkEntry" id="testFileEdit">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">9</property>
- <property name="bottom_attach">10</property>
+ <property name="top_attach">6</property>
+ <property name="bottom_attach">7</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="testFileEdit">
+ <widget class="GtkEntry" id="maskFileEdit">
<property name="visible">True</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="testEditLabel">
+ <widget class="GtkLabel" id="maskEditLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">File name to use, if package.keywords is a directory: </property>
+ <property name="label" translatable="yes">File name to use, if package.mask/package.unmask is a directory: </property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">6</property>
- <property name="bottom_attach">7</property>
+ <property name="top_attach">9</property>
+ <property name="bottom_attach">10</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="testPerVersionCheck">
+ <widget class="GtkCheckButton" id="maskPerVersionCheck">
<property name="visible">True</property>
- <property name="label" translatable="yes">Add only exact version to package.keywords</property>
+ <property name="label" translatable="yes">Add only exact version to package.mask/package.unmask</property>
<property name="response_id">0</property>
<property name="draw_indicator">True</property>
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">5</property>
- <property name="bottom_attach">6</property>
+ <property name="top_attach">8</property>
+ <property name="bottom_attach">9</property>
</packing>
</child>
<child>
- <widget class="GtkCheckButton" id="usePerVersionCheck">
+ <widget class="GtkEventBox" id="hintEB">
<property name="visible">True</property>
- <property name="label" translatable="yes">Add only exact version to package.use</property>
- <property name="response_id">0</property>
- <property name="draw_indicator">True</property>
+ <child>
+ <widget class="GtkFrame" id="hintFrame">
+ <property name="visible">True</property>
+ <property name="label_xalign">0</property>
+ <property name="shadow_type">GTK_SHADOW_OUT</property>
+ <child>
+ <widget class="GtkLabel" id="hintLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">&lt;u&gt;You may use the following placeholders:&lt;/u&gt;
+
+&lt;i&gt;$(cat)&lt;/i&gt;: category
+&lt;i&gt;$(pkg)&lt;/i&gt;: package name
+&lt;i&gt;$(cat-1)/$(cat-2)&lt;/i&gt;: first/second part of the category</property>
+ <property name="use_markup">True</property>
+ </widget>
+ </child>
+ <child>
+ <placeholder/>
+ <packing>
+ <property name="type">label_item</property>
+ </packing>
+ </child>
+ </widget>
+ </child>
</widget>
<packing>
<property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
</packing>
</child>
<child>
- <widget class="GtkLabel" id="useEditLabel">
+ <widget class="GtkLabel" id="useLabel">
<property name="visible">True</property>
<property name="xalign">0</property>
- <property name="label" translatable="yes">File name to use, if package.use is a directory: </property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Use-Flags&lt;/i&gt;&lt;/u&gt;</property>
+ <property name="use_markup">True</property>
<property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ <property name="y_padding">6</property>
</packing>
</child>
<child>
- <widget class="GtkEntry" id="useFileEdit">
+ <widget class="GtkLabel" id="testLabel">
+ <property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Testing Keywords&lt;/i&gt;&lt;/u&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="single_line_mode">True</property>
+ </widget>
+ <packing>
+ <property name="top_attach">4</property>
+ <property name="bottom_attach">5</property>
+ <property name="y_padding">5</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="maskLabel">
<property name="visible">True</property>
+ <property name="xalign">0</property>
+ <property name="xpad">5</property>
+ <property name="label" translatable="yes">&lt;u&gt;&lt;i&gt;Masking Keywords&lt;/i&gt;&lt;/u&gt;</property>
+ <property name="use_markup">True</property>
+ <property name="single_line_mode">True</property>
</widget>
<packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
+ <property name="top_attach">7</property>
+ <property name="bottom_attach">8</property>
+ <property name="y_padding">5</property>
</packing>
</child>
</widget>
@@ -1584,11 +1584,8 @@
<widget class="GtkWindow" id="UpdateWindow">
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="title" translatable="yes">Updateble Packages</property>
- <property name="modal">True</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property>
<property name="destroy_with_parent">True</property>
- <property name="skip_taskbar_hint">True</property>
- <property name="skip_pager_hint">True</property>
<property name="urgency_hint">True</property>
<child>
<widget class="GtkVBox" id="mainVB">
diff --git a/portato/gui/wrapper.py b/portato/gui/wrapper.py
index 12e4a71..1a9ef8f 100644
--- a/portato/gui/wrapper.py
+++ b/portato/gui/wrapper.py
@@ -139,7 +139,7 @@ class Tree:
@rtype: Iterator"""
raise NotImplementedError
- def build_append_value (self, cpv, oneshot = False, update = False, version = None):
+ def build_append_value (self, cpv, oneshot = False, update = False, downgrade = False, version = None, useChange = []):
"""Builds the list, which is going to be passed to append.
@param cpv: the cpv
@@ -148,8 +148,12 @@ class Tree:
@type oneshot: boolean
@param update: True if this is an update
@type update: boolean
+ @param downgrade: True if this is a downgrade
+ @type downgrade: boolean
@param version: the version we update from
@type version: string
+ @param useChange: list of changed useflags; use "-use" for removed and "+use" for added flags
+ @type useChange: string[]
@returns: the created list
@rtype: list"""