rename the .repo files to .rzdb files
authorRichard Hughes <richard@hughsie.com>
Wed, 2 Jul 2008 17:46:47 +0000 (18:46 +0100)
committerRichard Hughes <richard@hughsie.com>
Wed, 2 Jul 2008 17:46:47 +0000 (18:46 +0100)
TODO
data/razor.sh
docs/DEPSOLVE.txt
librazor/root.c
src/.gitignore
src/main.c
src/rpm.c

diff --git a/TODO b/TODO
index 2b2c6dd..46cedcb 100644 (file)
--- a/TODO
+++ b/TODO
@@ -51,7 +51,7 @@ Towards replacing rpm + yum (0.1):
   as a target, we can restart if needed.  Probably don't need to, can
   just do a new update.  During a sub-transaction we should keep the
   target set (i.e. the current set to be) around as a lock file
-  (system.repo.lock or so, see git) so that razor updates are
+  (system.rzdb.lock or so, see git) so that razor updates are
   prevented if the systems crashes during an update.
 
 - implement depsolving between multiple package sets by creating an
@@ -65,7 +65,7 @@ Towards replacing rpm + yum (0.1):
   and a read-write set from a r/w fs.
 
 - locking: we use advisory file locking on the system set
-  (/var/lib/razor/system.repo) to indicate a transaction is in
+  (/var/lib/razor/system.rzdb) to indicate a transaction is in
   progress.  The locking algorithm is as follows:
 
     1. obtain advisory lock on system set.  if this is already taken,
@@ -73,17 +73,17 @@ Towards replacing rpm + yum (0.1):
        we have to wait.  there's a fcntl that lets you block for the
        lock to go away.
 
-    2. if a system-next.repo file already exists an earlier razor
+    2. if a system-next.rzdb file already exists an earlier razor
        process was interrupted or crashed and we may want to clean
-       that up.  the system-next.repo file will record what the
+       that up.  the system-next.rzdb file will record what the
        previous instance was trying to do and we can just replay that
        to clean up.
 
     3. create the new package set whichever way and write it to
-       system-next.repo, then start installing/removing rpms.
+       system-next.rzdb, then start installing/removing rpms.
 
-    4. When the update is complete, rename system-next.repo to
-       system.repo and remove the advisory lock.
+    4. When the update is complete, rename system-next.rzdb to
+       system.rzdb and remove the advisory lock.
 
   we should probably introduce a new object that encapsulates this
   sequence, the filename conventions, rpm cache, e.g. struct
@@ -125,7 +125,7 @@ Package set file format items:
   string so its index is 0), or maybe just require that it's the first
   section in the file.
 
-- nail down byte-order of repo file.
+- nail down byte-order of rzdb file.
 
 - version the sections in the file, put the element size in the header
   so we can add stuff to elements in a backwards compatible way.
@@ -156,10 +156,10 @@ Misc ideas:
   way we can assign them unique IDs immediately (like tokenizing
   strings).
 
-- test suite should be easy, just keep .repo files around and test
+- test suite should be easy, just keep .rzdb files around and test
   different type of upgrades that way (obsoletes, conflicts, file
   conflicts, file/dir problems etc).  Or maybe just keep a simple file
-  format ad use a custom importer to create the .repo files.
+  format ad use a custom importer to create the .rzdb files.
 
 - overlay package sets?  mount a read-only /usr over nfs or from the
   virt-host and have a local package set overlaid over the read-only
@@ -174,14 +174,14 @@ Misc ideas:
   base.
 
 - incremental rawhide repo updates? instead of downloading 10MB zipped
-  repo every time, download a diff repo?  Should be pretty small,
+  repo every time, download a diff rzdb?  Should be pretty small,
   especially if we don't have file checksums in metadata.  Filenames
   and properties are for the most part already present, typically just
   a version bump plus maybe tweaking a couple requires.  The upstream
   repo can store multiple incremental updates in one big file and
   provide an index file that maps updates for a given date (we should
   use repo-file checksums though) to a range in the file: Download the
-  index file, search for a match for your latest rawhide.repo file,
+  index file, search for a match for your latest rawhide.rzdb file,
   download range of updates that brings it up to date.
 
 - use hash tables for dirs when importing files to avoid qsorting all
index 3d578b3..49b0ce5 100644 (file)
@@ -12,7 +12,7 @@ __razor_packages () {
 __razor_upstream_packages () {
     local IFS=$'\n'
 
-    COMPREPLY=($(RAZOR_REPO=rawhide.repo razor list --only-names "$1*" | while read p; do echo "$p "; done))
+    COMPREPLY=($(RAZOR_REPO=rawhide.rzdb razor list --only-names "$1*" | while read p; do echo "$p "; done))
 }
 
 __razor_files() {
index fce8698..43e670a 100644 (file)
@@ -179,7 +179,7 @@ requested installations and removals.
     FIXME: what about multiple upstream repos? Having to deal with
     arbitrary numbers of razor_sets is possible, but will probably be
     messy... It might be easier to either store all upstream repo data
-    in a single .repo file, or else merge all upstream .repo files
+    in a single .rzdb file, or else merge all upstream .rzdb files
     together into a single razor_set at startup. (Or some combination
     of those.)
 
index d574539..6457dcf 100644 (file)
 #include "razor.h"
 #include "razor-internal.h"
 
-static const char system_repo_filename[] = "system.repo";
-static const char system_repo_details_filename[] = "system-details.repo";
-static const char system_repo_files_filename[] = "system-files.repo";
+static const char system_repo_filename[] = "system.rzdb";
+static const char system_repo_details_filename[] = "system-details.rzdb";
+static const char system_repo_files_filename[] = "system-files.rzdb";
 
-static const char next_repo_filename[] = "system-next.repo";
+static const char next_repo_filename[] = "system-next.rzdb";
 static const char razor_root_path[] = "/var/lib/razor";
 
 struct razor_root {
index c395a0d..501c34d 100644 (file)
@@ -3,7 +3,7 @@
 razor
 rpm
 test-driver
-*.repo
+*.rzdb
 *.xml.gz
 install
 rpms
index 71ed6fe..9f8122f 100644 (file)
 #include <errno.h>
 #include "razor.h"
 
-static const char system_repo_filename[] = "system.repo";
-static const char next_repo_filename[] = "system-next.repo";
-static const char rawhide_repo_filename[] = "rawhide.repo";
-static const char updated_repo_filename[] = "system-updated.repo";
+static const char system_repo_filename[] = "system.rzdb";
+static const char next_repo_filename[] = "system-next.rzdb";
+static const char rawhide_repo_filename[] = "rawhide.rzdb";
+static const char updated_repo_filename[] = "system-updated.rzdb";
 static const char install_root[] = "install";
 static const char *repo_filename = system_repo_filename;
 static const char *yum_url;
@@ -213,7 +213,7 @@ command_list_files(int argc, const char *argv[])
        set = razor_set_open(repo_filename);
        if (set == NULL)
                return 1;
-       if (razor_set_open_files(set, "system-files.repo"))
+       if (razor_set_open_files(set, "system-files.rzdb"))
                return 1;
 
        razor_set_list_files(set, argv[0]);
@@ -231,7 +231,7 @@ command_list_file_packages(int argc, const char *argv[])
        set = razor_set_open(repo_filename);
        if (set == NULL)
                return 1;
-       if (razor_set_open_files(set, "system-files.repo"))
+       if (razor_set_open_files(set, "system-files.rzdb"))
                return 1;
 
        pi = razor_package_iterator_create_for_file(set, argv[0]);
@@ -254,7 +254,7 @@ command_list_package_files(int argc, const char *argv[])
        set = razor_set_open(repo_filename);
        if (set == NULL)
                return 1;
-       if (razor_set_open_files(set, "system-files.repo"))
+       if (razor_set_open_files(set, "system-files.rzdb"))
                return 1;
 
        pi = create_iterator_from_argv(set, argc, argv);
@@ -418,8 +418,8 @@ command_import_yum(int argc, const char *argv[])
        if (set == NULL)
                return 1;
        razor_set_write(set, rawhide_repo_filename, RAZOR_REPO_FILE_MAIN);
-       razor_set_write(set, "rawhide-details.repo", RAZOR_REPO_FILE_DETAILS);
-       razor_set_write(set, "rawhide-files.repo", RAZOR_REPO_FILE_FILES);
+       razor_set_write(set, "rawhide-details.rzdb", RAZOR_REPO_FILE_DETAILS);
+       razor_set_write(set, "rawhide-files.rzdb", RAZOR_REPO_FILE_FILES);
        razor_set_destroy(set);
        printf("wrote %s\n", rawhide_repo_filename);
 
@@ -435,8 +435,8 @@ command_import_rpmdb(int argc, const char *argv[])
        if (set == NULL)
                return 1;
        razor_set_write(set, repo_filename, RAZOR_REPO_FILE_MAIN);
-       razor_set_write(set, "system-details.repo", RAZOR_REPO_FILE_DETAILS);
-       razor_set_write(set, "system-files.repo", RAZOR_REPO_FILE_FILES);
+       razor_set_write(set, "system-details.rzdb", RAZOR_REPO_FILE_DETAILS);
+       razor_set_write(set, "system-files.rzdb", RAZOR_REPO_FILE_FILES);
        razor_set_destroy(set);
        printf("wrote %s\n", repo_filename);
 
@@ -522,7 +522,7 @@ command_update(int argc, const char *argv[])
        razor_set_write(set, updated_repo_filename, RAZOR_REPO_FILE_MAIN);
        razor_set_destroy(set);
        razor_set_destroy(upstream);
-       printf("wrote system-updated.repo\n");
+       printf("wrote system-updated.rzdb\n");
 
        return 0;
 }
@@ -555,7 +555,7 @@ command_remove(int argc, const char *argv[])
        razor_set_write(set, updated_repo_filename, RAZOR_REPO_FILE_MAIN);
        razor_set_destroy(set);
        razor_set_destroy(upstream);
-       printf("wrote system-updated.repo\n");
+       printf("wrote system-updated.rzdb\n");
 
        return 0;
 }
@@ -648,8 +648,8 @@ command_import_rpms(int argc, const char *argv[])
        set = razor_importer_finish(importer);
 
        razor_set_write(set, repo_filename, RAZOR_REPO_FILE_MAIN);
-       razor_set_write(set, "system-details.repo", RAZOR_REPO_FILE_DETAILS);
-       razor_set_write(set, "system-files.repo", RAZOR_REPO_FILE_FILES);
+       razor_set_write(set, "system-details.rzdb", RAZOR_REPO_FILE_DETAILS);
+       razor_set_write(set, "system-files.rzdb", RAZOR_REPO_FILE_FILES);
        razor_set_destroy(set);
        printf("wrote %s\n", repo_filename);
 
@@ -868,7 +868,7 @@ command_info(int argc, const char *argv[])
        set = razor_set_open(repo_filename);
        if (set == NULL)
                return 1;
-       if (razor_set_open_details(set, "system-details.repo"))
+       if (razor_set_open_details(set, "system-details.rzdb"))
                return 1;
        pi = razor_package_iterator_create(set);
        while (razor_package_iterator_next(pi, &package,
@@ -924,7 +924,8 @@ command_search(int argc, const char *argv[])
        set = razor_set_open(rawhide_repo_filename);
        if (set == NULL)
                return 1;
-       if (razor_set_open_details(set, "rawhide-details.repo"))
+
+       if (razor_set_open_details(set, "rawhide-details.rzdb"))
                return 1;
 
        pi = razor_package_iterator_create(set);
index add25c8..4c288b4 100644 (file)
--- a/src/rpm.c
+++ b/src/rpm.c
@@ -246,7 +246,7 @@ static const struct option rpm_options[] = {
        { }
 };
 
-static const char system_repo_filename[] = "system.repo";
+static const char system_repo_filename[] = "system.rzdb";
 static const char *repo_filename = system_repo_filename;
 
 static void
@@ -349,7 +349,7 @@ get_query_packages(struct razor_set *set, int argc, const char *argv[])
                exit(1);
        }
 
-       files = "install/var/lib/razor/system-files.repo";
+       files = "install/var/lib/razor/system-files.rzdb";
        if (option_file)
                if (razor_set_open_files(set, files))
                        exit(1);
@@ -480,11 +480,11 @@ command_query(int argc, const char *argv[])
                set = razor_root_open_read_only(option_root);
 
                /* FIXME: We need to figure out how to do this right. */
-               details = "install/var/lib/razor/system-details.repo";
+               details = "install/var/lib/razor/system-details.rzdb";
                if (option_info)
                        if (razor_set_open_details(set, details))
                                return;
-               files = "install/var/lib/razor/system-files.repo";
+               files = "install/var/lib/razor/system-files.rzdb";
                if (option_list)
                        if (razor_set_open_files(set, files))
                                return;