Browse Source

v3.0.0

pull/15/head
guinux 6 years ago
parent
commit
00553e5e58
  1. 115
      po/pamac.pot
  2. 338
      resources/manager_window.ui
  3. 3
      resources/progress_dialog.ui
  4. 152
      resources/updater_window.ui
  5. 35
      src/Makefile
  6. 310
      src/alpm_config.vala
  7. 59
      src/alpm_utils.vala
  8. 271
      src/aur_model.vala
  9. 26
      src/choose_dep_dialog.vala
  10. 28
      src/choose_ignorepkgs_dialog.vala
  11. 8
      src/choose_provider_dialog.vala
  12. 11
      src/common.vala
  13. 946
      src/daemon.vala
  14. 13
      src/installer.vala
  15. 5
      src/manager.vala
  16. 1213
      src/manager_window.vala
  17. 58
      src/mirrors_config.vala
  18. 21
      src/package.vala
  19. 167
      src/packages_model.vala
  20. 176
      src/pamac_config.vala
  21. 79
      src/preferences_dialog.vala
  22. 16
      src/progress_dialog.vala
  23. 11
      src/refresh.vala
  24. 817
      src/transaction.vala
  25. 121
      src/tray.vala
  26. 4
      src/updater.vala
  27. 191
      src/updater_window.vala
  28. 63
      util/alpm-util.c
  29. 17
      util/alpm-util.h
  30. 148
      vapi/libalpm.vapi

115
po/pamac.pot

@ -21,8 +21,7 @@ msgstr ""
msgid "Authentication is required"
msgstr ""
#: ../src/daemon.vala
#: ../src/daemon.vala ../src/manager_window.vala ../src/preferences_dialog.vala
msgid "Failed to initialize alpm library"
msgstr ""
@ -30,14 +29,6 @@ msgstr ""
msgid "Failed to synchronize any databases"
msgstr ""
#: ../src/daemon.vala
msgid "No"
msgstr ""
#: ../src/daemon.vala
msgid "Yes"
msgstr ""
#: ../src/daemon.vala
msgid "Failed to init transaction"
msgstr ""
@ -90,7 +81,7 @@ msgstr ""
msgid "%s is invalid or corrupted"
msgstr ""
#: ../src/daemon.vala
#: ../src/daemon.vala ../src/transaction.vala
msgid "Authentication failed"
msgstr ""
@ -110,6 +101,11 @@ msgstr ""
msgid "Preparing"
msgstr ""
#: ../src/transaction.vala
#, c-format
msgid "Choose a provider for %s"
msgstr ""
#: ../src/transaction.vala ../resources/transaction_sum_dialog.ui
msgid "Transaction Summary"
msgstr ""
@ -146,6 +142,14 @@ msgstr ""
msgid "Building packages"
msgstr ""
#: ../src/transaction.vala
msgid "Running pre-transaction hooks"
msgstr ""
#: ../src/transaction.vala
msgid "Running post-transaction hooks"
msgstr ""
#: ../src/transaction.vala
msgid "Checking dependencies"
msgstr ""
@ -259,19 +263,26 @@ msgstr ""
#: ../src/transaction.vala
#, c-format
msgid "%s installed as %s.pacorig"
msgid "Refreshing %s"
msgstr ""
#: ../src/transaction.vala
#, c-format
msgid "Refreshing %s"
msgid "Downloading %s"
msgstr ""
#: ../src/transaction.vala
#, c-format
msgid "Downloading %s"
msgid "About %u seconds remaining"
msgstr ""
#: ../src/transaction.vala
#, c-format
msgid "About %lu minute remaining"
msgid_plural "About %lu minutes remaining"
msgstr[0] ""
msgstr[1] ""
#: ../src/transaction.vala
msgid "Warning"
msgstr ""
@ -281,7 +292,7 @@ msgstr ""
msgid "Error"
msgstr ""
#: ../src/transaction.vala ../src/progress_dialog.vala
#: ../src/transaction.vala
msgid "Transaction cancelled"
msgstr ""
@ -324,22 +335,6 @@ msgstr[1] ""
msgid "Show available updates"
msgstr ""
#: ../src/choose_provider_dialog.vala
#, c-format
msgid "Choose a provider for %s"
msgstr ""
#: ../src/choose_dep_dialog.vala
#, c-format
msgid ""
"%s has %u uninstalled optional dependency.\n"
"Choose if you would like to install it"
msgid_plural ""
"%s has %u uninstalled optional dependencies.\n"
"Choose those you would like to install"
msgstr[0] ""
msgstr[1] ""
#: ../src/manager_window.vala
msgid "Deselect"
msgstr ""
@ -380,6 +375,10 @@ msgstr ""
msgid "Licenses"
msgstr ""
#: ../src/manager_window.vala
msgid "Unknown"
msgstr ""
#: ../src/manager_window.vala
msgid "Depends On"
msgstr ""
@ -417,65 +416,76 @@ msgid "Groups"
msgstr ""
#: ../src/manager_window.vala
msgid "Maintainer"
msgid "Packager"
msgstr ""
#: ../src/manager_window.vala
msgid "First Submitted"
msgid "Build Date"
msgstr ""
#: ../src/manager_window.vala
msgid "Last Modified"
msgid "Install Date"
msgstr ""
#: ../src/manager_window.vala
msgid "Packager"
msgid "Explicitly installed"
msgstr ""
#: ../src/manager_window.vala
msgid "Build Date"
msgid "Installed as a dependency for another package"
msgstr ""
#: ../src/manager_window.vala
msgid "Install Date"
msgid "Install Reason"
msgstr ""
#: ../src/manager_window.vala
msgid "Explicitly installed"
msgid "Yes"
msgstr ""
#: ../src/manager_window.vala
msgid "Installed as a dependency for another package"
msgid "No"
msgstr ""
#: ../src/manager_window.vala
msgid "Unknown"
msgid "Signatures"
msgstr ""
#: ../src/manager_window.vala
msgid "Install Reason"
msgid "Backup files"
msgstr ""
#: ../src/manager_window.vala
msgid "Signatures"
msgid "Maintainer"
msgstr ""
#: ../src/manager_window.vala
msgid "Votes"
msgid "First Submitted"
msgstr ""
#: ../src/manager_window.vala
msgid "Out of Date"
msgid "Last Modified"
msgstr ""
#: ../src/manager_window.vala
msgid "Backup files"
#: ../src/manager_window.vala ../resources/manager_window.ui
msgid "Votes"
msgstr ""
#: ../src/manager_window.vala
msgid "No package found"
msgid "Out of Date"
msgstr ""
#: ../src/manager_window.vala
#, c-format
msgid ""
"%s has %u uninstalled optional dependency.\n"
"Choose if you would like to install it"
msgid_plural ""
"%s has %u uninstalled optional dependencies.\n"
"Choose those you would like to install"
msgstr[0] ""
msgstr[1] ""
#: ../src/manager_window.vala
msgid "Uninstalled"
msgstr ""
@ -595,7 +605,7 @@ msgstr ""
msgid "State"
msgstr ""
#: ../resources/manager_window.ui
#: ../resources/manager_window.ui ../resources/updater_window.ui
msgid "Repositories"
msgstr ""
@ -611,6 +621,11 @@ msgstr ""
msgid "Size"
msgstr ""
#: ../resources/manager_window.ui ../resources/updater_window.ui
#: ../resources/preferences_dialog.ui
msgid "AUR"
msgstr ""
#: ../resources/manager_window.ui
msgid "Description"
msgstr ""
@ -708,10 +723,6 @@ msgstr ""
msgid "Do not ask for confirmation when building packages"
msgstr ""
#: ../resources/preferences_dialog.ui
msgid "AUR"
msgstr ""
#: ../resources/choose_ignorepkgs_dialog.ui
msgid "Choose Ignored Upgrades"
msgstr ""

