Go to file
Alexander Larsson 5b721a5b08 Allow creating and pulling static deltas starting from "empty"
You create these with something like:
  ostree static-delta generate --empty --to=master

These will be automatically used during pull if no previous revision
exists in the target repo.

These work very much like the normal static deltas except they
are named just by the "to" revision. I.e:

deltas/94/f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d

for a from-scratch to 94f7d2dc23759dd21f9bd01e6705a8fdf98f90cad3e0109ba3f6c091c1a3774d delta.

https://bugzilla.gnome.org/show_bug.cgi?id=721799
2015-01-14 14:43:32 +01:00
doc Add ostree_repo_pull_default_console_progress_changed() 2014-12-18 21:31:53 -05:00
manual-tests manual-tests: New directory with custom test scripts 2014-02-14 18:16:37 -05:00
packaging libostree: Add initial GRUB2 support 2014-10-16 14:15:00 -04:00
src Allow creating and pulling static deltas starting from "empty" 2015-01-14 14:43:32 +01:00
tests Allow creating and pulling static deltas starting from "empty" 2015-01-14 14:43:32 +01:00
.gitignore Update .gitignore 2014-01-19 11:33:52 -05:00
COPYING COPYING: Update to latest FSF with current address 2014-01-16 10:22:30 -05:00
Makefile-boot.am build: Distribute grub2-15_ostree 2014-11-04 10:46:27 -05:00
Makefile-decls.am libostree: Add initial GRUB2 support 2014-10-16 14:15:00 -04:00
Makefile-libostree-defines.am Add an OstreeSysrootUpgrader API 2014-03-24 18:08:22 -04:00
Makefile-libostree.am build: Include SELinux cflags with libostree build too 2014-10-20 15:23:55 -04:00
Makefile-ostree.am checkout: Add --fsync=false 2015-01-07 11:41:46 -05:00
Makefile-otutil.am Extract opendirat() helper function into libotutil 2014-09-16 11:34:39 -04:00
Makefile-switchroot.am Add support for mkinitcpio 2013-10-24 14:27:49 -04:00
Makefile-tests.am Add local-pull archive-z2 <=> bare-user roundtrip test 2014-12-08 12:03:27 +01:00
Makefile.am Work around deprecation of SoupServer's port property 2014-09-09 09:30:02 -04:00
README-historical.md README: Just link to wiki, move most of it to README-historical.md 2014-01-20 18:00:09 -05:00
README.md README.md: Add a quick blurb on style 2014-12-07 17:19:42 -05:00
TODO trivial: TODO: Add link sizes/progress bar 2014-05-23 07:59:35 -04:00
autogen.sh Use external libgsystem 2014.2 2014-04-04 16:52:37 -04:00
configure.ac Release 2015.2 2015-01-12 12:43:03 -05:00
ostree.doap doap category infrastructure 2014-07-31 11:26:32 +02:00

README.md

OSTree is a tool for managing bootable, immutable, versioned filesystem trees. While it takes over some of the roles of tradtional "package managers" like dpkg and rpm, it is not a package system; nor is it a tool for managing full disk images. Instead, it sits between those levels, offering a blend of the advantages (and disadvantages) of both.

For more information, see:

https://live.gnome.org/Projects/OSTree

Submitting patches

You can:

  1. Send mail to ostree-list@gnome.org, with the patch attached
  2. Submit a pull request against https://github.com/GNOME/ostree
  3. Attach them to https://bugzilla.gnome.org/

Please look at "git log" and match the commit log style.

Running the test suite

Currently, ostree uses https://wiki.gnome.org/GnomeGoals/InstalledTests To run just ostree's tests:

./configure ... --enable-installed-tests
gnome-desktop-testing-runner -p 0 ostree/

Coding style

Indentation is GNU. Files should start with the appropriate mode lines.

Use GCC __attribute__((cleanup)) wherever possible. If interacting with a third party library, try defining local cleanup macros.

Use GError and GCancellable where appropriate.

Prefer returning gboolean to signal success/failure, and have output values as parameters.

Prefer linear control flow inside functions (aside from standard loops). In other words, avoid "early exits" or use of goto besides goto out;.

This is an example of an "early exit":

static gboolean
myfunc (...)
{
    gboolean ret = FALSE;

    /* some code */

    /* some more code */

    if (condition)
      return FALSE;

    /* some more code */

    ret = TRUE;
  out:
    return ret;
}

If you must shortcut, use:

if (condition)
  {
    ret = TRUE;
    goto out;
  }

A consequence of this restriction is that you are encouraged to avoid deep nesting of loops or conditionals. Create internal static helper functions, particularly inside loops. For example, rather than:

while (condition)
  {
    /* some code */
    if (condition)
      {
         for (i = 0; i < somevalue; i++)
           {
              if (condition)
                {
                  /* deeply nested code */
                }

                /* more nested code */
           }
      }
  }

Instead do this:

static gboolean
helperfunc (..., GError **error)
{
  if (condition)
   {
     /* deeply nested code */
   }

  /* more nested code */

  return ret;
}

while (condition)
  {
    /* some code */
    if (!condition)
      continue;

    for (i = 0; i < somevalue; i++)
      {
        if (!helperfunc (..., i, error))
          goto out;
      }
  }