Compare commits

...
6 Commits
Author SHA1 Message Date
Ole André Vadla Ravnås 20d5d121b7 subprojects: Prepare for release 2025-06-20 01:13:54 +02:00
Ole André Vadla Ravnås dc71534220 subprojects: Bump outdated 2025-06-20 01:12:26 +02:00
Ole André Vadla Ravnås 35afee9b4a package-manager: Handle tarballs with root entries
Like if there's a directory entry for "package/", or somehow any files
at the root level.
2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås 7b130e6eba package-manager: Fix handling of scoped specs 2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås d28c46c332 package-manager: Fix a stylistic inconsistency 2025-06-20 01:11:39 +02:00
Ole André Vadla Ravnås ab103a73ca package-manager: Simplify substring logic 2025-06-20 01:11:39 +02:00
2 changed files with 12 additions and 13 deletions

No files matched your search

+11 -12
View File
@@ -108,9 +108,9 @@ namespace Frida {
foreach (string spec_str in opts.specs) {
string name, version_spec_val;
int at = spec_str.last_index_of ("@");
if (at != -1) {
name = spec_str.substring (0, at);
version_spec_val = spec_str.substring (at + 1);
if (at > 0) {
name = spec_str[:at];
version_spec_val = spec_str[at + 1:];
} else {
name = spec_str;
version_spec_val = "latest";
@@ -712,9 +712,8 @@ namespace Frida {
File sub_deps_parent_node_modules_dir = target_dir.get_child ("node_modules");
PackageDependencies dependencies_to_recurse = rpd.dependencies;
if (!dependencies_to_recurse.all.is_empty) {
if (!dependencies_to_recurse.all.is_empty)
FS.mkdirp (sub_deps_parent_node_modules_dir, cancellable);
}
foreach (PackageDependency d in dependencies_to_recurse.all.values) {
bool install_this_sub_dep = d.role == RUNTIME || d.role == OPTIONAL;
@@ -1617,10 +1616,10 @@ namespace Frida {
string core_part_of_spec = stripped_spec;
int plus_idx = core_part_of_spec.index_of_char ('+');
if (plus_idx != -1)
core_part_of_spec = core_part_of_spec.substring (0, plus_idx);
core_part_of_spec = core_part_of_spec[:plus_idx];
int dash_idx = core_part_of_spec.index_of_char ('-');
if (dash_idx != -1)
core_part_of_spec = core_part_of_spec.substring (0, dash_idx);
core_part_of_spec = core_part_of_spec[:dash_idx];
return count_char (core_part_of_spec, '.') == 2;
} catch (Error e) {
@@ -1942,11 +1941,11 @@ namespace Frida {
string size_field = header.read_fixed_string (124, 12).split (" ")[0];
uint64 file_size = 0;
if (!uint64.try_parse (size_field, out file_size, null, 8))
throw new Error.PROTOCOL ("Invalid tarball size (file '%s' corrupt)", safe_entry);
throw new Error.PROTOCOL ("Invalid tarball size (file '%s' corrupt)", name);
var typeflag = (char) header.read_uint8 (156);
if (typeflag == '0' || typeflag == '\0') {
if ((typeflag == '0' || typeflag == '\0') && safe_entry != "") {
current_file = root.get_child (safe_entry);
FS.mkdirp (current_file.get_parent (), cancellable);
try {
@@ -1972,9 +1971,9 @@ namespace Frida {
private static string sanitize_entry (string name, File root) throws Error {
int slash = name.index_of ("/");
string entry = (slash == -1) ? name : name[slash + 1:];
if (entry.length == 0)
throw new Error.PROTOCOL ("Empty tar entry name: %s", name);
string entry = (slash == -1) ? "" : name[slash + 1:];
if (entry == "")
return entry;
entry = entry.replace ("/", Path.DIR_SEPARATOR_S);
+1 -1
View File
@@ -1,6 +1,6 @@
[wrap-git]
url = https://github.com/frida/frida-gum.git
revision = 17.2.2
revision = 17.2.3
depth = 1
[provide]