338
resources/manager_window.ui

@ -207,8 +207,8 @@
<object class="GtkLabel" id="search_aur_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="margin_start">6</property>
<property name="hexpand">True</property>
<property name="label" translatable="yes">Search in AUR</property>
<property name="xalign">0</property>
</object>
@ -437,117 +437,242 @@
<property name="can_focus">True</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow6">
<property name="width_request">500</property>
<property name="height_request">200</property>
<object class="GtkNotebook" id="packages_notebook">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<signal name="switch-page" handler="on_packages_notebook_switch_page" after="yes" swapped="no"/>
<child>
<object class="GtkTreeView" id="packages_treeview">
<object class="GtkScrolledWindow" id="packages_scrolledwindow">
<property name="width_request">500</property>
<property name="height_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/>
<signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="packages_treeview_selection">
<property name="mode">multiple</property>
<signal name="changed" handler="on_packages_treeview_selection_changed" swapped="no"/>
</object>
</child>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeViewColumn" id="state_column">
<property name="resizable">True</property>
<property name="fixed_width">40</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_state_column_clicked" swapped="no"/>
<object class="GtkTreeView" id="packages_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<signal name="button-press-event" handler="on_packages_treeview_button_press_event" swapped="no"/>
<signal name="row-activated" handler="on_packages_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection">
<property name="mode">multiple</property>
<signal name="changed" handler="on_packages_treeview_selection_changed" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCellRendererPixbuf" id="state_rendererpixbuf"/>
<attributes>
<attribute name="pixbuf">1</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="packages_state_column">
<property name="resizable">True</property>
<property name="fixed_width">40</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_packages_state_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererPixbuf" id="packages_state_rendererpixbuf"/>
<attributes>
<attribute name="pixbuf">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="name_column">
<property name="resizable">True</property>
<property name="fixed_width">150</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Name</property>
<property name="expand">True</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_name_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="name_renderertext"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="packages_name_column">
<property name="resizable">True</property>
<property name="fixed_width">150</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Name</property>
<property name="expand">True</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_packages_name_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="packages_name_renderertext"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="version_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Version</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_version_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="version_renderertext"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="packages_version_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Version</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_packages_version_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="packages_version_renderertext"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="repo_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Repository</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_repo_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="repo_renderertext"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="packages_repo_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Repository</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_packages_repo_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="packages_repo_renderertext"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="packages_size_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Size</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_packages_size_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="packages_size_renderertext"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Repositories</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="aur_scrolledwindow">
<property name="width_request">500</property>
<property name="height_request">200</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkTreeViewColumn" id="size_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Size</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_size_column_clicked" swapped="no"/>
<object class="GtkTreeView" id="aur_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<signal name="button-press-event" handler="on_aur_treeview_button_press_event" swapped="no"/>
<signal name="row-activated" handler="on_aur_treeview_row_activated" swapped="no"/>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection12">
<property name="mode">multiple</property>
<signal name="changed" handler="on_aur_treeview_selection_changed" swapped="no"/>
</object>
</child>
<child>
<object class="GtkCellRendererText" id="size_renderertext"/>
<attributes>
<attribute name="text">4</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="aur_state_column">
<property name="resizable">True</property>
<property name="fixed_width">40</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">State</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_aur_state_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererPixbuf" id="aur_state_rendererpixbuf"/>
<attributes>
<attribute name="pixbuf">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="aur_name_column">
<property name="resizable">True</property>
<property name="fixed_width">150</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Name</property>
<property name="expand">True</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_aur_name_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="aur_name_renderertext"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="aur_version_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Version</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_aur_version_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="aur_version_renderertext"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="aur_votes_column">
<property name="resizable">True</property>
<property name="fixed_width">90</property>
<property name="min_width">20</property>
<property name="title" translatable="yes">Votes</property>
<property name="clickable">True</property>
<signal name="clicked" handler="on_aur_votes_column_clicked" swapped="no"/>
<child>
<object class="GtkCellRendererText" id="aur_votes_renderertext"/>
<attributes>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">AUR</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">False</property>
<property name="shrink">True</property>
</packing>
</child>
<child>
@ -563,11 +688,11 @@
<property name="can_focus">True</property>
<property name="shadow_type">in</property>
<child>
<object class="GtkViewport" id="viewport1">
<object class="GtkViewport" id="viewport2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="box5">
<object class="GtkBox" id="box4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
@ -575,8 +700,10 @@
<child>
<object class="GtkLabel" id="name_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
@ -592,8 +719,10 @@
<child>
<object class="GtkLabel" id="desc_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
@ -609,9 +738,10 @@
<child>
<object class="GtkLabel" id="link_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
@ -626,8 +756,10 @@
<child>
<object class="GtkLabel" id="licenses_label">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="margin_left">6</property>
<property name="margin_right">6</property>
<property name="margin_start">6</property>
<property name="margin_end">6</property>
<property name="margin_top">6</property>
@ -647,7 +779,7 @@
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label1">
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Description</property>
@ -670,7 +802,7 @@
<property name="enable_search">False</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="deps_treeview_selection">
<object class="GtkTreeSelection" id="treeview-selection8">
<property name="mode">none</property>
</object>
</child>
@ -678,7 +810,7 @@
<object class="GtkTreeViewColumn" id="dep_type">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext12">
<object class="GtkCellRendererText" id="cellrenderertext3">
<property name="yalign">0</property>
<property name="weight">600</property>
</object>
@ -692,7 +824,7 @@
<object class="GtkTreeViewColumn" id="deps">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext13"/>
<object class="GtkCellRendererText" id="cellrenderertext5"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
@ -707,7 +839,7 @@
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label2">
<object class="GtkLabel" id="label8">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Dependencies</property>
@ -732,7 +864,7 @@
<property name="search_column">0</property>
<property name="show_expanders">False</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection6">
<object class="GtkTreeSelection" id="treeview-selection10">
<property name="mode">none</property>
</object>
</child>
@ -740,7 +872,7 @@
<object class="GtkTreeViewColumn" id="infotype">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext1">
<object class="GtkCellRendererText" id="cellrenderertext6">
<property name="yalign">0</property>
<property name="weight">600</property>
<property name="wrap_mode">word</property>
@ -752,10 +884,10 @@
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="type">
<object class="GtkTreeViewColumn" id="info">
<property name="sizing">autosize</property>
<child>
<object class="GtkCellRendererText" id="cellrenderertext4">
<object class="GtkCellRendererText" id="cellrenderertext7">
<property name="wrap_mode">word</property>
</object>
<attributes>
@ -772,7 +904,7 @@
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label3">
<object class="GtkLabel" id="label9">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Details</property>
@ -824,7 +956,7 @@
</object>
<packing>
<property name="resize">True</property>
<property name="shrink">False</property>
<property name="shrink">True</property>
</packing>
</child>
</object>

