Commit a5d9e2eb authored by William Pitcock's avatar William Pitcock

add: child dependencies can never take a pinning, give a useful error

parent dc729812
......@@ -136,9 +136,10 @@ static int add_main(void *ctx, struct apk_database *db, struct apk_string_array
apk_blob_t b = APK_BLOB_STR(*parg);
apk_blob_pull_dep(&b, db, &dep);
if (APK_BLOB_IS_NULL(b) || b.len > 0) {
apk_error("'%s' is not a valid dependency, format is name(@tag)([<>~=]version)",
*parg);
if (APK_BLOB_IS_NULL(b) || b.len > 0 || (virtpkg != NULL && dep.repository_tag)) {
apk_error("'%s' is not a valid %s dependency, format is %s",
*parg, virtpkg == NULL ? "world" : "child",
virtpkg == NULL ? "name(@tag)([<>~=]version)" : "name([<>~=]version)");
return -1;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment