1.1 --- a/librazor/root.c Mon Jun 23 17:19:20 2008 -0400
1.2 +++ b/librazor/root.c Thu Jun 26 07:17:48 2008 +0100
1.3 @@ -9,6 +9,9 @@
1.4 #include "razor-internal.h"
1.5
1.6 static const char system_repo_filename[] = "system.repo";
1.7 +static const char system_repo_details_filename[] = "system-details.repo";
1.8 +static const char system_repo_files_filename[] = "system-files.repo";
1.9 +
1.10 static const char next_repo_filename[] = "system-next.repo";
1.11 static const char razor_root_path[] = "/var/lib/razor";
1.12
1.13 @@ -25,7 +28,7 @@
1.14 {
1.15 struct stat buf;
1.16 struct razor_set *set;
1.17 - char path[PATH_MAX];
1.18 + char path[PATH_MAX], details_path[PATH_MAX], files_path[PATH_MAX];
1.19
1.20 if (stat(root, &buf) < 0) {
1.21 if (mkdir(root, 0777) < 0) {
1.22 @@ -53,12 +56,18 @@
1.23 set = razor_set_create();
1.24 snprintf(path, sizeof path, "%s%s/%s",
1.25 root, razor_root_path, system_repo_filename);
1.26 + snprintf(details_path, sizeof details_path, "%s%s/%s",
1.27 + root, razor_root_path, system_repo_details_filename);
1.28 + snprintf(files_path, sizeof files_path, "%s%s/%s",
1.29 + root, razor_root_path, system_repo_files_filename);
1.30 if (stat(path, &buf) == 0) {
1.31 fprintf(stderr,
1.32 "a razor install root is already initialized\n");
1.33 return -1;
1.34 }
1.35 - if (razor_set_write(set, path, RAZOR_REPO_FILE_MAIN) < 0) {
1.36 + if (razor_set_write(set, path, RAZOR_REPO_FILE_MAIN) < 0 ||
1.37 + razor_set_write(set, details_path, RAZOR_REPO_FILE_DETAILS) < 0 ||
1.38 + razor_set_write(set, files_path, RAZOR_REPO_FILE_FILES) < 0 ) {
1.39 fprintf(stderr, "could not write initial package set\n");
1.40 return -1;
1.41 }