Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
pamac
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
154
Issues
154
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Test Cases
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Applications
pamac
Commits
947ab246
Commit
947ab246
authored
Sep 30, 2018
by
Philip Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add PKGBUILD editing support
parent
a94f2157
Changes
22
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
22 changed files
with
1265 additions
and
829 deletions
+1265
-829
README.md
README.md
+7
-6
data/config/pamac.conf
data/config/pamac.conf
+3
-3
resources/manager_window.ui
resources/manager_window.ui
+150
-136
resources/transaction_sum_dialog.ui
resources/transaction_sum_dialog.ui
+7
-4
src/alpm_utils.vala
src/alpm_utils.vala
+381
-228
src/aur.vala
src/aur.vala
+55
-24
src/cli.vala
src/cli.vala
+22
-11
src/common.vala
src/common.vala
+1
-5
src/common_daemon.vala
src/common_daemon.vala
+1
-5
src/database.vala
src/database.vala
+15
-23
src/manager_window.vala
src/manager_window.vala
+296
-223
src/package.vala
src/package.vala
+3
-1
src/pamac_config.vala
src/pamac_config.vala
+1
-1
src/preferences_dialog.vala
src/preferences_dialog.vala
+2
-2
src/system_daemon.vala
src/system_daemon.vala
+16
-29
src/transaction-cli.vala
src/transaction-cli.vala
+24
-0
src/transaction-gtk.vala
src/transaction-gtk.vala
+139
-0
src/transaction.vala
src/transaction.vala
+119
-70
src/transaction_interface.vala
src/transaction_interface.vala
+0
-2
src/transaction_interface_daemon.vala
src/transaction_interface_daemon.vala
+0
-16
src/transaction_interface_root.vala
src/transaction_interface_root.vala
+4
-23
src/tray.vala
src/tray.vala
+19
-17
No files found.
README.md
View file @
947ab246
Pamac is a
GUI for libalpm (pacman)
with AUR and Appstream support
Pamac is a
Package Manager based on libalpm
with AUR and Appstream support
#### Features
-
Library to access package infos and run transactions
-
Python bindings
-
CLI
-
GTK3 frontend with Dbus daemon
-
Tray icon with Updates notifications
-
libpamac: Library to access package infos and run transactions
-
Python bindings for libpamac
-
pamac: a CLI
-
pamac_manager/pamac-updater: a Gtk3 GUI
-
pamac-tray: a Gtk3 tray icon with updates notifications
-
ppamac-tray-appindicator: a AppIndicator tray icon with updates notifications
#### Installing from source
...
...
data/config/pamac.conf
View file @
947ab246
...
...
@@ -11,13 +11,13 @@ RefreshPeriod = 6
#NoUpdateHideIcon
## Allow Pamac to search and install packages from AUR:
#
EnableAUR
EnableAUR
## When AUR support is enabled check for updates from AUR:
#
CheckAURUpdates
CheckAURUpdates
## AUR build directory:
BuildDirectory
= /
tmp
BuildDirectory
= /
var
/
tmp
## Number of versions of each package to keep in the cache:
KeepNumPackages
=
3
...
...
resources/manager_window.ui
View file @
947ab246
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.22.
0
-->
<!-- Generated with glade 3.22.
1
-->
<interface>
<requires
lib=
"gtk+"
version=
"3.20"
/>
<object
class=
"GtkPopoverMenu"
id=
"popovermenu"
>
...
...
@@ -97,6 +97,127 @@
<property
name=
"gravity"
>
center
</property>
<property
name=
"show_menubar"
>
False
</property>
<signal
name=
"delete-event"
handler=
"on_ManagerWindow_delete_event"
swapped=
"no"
/>
<child
type=
"titlebar"
>
<object
class=
"GtkHeaderBar"
id=
"headerbar"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"show_close_button"
>
True
</property>
<child>
<object
class=
"GtkBox"
id=
"header_left_buttonbox"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
32
</property>
<child>
<object
class=
"GtkButton"
id=
"button_back"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"halign"
>
start
</property>
<signal
name=
"clicked"
handler=
"on_button_back_clicked"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"back_image"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
go-previous-symbolic
</property>
<property
name=
"icon_size"
>
1
</property>
</object>
</child>
<style>
<class
name=
"image-button"
/>
</style>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"header_filter_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"select_all_button"
>
<property
name=
"label"
translatable=
"yes"
>
Select All
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"margin_left"
>
18
</property>
<signal
name=
"clicked"
handler=
"on_select_all_button_clicked"
swapped=
"no"
/>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
</object>
</child>
<child>
<object
class=
"GtkBox"
id=
"header_right_buttonbox"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
3
</property>
<child>
<object
class=
"GtkToggleButton"
id=
"search_button"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<signal
name=
"toggled"
handler=
"on_search_button_toggled"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"search_image"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
edit-find-symbolic
</property>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkMenuButton"
id=
"menu_button"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"popover"
>
popovermenu
</property>
<signal
name=
"toggled"
handler=
"on_menu_button_toggled"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"menu_icon"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
open-menu-symbolic
</property>
<property
name=
"icon_size"
>
1
</property>
</object>
</child>
<style>
<class
name=
"image-button"
/>
</style>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
<child>
<object
class=
"GtkBox"
id=
"main_box"
>
<property
name=
"visible"
>
True
</property>
...
...
@@ -651,24 +772,10 @@
<property
name=
"orientation"
>
vertical
</property>
<property
name=
"spacing"
>
12
</property>
<property
name=
"homogeneous"
>
True
</property>
<child>
<object
class=
"GtkSpinner"
id=
"checking_spinner"
>
<property
name=
"height_request"
>
40
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"valign"
>
end
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"checking_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"valign"
>
start
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
@@ -849,6 +956,34 @@
<property
name=
"position"
>
2
</property>
</packing>
</child>
<child>
<object
class=
"GtkToggleButton"
id=
"build_togglebutton"
>
<property
name=
"label"
translatable=
"yes"
>
Build
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<signal
name=
"toggled"
handler=
"on_build_togglebutton_toggled"
swapped=
"no"
/>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"reset_files_button"
>
<property
name=
"label"
translatable=
"yes"
>
Reset build files
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<signal
name=
"clicked"
handler=
"on_reset_files_button_clicked"
swapped=
"no"
/>
</object>
<packing>
<property
name=
"expand"
>
True
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
4
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
...
...
@@ -1203,126 +1338,5 @@
</child>
</object>
</child>
<child
type=
"titlebar"
>
<object
class=
"GtkHeaderBar"
id=
"headerbar"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"show_close_button"
>
True
</property>
<child>
<object
class=
"GtkBox"
id=
"header_left_buttonbox"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
32
</property>
<child>
<object
class=
"GtkButton"
id=
"button_back"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"halign"
>
start
</property>
<signal
name=
"clicked"
handler=
"on_button_back_clicked"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"back_image"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
go-previous-symbolic
</property>
<property
name=
"icon_size"
>
1
</property>
</object>
</child>
<style>
<class
name=
"image-button"
/>
</style>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkLabel"
id=
"header_filter_label"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
<child>
<object
class=
"GtkButton"
id=
"select_all_button"
>
<property
name=
"label"
translatable=
"yes"
>
Select All
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
True
</property>
<property
name=
"margin_left"
>
18
</property>
<signal
name=
"clicked"
handler=
"on_select_all_button_clicked"
swapped=
"no"
/>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
3
</property>
</packing>
</child>
</object>
</child>
<child>
<object
class=
"GtkBox"
id=
"header_right_buttonbox"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"spacing"
>
3
</property>
<child>
<object
class=
"GtkToggleButton"
id=
"search_button"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<signal
name=
"toggled"
handler=
"on_search_button_toggled"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"search_image"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
edit-find-symbolic
</property>
</object>
</child>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
0
</property>
</packing>
</child>
<child>
<object
class=
"GtkMenuButton"
id=
"menu_button"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"popover"
>
popovermenu
</property>
<signal
name=
"toggled"
handler=
"on_menu_button_toggled"
swapped=
"no"
/>
<child>
<object
class=
"GtkImage"
id=
"menu_icon"
>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
False
</property>
<property
name=
"icon_name"
>
open-menu-symbolic
</property>
<property
name=
"icon_size"
>
1
</property>
</object>
</child>
<style>
<class
name=
"image-button"
/>
</style>
</object>
<packing>
<property
name=
"expand"
>
False
</property>
<property
name=
"fill"
>
True
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
<packing>
<property
name=
"pack_type"
>
end
</property>
<property
name=
"position"
>
1
</property>
</packing>
</child>
</object>
</child>
</template>
</interface>
resources/transaction_sum_dialog.ui
View file @
947ab246
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.2
0.0
-->
<!-- Generated with glade 3.2
2.1
-->
<interface>
<requires
lib=
"gtk+"
version=
"3.20"
/>
<template
class=
"PamacTransactionSumDialog"
parent=
"GtkDialog"
>
...
...
@@ -11,6 +11,9 @@
<property
name=
"icon_name"
>
system-software-install
</property>
<property
name=
"type_hint"
>
dialog
</property>
<property
name=
"deletable"
>
False
</property>
<child>
<placeholder/>
</child>
<child
internal-child=
"vbox"
>
<object
class=
"GtkBox"
id=
"dialog-vbox6"
>
<property
name=
"can_focus"
>
False
</property>
...
...
@@ -25,6 +28,9 @@
<property
name=
"label"
translatable=
"yes"
>
_Cancel
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"has_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
<property
name=
"use_underline"
>
True
</property>
</object>
...
...
@@ -39,9 +45,6 @@
<property
name=
"label"
translatable=
"yes"
>
Commit
</property>
<property
name=
"visible"
>
True
</property>
<property
name=
"can_focus"
>
True
</property>
<property
name=
"has_focus"
>
True
</property>
<property
name=
"can_default"
>
True
</property>
<property
name=
"has_default"
>
True
</property>
<property
name=
"receives_default"
>
False
</property>
</object>
<packing>
...
...
src/alpm_utils.vala
View file @
947ab246
This diff is collapsed.
Click to expand it.
src/aur.vala
View file @
947ab246
...
...
@@ -25,37 +25,41 @@ namespace Pamac {
const
string
rpc_multiinfo
=
"&type=info"
;
const
string
rpc_multiinfo_arg
=
"&arg[]="
;
Json
.
Array
rpc_query
(
string
uri
)
{
async
Json
.
Array
rpc_query
(
string
uri
)
{
SourceFunc
callback
=
rpc_query
.
callback
;
var
results
=
new
Json
.
Array
();
var
session
=
new
Soup
.
Session
();
// set a 15 seconds timeout because it is also the dbus daemon timeout
session
.
timeout
=
15
;
var
message
=
new
Soup
.
Message
(
"GET"
,
uri
);
var
parser
=
new
Json
.
Parser
();
session
.
send_message
(
message
);
try
{
parser
.
load_from_data
((
string
)
message
.
response_body
.
flatten
().
data
,
-
1
);
}
catch
(
Error
e
)
{
critical
(
e
.
message
);
}
unowned
Json
.
Node
?
root
=
parser
.
get_root
();
if
(
root
!=
null
)
{
if
(
root
.
get_object
().
get_string_member
(
"type"
)
==
"error"
)
{
stderr
.
printf
(
"Failed to query %s from AUR\n"
,
uri
);
}
else
{
results
=
root
.
get_object
().
get_array_member
(
"results"
);
session
.
queue_message
(
message
,
(
sess
,
mess
)
=>
{
try
{
parser
.
load_from_data
((
string
)
mess
.
response_body
.
flatten
().
data
,
-
1
);
unowned
Json
.
Node
?
root
=
parser
.
get_root
();
if
(
root
!=
null
)
{
if
(
root
.
get_object
().
get_string_member
(
"type"
)
==
"error"
)
{
stderr
.
printf
(
"Failed to query %s from AUR\n"
,
uri
);
}
else
{
results
=
root
.
get_object
().
get_array_member
(
"results"
);
}
}
}
catch
(
Error
e
)
{
critical
(
e
.
message
);
}
}
Idle
.
add
((
owned
)
callback
);
});
yield
;
return
results
;
}
internal
Json
.
Array
aur_search
(
string
[]
needles
)
{
internal
async
Json
.
Array
aur_search
(
string
[]
needles
)
{
if
(
needles
.
length
==
0
)
{
return
new
Json
.
Array
();
}
else
{
Json
.
Array
[]
found_array
=
{};
foreach
(
unowned
string
needle
in
needles
)
{
found_array
+=
rpc_query
(
rpc_url
+
rpc_search
+
Uri
.
escape_string
(
needle
));
found_array
+=
yield
rpc_query
(
rpc_url
+
rpc_search
+
Uri
.
escape_string
(
needle
));
}
var
result
=
new
Json
.
Array
();
foreach
(
unowned
Json
.
Array
found
in
found_array
)
{
...
...
@@ -81,17 +85,44 @@ namespace Pamac {
}
}
internal
Json
.
Array
aur_multiinfo
(
string
[]
pkgnames
)
{
internal
async
Json
.
Array
aur_multiinfo
(
string
[]
pkgnames
)
{
if
(
pkgnames
.
length
==
0
)
{
return
new
Json
.
Array
();
}
var
builder
=
new
StringBuilder
();
builder
.
append
(
rpc_url
);
builder
.
append
(
rpc_multiinfo
);
foreach
(
unowned
string
pkgname
in
pkgnames
)
{
builder
.
append
(
rpc_multiinfo_arg
);
builder
.
append
(
Uri
.
escape_string
(
pkgname
));
// query pkgnames hundred by hundred to avoid too long uri error
// example: ros-lunar-desktop
if
(
pkgnames
.
length
<=
100
)
{
var
builder
=
new
StringBuilder
();
builder
.
append
(
rpc_url
);
builder
.
append
(
rpc_multiinfo
);
foreach
(
unowned
string
pkgname
in
pkgnames
)
{
builder
.
append
(
rpc_multiinfo_arg
);
builder
.
append
(
Uri
.
escape_string
(
pkgname
));
}
return
yield
rpc_query
(
builder
.
str
);
}
else
{
var
result
=
new
Json
.
Array
();
int
index_max
=
pkgnames
.
length
-
1
;
int
index
=
0
;
while
(
index
<
index_max
)
{
var
builder
=
new
StringBuilder
();
builder
.
append
(
rpc_url
);
builder
.
append
(
rpc_multiinfo
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
unowned
string
pkgname
=
pkgnames
[
index
];
builder
.
append
(
rpc_multiinfo_arg
);
builder
.
append
(
Uri
.
escape_string
(
pkgname
));
index
++;
if
(
index
==
index_max
)
{
break
;
}
}
var
array
=
yield
rpc_query
(
builder
.
str
);
array
.
foreach_element
((
array
,
index
,
node
)
=>
{
result
.
add_element
(
node
);
});
}
return
result
;
}
return
rpc_query
(
builder
.
str
);
}
}
src/cli.vala
View file @
947ab246
...
...
@@ -99,7 +99,10 @@ namespace Pamac {
}
else
if
(
args
[
2
]
==
"--aur"
||
args
[
2
]
==
"-a"
)
{
init_database
();
database
.
config
.
enable_aur
=
true
;
search_in_aur
(
concatenate_strings
(
args
[
3
:
args
.
length
]));
search_in_aur
.
begin
(
concatenate_strings
(
args
[
3
:
args
.
length
]),
()
=>
{
loop
.
quit
();
});
loop
.
run
();
}
else
if
(
args
[
2
]
==
"--files"
||
args
[
2
]
==
"-f"
)
{
init_database
();
search_files
(
args
[
3
:
args
.
length
]);
...
...
@@ -117,7 +120,10 @@ namespace Pamac {
}
else
if
(
args
[
2
]
==
"--aur"
||
args
[
2
]
==
"-a"
)
{
init_database
();
database
.
config
.
enable_aur
=
true
;
display_aur_infos
(
args
[
3
:
args
.
length
]);
display_aur_infos
.
begin
(
args
[
3
:
args
.
length
],
()
=>
{
loop
.
quit
();
});
loop
.
run
();
}
else
{
init_database
();
display_pkg_infos
(
args
[
2
:
args
.
length
]);
...
...
@@ -245,7 +251,10 @@ namespace Pamac {
}
else
if
(
args
[
1
]
==
"checkupdates"
)
{
if
(
args
.
length
==
2
)
{
init_database
();
checkupdates
();
checkupdates
.
begin
(()
=>
{
loop
.
quit
();
});
loop
.
run
();
}
else
if
(
args
.
length
==
3
)
{
if
(
args
[
2
]
==
"--help"
||
args
[
2
]
==
"-h"
)
{
display_checkupdates_help
();
...
...
@@ -253,7 +262,10 @@ namespace Pamac {
init_database
();
database
.
config
.
enable_aur
=
true
;
database
.
config
.
check_aur_updates
=
true
;
checkupdates
();
checkupdates
.
begin
((
obj
,
res
)
=>
{
loop
.
quit
();
});
loop
.
run
();
}
else
{
display_checkupdates_help
();
}
...
...
@@ -742,8 +754,8 @@ namespace Pamac {
}
}
void
search_in_aur
(
string
search_string
)
{
var
pkgs
=
database
.
search_in_aur
(
search_string
);
async
void
search_in_aur
(
string
search_string
)
{
var
pkgs
=
yield
database
.
search_in_aur
(
search_string
);
if
(
pkgs
.
length
()
==
0
)
{
exit_status
=
1
;
return
;
...
...
@@ -997,7 +1009,7 @@ namespace Pamac {
}
}
void
display_aur_infos
(
string
[]
pkgnames
)
{
async
void
display_aur_infos
(
string
[]
pkgnames
)
{
string
[]
properties
=
{};
properties
+=
dgettext
(
null
,
"Name"
);
properties
+=
dgettext
(
null
,
"Package Base"
);
...
...
@@ -1025,7 +1037,7 @@ namespace Pamac {
}
}
foreach
(
string
pkgname
in
pkgnames
)
{
var
details
=
database
.
get_aur_pkg_details
(
pkgname
);
var
details
=
yield
database
.
get_aur_pkg_details
(
pkgname
);
if
(
details
.
name
==
""
)
{
print_error
(
dgettext
(
null
,
"target not found: %s"
).
printf
(
pkgname
)
+
"\n"
);
return
;
...
...
@@ -1306,8 +1318,8 @@ namespace Pamac {
}
}
void
checkupdates
()
{
var
updates
=
database
.
get_updates
();
async
void
checkupdates
()
{
var
updates
=
yield
database
.
get_updates
();
uint
updates_nb
=
updates
.
repos_updates
.
length
()
+
updates
.
aur_updates
.
length
();
if
(
updates_nb
==
0
)
{
stdout
.
printf
(
"%s.\n"
,
dgettext
(
null
,
"Your system is up-to-date"
));
...
...
@@ -1362,7 +1374,6 @@ namespace Pamac {
dgettext
(
null
,
"AUR"
));
}
}
loop
.
quit
();
}
void
install_pkgs
(
string
[]
targets
)
{
...
...
src/common.vala
View file @
947ab246
...
...
@@ -65,6 +65,7 @@ namespace Pamac {
public
string
installed_version
;
public
string
desc
;
public
double
popularity
;
public
string
packagebase
;
}
struct
AURPackageDetailsStruct
{
...
...
@@ -99,9 +100,4 @@ namespace Pamac {
public
PackageStruct
[]
aur_conflicts_to_remove
;
public
string
[]
aur_pkgbases_to_build
;