mirror of
https://github.com/RubyMetric/chsrc
synced 2026-10-25 17:36:32 +08:00
chef.c 将依赖于 dish.c
This commit is contained in:
3 files changed
+23
-18
No files matched your search
+2
-2
@@ -36,8 +36,8 @@
|
||||
#include "framework/version.h"
|
||||
#include "framework/foundation.c"
|
||||
#include "framework/OS.c"
|
||||
#include "framework/chef.c"
|
||||
#include "framework/dish.c"
|
||||
#include "framework/chef.c"
|
||||
#include "framework/source.c"
|
||||
|
||||
/* 某些特殊 recipe 需要依赖 toml 解析库 */
|
||||
@@ -699,7 +699,7 @@ chefs_handle_List_Info (Dish_t *dish, const char *input, char *option)
|
||||
Dish_t *sub_dish = xy_seq_at (dish->sub_dishes, i);
|
||||
sub_dish->preparefn();
|
||||
println (bdpurple (sub_dish->aliases));
|
||||
/* 嵌套的 group dish 的处理 */
|
||||
/* 嵌套的 combo 的处理 */
|
||||
if (dish_has_sub_dishes(sub_dish))
|
||||
{
|
||||
chefs_handle_List_Info (sub_dish, dish_get_first_alias(sub_dish), option);
|
||||
|
||||
+18
-12
@@ -5,7 +5,7 @@
|
||||
* File Authors : @ccmywish
|
||||
* Contributors : @BingChunMoLi
|
||||
* Created On : <2025-08-09>
|
||||
* Last Modified : <2026-08-14>
|
||||
* Last Modified : <2026-08-20>
|
||||
*
|
||||
* 本文件的函数能够帮助 chefs 为一个 dish 定义 recipe
|
||||
* ------------------------------------------------------------*/
|
||||
@@ -68,19 +68,25 @@ chef_debug_dish (Dish_t *dish)
|
||||
|
||||
say ("DEBUG Dish Information:");
|
||||
printf (" Aliases: %s\n", dish->aliases);
|
||||
|
||||
printf (" Get Function: %p\n", dish->getfn);
|
||||
printf (" Set Function: %p\n", dish->setfn);
|
||||
printf (" Reset Function: %p\n", dish->resetfn);
|
||||
printf (" Prepare Function: %p\n", dish->preparefn);
|
||||
|
||||
printf (" Prepared?: %d\n", dish->prepared);
|
||||
|
||||
printf (" Sources: %p\n", dish->sources);
|
||||
printf (" Sources Count: %d\n", dish->sources_n);
|
||||
if (dish_has_sub_dishes(dish))
|
||||
{
|
||||
printf (" Sub Dishes Count: %d\n", xy_seq_len(dish->sub_dishes));
|
||||
}
|
||||
else
|
||||
{
|
||||
printf (" Get Function: %p\n", dish->getfn);
|
||||
printf (" Set Function: %p\n", dish->setfn);
|
||||
printf (" Reset Function: %p\n", dish->resetfn);
|
||||
|
||||
printf (" Chefs Count: %d\n", xy_seq_len(dish->chefs));
|
||||
printf (" Sauciers Count: %d\n", xy_seq_len(dish->sauciers));
|
||||
printf (" Sources: %p\n", dish->sources);
|
||||
printf (" Sources Count: %d\n", dish->sources_n);
|
||||
|
||||
printf (" Chefs Count: %d\n", xy_seq_len(dish->chefs));
|
||||
printf (" Sauciers Count: %d\n", xy_seq_len(dish->sauciers));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -140,7 +146,7 @@ chef_set_provider_smURL (SourceProvider_t *provider, char *url)
|
||||
{
|
||||
provider->psmi.skip = NotSkip;
|
||||
provider->psmi.url = xy_strdup (url);
|
||||
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速链接: ", url));
|
||||
chsrc_debug ("chef", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速链接: ", url));
|
||||
}
|
||||
|
||||
|
||||
@@ -153,7 +159,7 @@ void
|
||||
chef_set_provider_sm_accuracy (SourceProvider_t *provider, bool accuracy)
|
||||
{
|
||||
provider->psmi.accurate = accuracy;
|
||||
chsrc_debug ("m", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速精度: ", accuracy ? "精准" : "粗略"));
|
||||
chsrc_debug ("chef", xy_strcat (4, "recipe 重新为 ", provider->code, "(镜像站信息本身) 设置测速精度: ", accuracy ? "精准" : "粗略"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,10 +10,9 @@ pl_uv_prepare (void)
|
||||
chef_prep_this_dish (pl_uv, NOOP);
|
||||
|
||||
chef_set_recipe_created_on (this, "2026-08-12");
|
||||
chef_set_recipe_last_updated (this, "2026-08-19");
|
||||
chef_set_recipe_last_updated (this, "2026-08-20");
|
||||
|
||||
chef_set_sub_dishes (this, 2, &pl_uv_pypi_index_dish, &pl_uv_python_build_dish);
|
||||
chef_set_sub_dishes (this, 2, &pl_uv_pypi_index_dish,
|
||||
&pl_uv_python_build_dish);
|
||||
chef_set_all_sub_dishes_use_same_source (this, false);
|
||||
|
||||
chef_use_other_dish_sources (this, &pl_pypi_dish);
|
||||
}
|
||||
Reference in new issue
Block a user