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
f86b9652
Commit
f86b9652
authored
Sep 22, 2018
by
guinux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove /tmp/pamac-checkdbs when force_refresh
parent
13862764
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
src/alpm_utils.vala
src/alpm_utils.vala
+15
-6
No files found.
src/alpm_utils.vala
View file @
f86b9652
...
...
@@ -1274,18 +1274,27 @@ namespace Pamac {
write_log_file
(
"synchronizing package lists"
);
cancellable
.
reset
();
int
force
=
(
force_refresh
)
?
1
:
0
;
// try to copy refresh dbs in tmp
string
tmp_dbpath
=
"/tmp/pamac-checkdbs"
;
var
file
=
GLib
.
File
.
new_for_path
(
tmp_dbpath
);
if
(
file
.
query_exists
())
{
if
(
force_refresh
)
{
// remove dbs in tmp
try
{
Process
.
spawn_command_line_sync
(
"
cp -au %s/sync %s"
.
printf
(
tmp_dbpath
,
alpm_handle
.
dbpath
));
Process
.
spawn_command_line_sync
(
"
rm -rf %s"
.
printf
(
tmp_
dbpath
));
}
catch
(
SpawnError
e
)
{
stderr
.
printf
(
"SpawnError: %s\n"
,
e
.
message
);
}
}
else
{
// try to copy refresh dbs in tmp
var
file
=
GLib
.
File
.
new_for_path
(
tmp_dbpath
);
if
(
file
.
query_exists
())
{
try
{
Process
.
spawn_command_line_sync
(
"cp -au %s/sync %s"
.
printf
(
tmp_dbpath
,
alpm_handle
.
dbpath
));
}
catch
(
SpawnError
e
)
{
stderr
.
printf
(
"SpawnError: %s\n"
,
e
.
message
);
}
}
// a new handle is required to use copied databases
refresh_handle
();
}
// a new handle is required to use copied databases
refresh_handle
();
// update ".db"
bool
success
=
update_dbs
(
alpm_handle
,
force
);
if
(
cancellable
.
is_cancelled
())
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment