update: better handling of the keep files
This commit is contained in:
@ -12,7 +12,7 @@ int main(int argc, char *argv[]) {
|
||||
int ret = EXIT_FAILURE;
|
||||
|
||||
char pooldir[strlen(TEMP_DIR) + 10];
|
||||
sprintf(pooldir, "%s/%s", TEMP_DIR, "pool");
|
||||
sprintf(pooldir, "%s/%s", DATA_DIR, "pool");
|
||||
|
||||
if (argc != 4) {
|
||||
printf("usage: %s <package name> <pool name> <pool url>\n", argv[0]);
|
||||
|
@ -17,11 +17,19 @@ int main(int argc, char *argv[]) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
char pooldir[strlen(TEMP_DIR) + 10];
|
||||
sprintf(pooldir, "%s/%s", DATA_DIR, "pool");
|
||||
|
||||
if (!lm_ctx_init(&ctx, ROOT_DIR, TEMP_DIR, DATA_DIR)) {
|
||||
printf("failed to init the ctx: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
if (lm_ctx_pool_add(&ctx, argv[1], argv[2], pooldir) == NULL) {
|
||||
printf("failed to add pool: %s (%d)\n", lm_strerror(), lm_error());
|
||||
goto end;
|
||||
}
|
||||
|
||||
lm_ctx_ping(&ctx, NULL, NULL);
|
||||
lm_ctx_sync(&ctx, true, NULL, NULL);
|
||||
|
||||
|
Reference in New Issue
Block a user