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
a7ac8851
Commit
a7ac8851
authored
Sep 30, 2018
by
Philip Müller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix multiple PKGBUILD edits
parent
e6d4d426
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
38 additions
and
52 deletions
+38
-52
src/transaction.vala
src/transaction.vala
+38
-52
No files found.
src/transaction.vala
View file @
a7ac8851
...
...
@@ -321,64 +321,48 @@ namespace Pamac {
build_cancellable
.
reset
();
important_details_outpout
(
false
);
string
[]
built_pkgs
=
{};
int
status
=
1
;
string
builddir
=
Path
.
build_path
(
"/"
,
database
.
config
.
aur_build_dir
,
"pamac-build"
);
status
=
yield
run_cmd_line
({
"mkdir"
,
"-p"
,
builddir
},
"/"
,
build_cancellable
);
string
pkgdir
=
Path
.
build_path
(
"/"
,
database
.
config
.
aur_build_dir
,
"pamac-build"
,
pkgname
);
// building
building
=
true
;
start_building
();
int
status
=
yield
run_cmd_line
({
"makepkg"
,
"-cf"
},
pkgdir
,
build_cancellable
);
if
(
build_cancellable
.
is_cancelled
())
{
status
=
1
;
}
if
(
status
==
0
)
{
status
=
yield
run_cmd_line
({
"rm"
,
"-rf"
,
pkgname
},
builddir
,
build_cancellable
);
if
(
build_cancellable
.
is_cancelled
())
{
status
=
1
;
}
if
(
status
==
0
)
{
building
=
true
;
start_building
();
status
=
yield
run_cmd_line
({
"git"
,
"clone"
,
"https://aur.archlinux.org/%s.git"
.
printf
(
pkgname
)},
builddir
,
build_cancellable
);
if
(
build_cancellable
.
is_cancelled
())
{
status
=
1
;
// get built pkgs path
var
launcher
=
new
SubprocessLauncher
(
SubprocessFlags
.
STDOUT_PIPE
);
launcher
.
set_cwd
(
pkgdir
);
try
{
Subprocess
process
=
launcher
.
spawnv
({
"makepkg"
,
"--packagelist"
});
yield
process
.
wait_async
(
null
);
if
(
process
.
get_if_exited
())
{
status
=
process
.
get_exit_status
();
}
if
(
status
==
0
)
{
string
pkgdir
=
"%s/%s"
.
printf
(
builddir
,
pkgname
);
status
=
yield
run_cmd_line
({
"makepkg"
,
"-cf"
},
pkgdir
,
build_cancellable
);
if
(
build_cancellable
.
is_cancelled
())
{
status
=
1
;
}
if
(
status
==
0
)
{
// get built pkgs path
var
launcher
=
new
SubprocessLauncher
(
SubprocessFlags
.
STDOUT_PIPE
);
launcher
.
set_cwd
(
pkgdir
);
try
{
Subprocess
process
=
launcher
.
spawnv
({
"makepkg"
,
"--packagelist"
});
yield
process
.
wait_async
(
null
);
if
(
process
.
get_if_exited
())
{
status
=
process
.
get_exit_status
();
}
if
(
status
==
0
)
{
var
dis
=
new
DataInputStream
(
process
.
get_stdout_pipe
());
string
?
line
;
// Read lines until end of file (null) is reached
while
((
line
=
dis
.
read_line
())
!=
null
)
{
var
file
=
GLib
.
File
.
new_for_path
(
line
);
string
filename
=
file
.
get_basename
();
string
name_version_release
=
filename
.
slice
(
0
,
filename
.
last_index_of_char
(
'-'
));
string
name_version
=
name_version_release
.
slice
(
0
,
name_version_release
.
last_index_of_char
(
'-'
));
string
name
=
name_version
.
slice
(
0
,
name_version
.
last_index_of_char
(
'-'
));
if
(
name
in
aur_pkgs_to_install
)
{
if
(!(
line
in
built_pkgs
))
{
built_pkgs
+=
line
;
}
}
}
var
dis
=
new
DataInputStream
(
process
.
get_stdout_pipe
());
string
?
line
;
// Read lines until end of file (null) is reached
while
((
line
=
dis
.
read_line
())
!=
null
)
{
var
file
=
GLib
.
File
.
new_for_path
(
line
);
string
filename
=
file
.
get_basename
();
string
name_version_release
=
filename
.
slice
(
0
,
filename
.
last_index_of_char
(
'-'
));
string
name_version
=
name_version_release
.
slice
(
0
,
name_version_release
.
last_index_of_char
(
'-'
));
string
name
=
name_version
.
slice
(
0
,
name_version
.
last_index_of_char
(
'-'
));
if
(
name
in
aur_pkgs_to_install
)
{
if
(!(
line
in
built_pkgs
))
{
built_pkgs
+=
line
;
}
}
catch
(
Error
e
)
{
stderr
.
printf
(
"Error: %s\n"
,
e
.
message
);
status
=
1
;
}
}
}
stop_building
();
building
=
false
;
}
catch
(
Error
e
)
{
stderr
.
printf
(
"Error: %s\n"
,
e
.
message
);
status
=
1
;
}
}
stop_building
();
building
=
false
;
if
(
status
==
0
&&
built_pkgs
.
length
>
0
)
{
no_confirm_commit
=
true
;
emit_script_output
(
""
);
...
...
@@ -800,7 +784,7 @@ namespace Pamac {
}
if
(
build_files_to_review
.
length
>
0
)
{
release
();
review_build_files_and_reprepare
.
begin
(
build_files_to_review
);
review_build_files_and_reprepare
.
begin
(
(
owned
)
build_files_to_review
);
return
;
}
// populate build queue
...
...
@@ -845,8 +829,10 @@ namespace Pamac {
}
}
async
void
review_build_files_and_reprepare
(
string
[]
build_files_to_review
)
{
foreach
(
string
name
in
build_files_to_review
)
{
async
void
review_build_files_and_reprepare
(
owned
string
[]
build_files_to_review
)
{
// keep string during review_build_files
string
[]
build_files
=
(
owned
)
build_files_to_review
;
foreach
(
unowned
string
name
in
build_files
)
{
yield
review_build_files
(
name
);
build_files_reviewed
.
add
(
name
);
}
...
...
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