3
resources/progress_dialog.ui

@ -6,7 +6,7 @@
<property name="title" translatable="yes">Progress</property>
<property name="modal">True</property>
<property name="window_position">center-on-parent</property>
<property name="default_width">500</property>
<property name="width_request">500</property>
<property name="icon_name">system-software-install</property>
<property name="type_hint">dialog</property>
<property name="deletable">False</property>
@ -29,7 +29,6 @@
<property name="use_underline">True</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<signal name="clicked" handler="on_cancel_button_clicked" swapped="no"/>
</object>
<packing>
<property name="expand">False</property>

152
resources/updater_window.ui

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.19.0 -->
<interface>
<requires lib="gtk+" version="3.12"/>
<template class="PamacUpdaterWindow" parent="GtkApplicationWindow">
@ -30,64 +30,142 @@
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="scrolledwindow1">
<property name="width_request">400</property>
<property name="height_request">400</property>
<object class="GtkNotebook" id="notebook">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="can_focus">True</property>
<child>
<object class="GtkTreeView" id="updates_treeview">
<object class="GtkScrolledWindow" id="repos_scrolledwindow">
<property name="width_request">400</property>
<property name="height_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection1">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<object class="GtkTreeView" id="repos_updates_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkCellRendererToggle" id="select_update">
<signal name="toggled" handler="on_select_update_toggled" swapped="no"/>
<object class="GtkTreeViewColumn" id="treeviewcolumn3">
<child>
<object class="GtkCellRendererToggle" id="repos_select_update">
<signal name="toggled" handler="on_repos_select_update_toggled" swapped="no"/>
</object>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="expand">True</property>
<child>
<object class="GtkCellRendererText" id="update_name"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="treeviewcolumn1">
<property name="expand">True</property>
<child>
<object class="GtkCellRendererText" id="repos_update_name"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<child>
<object class="GtkCellRendererText" id="repos_update_download_size"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
</child>
<child type="tab">
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Repositories</property>
</object>
<packing>
<property name="tab_fill">False</property>
</packing>
</child>
<child>
<object class="GtkScrolledWindow" id="aur_scrolledwindow">
<property name="width_request">400</property>
<property name="height_request">400</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn2">
<object class="GtkTreeView" id="aur_updates_treeview">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="vexpand">True</property>
<property name="headers_visible">False</property>
<property name="headers_clickable">False</property>
<property name="search_column">0</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="treeview-selection2">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkCellRendererText" id="download_size"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
<object class="GtkTreeViewColumn" id="treeviewcolumn4">
<child>
<object class="GtkCellRendererToggle" id="aur_select_update">
<signal name="toggled" handler="on_aur_select_update_toggled" swapped="no"/>
</object>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="treeviewcolumn5">
<property name="expand">True</property>
<child>
<object class="GtkCellRendererText" id="aur_update_name"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="position">1</property>
</packing>
</child>
<child type="tab">
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">AUR</property>
</object>
<packing>
<property name="position">1</property>
<property name="tab_fill">False</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>

35
src/Makefile

@ -1,23 +1,28 @@
COMMON_VALA_FLAGS = -X -w \
COMMON_VALA_FLAGS = -g --save-temps -X -w \
--pkg=libalpm \
--pkg=gio-2.0 \
--pkg=posix \
--pkg=json-glib-1.0 \
--pkg=libsoup-2.4 \
--vapidir=../vapi \
--Xcc=-I../util \
-X -D_FILE_OFFSET_BITS=64 \
-X -DGETTEXT_PACKAGE="pamac" \
--target-glib=2.38
TRANSACTION_VALA_FLAGS = --pkg=json-glib-1.0 \
--pkg=gtk+-3.0 \
TRANSACTION_VALA_FLAGS = --pkg=gtk+-3.0 \
--pkg=gmodule-2.0 \
--pkg=gdk-3.0 \
--pkg=vte-2.91
--pkg=vte-2.91 \
-X -lm
COMMON_SOURCES = ../util/alpm-util.c \
common.vala \
pamac_config.vala \
package.vala \
alpm_config.vala \
alpm_utils.vala \
aur.vala \
TRANSACTION_SOURCES = transaction.vala \
choose_provider_dialog.vala \
@ -44,37 +49,28 @@ pamac-refresh: pamac_config.vala refresh.vala
valac -o pamac-refresh \
-X -w \
--pkg=gio-2.0 \
--pkg=posix \
pamac_config.vala \
refresh.vala
pamac-tray: ../vapi/libalpm.vapi ../util/alpm-util.c common.vala alpm_config.vala pamac_config.vala tray.vala
pamac-tray: ../vapi/libalpm.vapi $(COMMON_SOURCES) tray.vala
valac -o pamac-tray \
$(COMMON_VALA_FLAGS) \
../util/alpm-util.c \
--pkg=posix \
--pkg=gtk+-3.0 \
--pkg=libnotify \
common.vala \
alpm_config.vala \
pamac_config.vala \
$(COMMON_SOURCES) \
tray.vala
pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi $(COMMON_SOURCES) mirrors_config.vala alpm_config.vala alpm_utils.vala aur.vala daemon.vala
pamac-daemon: ../vapi/libalpm.vapi ../vapi/polkit-gobject-1.vapi $(COMMON_SOURCES) mirrors_config.vala daemon.vala
valac -o pamac-daemon \
$(COMMON_VALA_FLAGS) \
--pkg=posix \
--pkg=json-glib-1.0 \
--pkg=libsoup-2.4 \
--pkg=polkit-gobject-1 \
--thread \
$(COMMON_SOURCES) \
mirrors_config.vala \
alpm_config.vala \
aur.vala \
alpm_utils.vala \
daemon.vala
pamac-manager: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) choose_dep_dialog.vala history_dialog.vala ../resources/manager_resources.c packages_model.vala manager_window.vala manager.vala
pamac-manager: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(PREFERENCES_SOURCES) choose_dep_dialog.vala history_dialog.vala ../resources/manager_resources.c packages_model.vala aur_model.vala manager_window.vala manager.vala
valac -o pamac-manager \
$(COMMON_VALA_FLAGS) \
$(TRANSACTION_VALA_FLAGS) \
@ -86,6 +82,7 @@ pamac-manager: ../vapi/libalpm.vapi $(COMMON_SOURCES) $(TRANSACTION_SOURCES) $(P
choose_dep_dialog.vala \
history_dialog.vala \
packages_model.vala \
aur_model.vala \
manager_window.vala \
manager.vala

310
src/alpm_config.vala

@ -1,7 +1,7 @@
/*
* pamac-vala
*
* Copyright (C) 2014-2015 Guillaume Benoit <guillaume@manjaro.org>
* Copyright (C) 2014-2016 Guillaume Benoit <guillaume@manjaro.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -18,112 +18,163 @@
*/
namespace Alpm {
class Repo {
[Compact]
public class Repo {
public string name;
public Signature.Level siglevel;
public Signature.Level siglevel_mask;
public DB.Usage usage;
public string[] urls;
public GLib.List<string> urls;
public Repo (string name) {
this.name = name;
siglevel = Signature.Level.USE_DEFAULT;
usage = 0;
urls = {};
}
urls = new GLib.List<string> ();
}
public static int compare_name (Repo a, Repo b) {
return strcmp (a.name, b.name);
}
public static int search_name (Repo a, string name) {
return strcmp (a.name, name);
}
}
[Compact]
public class Config {
string conf_path;
string rootdir;
string dbpath;
string gpgdir;
string logfile;
string arch;
double deltaratio;
int usesyslog;
public string conf_path;
public string? rootdir;
public string? dbpath;
public string? logfile;
public string? gpgdir;
public string? arch;
public double deltaratio;
public int usesyslog;
public int checkspace;
Alpm.List<string> *cachedirs;
Alpm.List<string> *ignoregroups;
public Alpm.List<string> *ignorepkgs;
Alpm.List<string> *noextracts;
Alpm.List<string> *noupgrades;
public GLib.List<string> holdpkgs;
public GLib.List<string> syncfirsts;
Signature.Level defaultsiglevel;
Signature.Level localfilesiglevel;
Signature.Level remotefilesiglevel;
Repo[] repo_order;
public unowned Handle? handle;
public Alpm.List<string>? cachedirs;
public Alpm.List<string?>? hookdirs;
public Alpm.List<string>? ignoregroups;
public Alpm.List<string>? ignorepkgs;
public Alpm.List<string>? noextracts;
public Alpm.List<string>? noupgrades;
public GLib.List<string>? holdpkgs;
public GLib.List<string>? syncfirsts;
public Signature.Level siglevel;
public Signature.Level localfilesiglevel;
public Signature.Level remotefilesiglevel;
public Signature.Level siglevel_mask;
public Signature.Level localfilesiglevel_mask;
public Signature.Level remotefilesiglevel_mask;
public GLib.List<Repo> repo_order;
public Handle? handle;
public Config (string path) {
conf_path = path;
handle = null;
reload ();
}
public void reload () {
// set default options
rootdir = "/";
dbpath = "/var/lib/pacman";
gpgdir = "/etc/pacman.d/gnupg/";
logfile = "/var/log/pacman.log";
string default_cachedir = "/var/cache/pacman/pkg/";
arch = Posix.utsname().machine;
holdpkgs = new GLib.List<string> ();
syncfirsts = new GLib.List<string> ();
Alpm.List.free_all (cachedirs);
Alpm.List.free_all (ignoregroups);
Alpm.List.free_all (ignorepkgs);
Alpm.List.free_all (noextracts);
Alpm.List.free_all (noupgrades);
cachedirs = new Alpm.List<string> ();
cachedirs->add_str (default_cachedir);
ignoregroups = new Alpm.List<string> ();
ignorepkgs = new Alpm.List<string> ();
noextracts = new Alpm.List<string> ();
noupgrades = new Alpm.List<string> ();
// free internal data of alpm lists
if (cachedirs != null) {
cachedirs.free_data ();
}
if (hookdirs != null) {
hookdirs.free_data ();
}
if (ignoregroups != null) {
ignoregroups.free_data ();
}
if (ignorepkgs != null) {
ignorepkgs.free_data ();
}
if (noextracts != null) {
noextracts.free_data ();
}
if (noupgrades != null) {
noupgrades.free_data ();
}
usesyslog = 0;
checkspace = 0;
deltaratio = 0.7;
defaultsiglevel = Signature.Level.PACKAGE | Signature.Level.PACKAGE_OPTIONAL | Signature.Level.DATABASE | Signature.Level.DATABASE_OPTIONAL;
siglevel = Signature.Level.PACKAGE | Signature.Level.PACKAGE_OPTIONAL | Signature.Level.DATABASE | Signature.Level.DATABASE_OPTIONAL;
localfilesiglevel = Signature.Level.USE_DEFAULT;
remotefilesiglevel = Signature.Level.USE_DEFAULT;
repo_order = {};
repo_order = new GLib.List<Repo> ();
// parse conf file
parse_file (conf_path);
// if rootdir is set and dbpath/logfile are not
// set, then set those as well to reside under the root.
if (rootdir != null) {
if (dbpath == null) {
dbpath = Path.build_path ("/", rootdir, "var/lib/pacman/");
}
if (logfile == null) {
logfile = Path.build_path ("/", rootdir, "var/log/pacman.log");
}
} else {
rootdir = "/";
if (dbpath == null) {
dbpath = "/var/lib/pacman/";
}
if (logfile == null) {
logfile = "/var/log/pacman.log";
}
}
if (cachedirs.length == 0) {
cachedirs.add ("/var/cache/pacman/pkg/");
}
if (hookdirs.length == 0) {
hookdirs.add ("/etc/pacman.d/hooks/");
}
if (gpgdir == null) {
// gpgdir it is not relative to rootdir, even if
// rootdir is defined because it contains configuration data.
gpgdir = "/etc/pacman.d/gnupg/";
}
if (arch == null) {
arch = Posix.utsname().machine;
}
}
public void get_handle () {
Alpm.Errno error;
if (handle != null) {
Handle.release (handle);
}
handle = Handle.new (rootdir, dbpath, out error);
if (handle == null) {
stderr.printf ("Failed to initialize alpm library" + " (%s)\n".printf(Alpm.strerror (error)));
return;
}
// define options
handle.gpgdir = gpgdir;
handle.logfile = logfile;
handle.gpgdir = gpgdir;
handle.arch = arch;
handle.deltaratio = deltaratio;
handle.usesyslog = usesyslog;
handle.checkspace = checkspace;
handle.defaultsiglevel = defaultsiglevel;
localfilesiglevel = merge_siglevel (defaultsiglevel, localfilesiglevel);
remotefilesiglevel = merge_siglevel (defaultsiglevel, remotefilesiglevel);
handle.defaultsiglevel = siglevel;
localfilesiglevel = merge_siglevel (siglevel, localfilesiglevel, localfilesiglevel_mask);
remotefilesiglevel = merge_siglevel (siglevel, remotefilesiglevel, remotefilesiglevel_mask);
handle.localfilesiglevel = localfilesiglevel;
handle.remotefilesiglevel = remotefilesiglevel;
handle.cachedirs = cachedirs;
// add hook directories 1-by-1 to avoid overwriting the system directory
foreach (unowned string hookdir in hookdirs) {
handle.add_hookdir (hookdir);
}
handle.ignoregroups = ignoregroups;
handle.ignorepkgs = ignorepkgs;
handle.noextracts = noextracts;
handle.noupgrades = noupgrades;
// register dbs
foreach (var repo in repo_order) {
foreach (unowned Repo repo in repo_order) {
repo.siglevel = merge_siglevel (siglevel, repo.siglevel, repo.siglevel_mask);
unowned DB db = handle.register_syncdb (repo.name, repo.siglevel);
foreach (var url in repo.urls) {
foreach (unowned string url in repo.urls) {
db.add_server (url.replace ("$repo", repo.name).replace ("$arch", handle.arch));
}
if (repo.usage == 0) {
@ -158,21 +209,37 @@ namespace Alpm {
current_section = line[1:-1];
if (current_section != "options") {
var repo = new Repo (current_section);
repo_order += repo;
if (repo_order.find_custom (repo, Repo.compare_name) == null) {
repo_order.append ((owned) repo);
}
}
continue;
}
splitted = line.split ("=", 2);
string key = splitted[0].strip ();
string? val = null;
if (splitted[1] != null) {
val = splitted[1].strip ();
unowned string key = splitted[0]._strip ();
unowned string? val = null;
if (splitted.length == 2) {
val = splitted[1]._strip ();
}
if (key == "Include") {
parse_file (val, current_section);
}
if (current_section == "options") {
if (key == "GPGDir") {
if (key == "RootDir") {
rootdir = val;
} else if (key == "DBPath") {
dbpath = val;
} else if (key == "CacheDir") {
foreach (unowned string dir in val.split (" ")) {
cachedirs.add (dir);
}
} else if (key == "HookDir") {
foreach (unowned string dir in val.split (" ")) {
hookdirs.add (dir);
}
} else if (key == "LogFile") {
logfile = val;
} else if (key == "GPGDir") {
gpgdir = val;
} else if (key == "LogFile") {
logfile = val;
@ -189,53 +256,46 @@ namespace Alpm {
} else if (key == "CheckSpace") {
checkspace = 1;
} else if (key == "SigLevel") {
defaultsiglevel = define_siglevel (defaultsiglevel, val);
process_siglevel (val, ref siglevel, ref siglevel_mask);
} else if (key == "LocalFileSigLevel") {
localfilesiglevel = define_siglevel (localfilesiglevel, val);
process_siglevel (val, ref localfilesiglevel, ref localfilesiglevel_mask);
} else if (key == "RemoteFileSigLevel") {
remotefilesiglevel = define_siglevel (remotefilesiglevel, val);
process_siglevel (val, ref remotefilesiglevel, ref remotefilesiglevel_mask);
} else if (key == "HoldPkg") {
foreach (string name in val.split (" ")) {
foreach (unowned string name in val.split (" ")) {
holdpkgs.append (name);
}
} else if (key == "SyncFirst") {
foreach (string name in val.split (" ")) {
foreach (unowned string name in val.split (" ")) {
syncfirsts.append (name);
}
} else if (key == "CacheDir") {
foreach (string dir in val.split (" ")) {
cachedirs->add_str (dir);
}
} else if (key == "IgnoreGroup") {
foreach (string name in val.split (" ")) {
ignoregroups->add_str (name);
foreach (unowned string name in val.split (" ")) {
ignoregroups.add (name);
}
} else if (key == "IgnorePkg") {
foreach (string name in val.split (" ")) {
ignorepkgs->add_str (name);
foreach (unowned string name in val.split (" ")) {
ignorepkgs.add (name);
}
} else if (key == "Noextract") {
foreach (string name in val.split (" ")) {
noextracts->add_str (name);
foreach (unowned string name in val.split (" ")) {
noextracts.add (name);
}
} else if (key == "NoUpgrade") {
foreach (string name in val.split (" ")) {
noupgrades->add_str (name);
foreach (unowned string name in val.split (" ")) {
noupgrades.add (name);
}
}
} else {
foreach (var repo in repo_order) {
if (repo.name == current_section) {
if (key == "Server") {
repo.urls += val;
} else if (key == "SigLevel") {
if (repo.siglevel == Signature.Level.USE_DEFAULT) {
repo.siglevel = defaultsiglevel;
}
repo.siglevel = define_siglevel (repo.siglevel, val);
} else if (key == "Usage") {
repo.usage = define_usage (val);
}
unowned GLib.List<Repo>? found = repo_order.search (current_section, (SearchFunc) Repo.search_name);
if (found != null) {
unowned Repo repo = found.data;
if (key == "Server") {
repo.urls.append (val);
} else if (key == "SigLevel") {
process_siglevel (val, ref repo.siglevel, ref repo.siglevel_mask);
} else if (key == "Usage") {
repo.usage = define_usage (val);
}
}
}
@ -295,7 +355,7 @@ namespace Alpm {
file.delete ();
// creating a DataOutputStream to the file
var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
foreach (string new_line in data) {
foreach (unowned string new_line in data) {
// writing a short string to the stream
dos.put_string (new_line);
}
@ -309,7 +369,7 @@ namespace Alpm {
public DB.Usage define_usage (string conf_string) {
DB.Usage usage = 0;
foreach (string directive in conf_string.split(" ")) {
foreach (unowned string directive in conf_string.split(" ")) {
if (directive == "Sync") {
usage |= DB.Usage.SYNC;
} else if (directive == "Search") {
@ -325,8 +385,8 @@ namespace Alpm {
return usage;
}
public Signature.Level define_siglevel (Signature.Level default_level, string conf_string) {
foreach (string directive in conf_string.split(" ")) {
public void process_siglevel (string conf_string, ref Signature.Level siglevel, ref Signature.Level siglevel_mask) {
foreach (unowned string directive in conf_string.split(" ")) {
bool affect_package = false;
bool affect_database = false;
if ("Package" in directive) {
@ -339,72 +399,62 @@ namespace Alpm {
}
if ("Never" in directive) {
if (affect_package) {
default_level &= ~Signature.Level.PACKAGE;
default_level |= Signature.Level.PACKAGE_SET;
siglevel &= ~Signature.Level.PACKAGE;
siglevel_mask |= Signature.Level.PACKAGE;
}
if (affect_database) {
default_level &= ~Signature.Level.DATABASE;
siglevel &= ~Signature.Level.DATABASE;
siglevel_mask |= Signature.Level.DATABASE;
}
} else if ("Optional" in directive) {
if (affect_package) {
default_level |= Signature.Level.PACKAGE;
default_level |= Signature.Level.PACKAGE_OPTIONAL;
default_level |= Signature.Level.PACKAGE_SET;
siglevel |= (Signature.Level.PACKAGE | Signature.Level.PACKAGE_OPTIONAL);
siglevel_mask |= (Signature.Level.PACKAGE | Signature.Level.PACKAGE_OPTIONAL);
}
if (affect_database) {
default_level |= Signature.Level.DATABASE;
default_level |= Signature.Level.DATABASE_OPTIONAL;
siglevel |= (Signature.Level.DATABASE | Signature.Level.DATABASE_OPTIONAL);
siglevel_mask |= (Signature.Level.DATABASE | Signature.Level.DATABASE_OPTIONAL);
}
} else if ("Required" in directive) {
if (affect_package) {
default_level |= Signature.Level.PACKAGE;
default_level &= ~Signature.Level.PACKAGE_OPTIONAL;
default_level |= Signature.Level.PACKAGE_SET;
siglevel |= Signature.Level.PACKAGE;
siglevel_mask |= Signature.Level.PACKAGE;
siglevel &= ~Signature.Level.PACKAGE_OPTIONAL;
siglevel_mask |= Signature.Level.PACKAGE_OPTIONAL;
}
if (affect_database) {
default_level |= Signature.Level.DATABASE;
default_level &= ~Signature.Level.DATABASE_OPTIONAL;
siglevel |= Signature.Level.DATABASE;
siglevel_mask |= Signature.Level.DATABASE;
siglevel &= ~Signature.Level.DATABASE_OPTIONAL;
siglevel_mask |= Signature.Level.DATABASE_OPTIONAL;
}
} else if ("TrustedOnly" in directive) {
if (affect_package) {
default_level &= ~Signature.Level.PACKAGE_MARGINAL_OK;
default_level &= ~Signature.Level.PACKAGE_UNKNOWN_OK;
default_level |= Signature.Level.PACKAGE_TRUST_SET;
siglevel &= ~(Signature.Level.PACKAGE_MARGINAL_OK | Signature.Level.PACKAGE_UNKNOWN_OK);
siglevel_mask |= (Signature.Level.PACKAGE_MARGINAL_OK | Signature.Level.PACKAGE_UNKNOWN_OK);
}
if (affect_database) {
default_level &= ~Signature.Level.DATABASE_MARGINAL_OK;
default_level &= ~Signature.Level.DATABASE_UNKNOWN_OK;
siglevel &= ~(Signature.Level.DATABASE_MARGINAL_OK | Signature.Level.DATABASE_UNKNOWN_OK);
siglevel_mask |= (Signature.Level.DATABASE_MARGINAL_OK | Signature.Level.DATABASE_UNKNOWN_OK);
}
} else if ("TrustAll" in directive) {