Skip to content

Commit

Permalink
disable quarantine import if binary build disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Oct 16, 2024
1 parent 834ca51 commit 6f9e685
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/operations/package-manager/build.vala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ private static int build_operation (string[] args) {
error_add("Build path: %s (%s)".printf(bd.ymp_build.ympbuild_buildpath, arg));
return r;
}
if(get_bool("install")) {
if(get_bool("install") && !get_bool("no-binary")) {
quarantine_import_from_path(bd.ymp_build.ympbuild_buildpath);
quarantine_install ();
quarantine_reset ();
Expand Down
13 changes: 7 additions & 6 deletions src/util/build.vala
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,7 @@ public class builder {
restore_env();
return 1;
}
if (!build_target.create_metadata_info()) {
error_add(_("Failed to create metadata: %s").printf(srcpath));
set_bool("unsafe", unsafe);
restore_env();
return 1;
}

// Set build target again (emerge change build target)
ymp_build.set_ympbuild_srcpath(srcpath);
string build_path = srealpath(get_build_dir() + "/" + calculate_md5sum(srcpath + "/ympbuild"));
Expand Down Expand Up @@ -162,6 +157,12 @@ public class builder {
}
}
if (!get_bool("no-binary")) {
if (!build_target.create_metadata_info()) {
error_add(_("Failed to create metadata: %s").printf(srcpath));
set_bool("unsafe", unsafe);
restore_env();
return 1;
}
info("Create binary package");
if (!extract_package_sources()) {
set_bool("unsafe", unsafe);
Expand Down
1 change: 1 addition & 0 deletions src/util/builder_target/ymp.vala
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ private static void build_target_ymp_init() {
ymp_target.builder.output_package_name = name + "_" + version + "_" + release;
create_dir(buildpath);
writefile(buildpath + "/metadata.yaml", trim(new_data));
print(buildpath + "/metadata.yaml");
return true;
});

Expand Down

0 comments on commit 6f9e685

Please sign in to comment.