mirror of
https://github.com/RubyMetric/chsrc
synced 2026-10-26 01:54:44 +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/version.h"
|
||||||
#include "framework/foundation.c"
|
#include "framework/foundation.c"
|
||||||
#include "framework/OS.c"
|
#include "framework/OS.c"
|
||||||
#include "framework/chef.c"
|
|
||||||
#include "framework/dish.c"
|
#include "framework/dish.c"
|
||||||
|
#include "framework/chef.c"
|
||||||
#include "framework/source.c"
|
#include "framework/source.c"
|
||||||
|
|
||||||
/* 某些特殊 recipe 需要依赖 toml 解析库 */
|
/* 某些特殊 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);
|
Dish_t *sub_dish = xy_seq_at (dish->sub_dishes, i);
|
||||||
sub_dish->preparefn();
|
sub_dish->preparefn();
|
||||||
println (bdpurple (sub_dish->aliases));
|
println (bdpurple (sub_dish->aliases));
|
||||||
/* 嵌套的 group dish 的处理 */
|
/* 嵌套的 combo 的处理 */
|
||||||
if (dish_has_sub_dishes(sub_dish))
|
if (dish_has_sub_dishes(sub_dish))
|
||||||
{
|
{
|
||||||
chefs_handle_List_Info (sub_dish, dish_get_first_alias(sub_dish), option);
|
chefs_handle_List_Info (sub_dish, dish_get_first_alias(sub_dish), option);
|
||||||
|
|||||||
+18
-12
@@ -5,7 +5,7 @@
|
|||||||
* File Authors : @ccmywish
|
* File Authors : @ccmywish
|
||||||
* Contributors : @BingChunMoLi
|
* Contributors : @BingChunMoLi
|
||||||
* Created On : <2025-08-09>
|
* Created On : <2025-08-09>
|
||||||
* Last Modified : <2026-08-14>
|
* Last Modified : <2026-08-20>
|
||||||
*
|
*
|
||||||
* 本文件的函数能够帮助 chefs 为一个 dish 定义 recipe
|
* 本文件的函数能够帮助 chefs 为一个 dish 定义 recipe
|
||||||
* ------------------------------------------------------------*/
|
* ------------------------------------------------------------*/
|
||||||
@@ -68,19 +68,25 @@ chef_debug_dish (Dish_t *dish)
|
|||||||
|
|
||||||
say ("DEBUG Dish Information:");
|
say ("DEBUG Dish Information:");
|
||||||
printf (" Aliases: %s\n", dish->aliases);
|
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 (" Prepare Function: %p\n", dish->preparefn);
|
||||||
|
|
||||||
printf (" Prepared?: %d\n", dish->prepared);
|
printf (" Prepared?: %d\n", dish->prepared);
|
||||||
|
|
||||||
printf (" Sources: %p\n", dish->sources);
|
if (dish_has_sub_dishes(dish))
|
||||||
printf (" Sources Count: %d\n", dish->sources_n);
|
{
|
||||||
|
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 (" Sources: %p\n", dish->sources);
|
||||||
printf (" Sauciers Count: %d\n", xy_seq_len(dish->sauciers));
|
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
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -140,7 +146,7 @@ chef_set_provider_smURL (SourceProvider_t *provider, char *url)
|
|||||||
{
|
{
|
||||||
provider->psmi.skip = NotSkip;
|
provider->psmi.skip = NotSkip;
|
||||||
provider->psmi.url = xy_strdup (url);
|
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)
|
chef_set_provider_sm_accuracy (SourceProvider_t *provider, bool accuracy)
|
||||||
{
|
{
|
||||||
provider->psmi.accurate = 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_prep_this_dish (pl_uv, NOOP);
|
||||||
|
|
||||||
chef_set_recipe_created_on (this, "2026-08-12");
|
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_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