Rename libostree to ostree

This commit is contained in:
Felix Krull 2019-05-16 21:41:38 +02:00 committed by Colin Walters
parent 77697b10f7
commit 999d239c59
6 changed files with 22 additions and 22 deletions

View File

@ -31,20 +31,20 @@ publish_ostree-sys:
- cargo publish --verbose --manifest-path sys/Cargo.toml --token $CRATES_IO_TOKEN
when: manual
# libostree
libostree:
# ostree
ostree:
stage: build
script:
- cargo test --verbose --all-features
libostree_nightly:
ostree_nightly:
stage: build
image: rustlang/rust:nightly
script:
- cargo test --verbose --all-features
allow_failure: true
publish_libostree:
publish_ostree:
stage: publish
script:
- cargo publish --verbose --token $CRATES_IO_TOKEN

View File

@ -1,5 +1,5 @@
[package]
name = "libostree"
name = "ostree"
version = "0.2.0"
authors = ["Felix Krull"]
@ -7,7 +7,7 @@ license = "MIT"
description = "Rust bindings for libostree"
keywords = ["ostree", "libostree"]
documentation = "https://fkrull.gitlab.io/ostree-rs/libostree"
documentation = "https://fkrull.gitlab.io/ostree-rs/ostree"
repository = "https://gitlab.com/fkrull/ostree-rs"
readme = "README.md"
@ -25,7 +25,7 @@ features = ["dox"]
repository = "fkrull/ostree-rs"
[lib]
name = "libostree"
name = "ostree"
[dependencies]
libc = "0.2"

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2018 Felix Krull
Copyright (c) 2018, 2019 Felix Krull
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -1,4 +1,4 @@
all: gir/libostree gir/ostree-sys
all: gir/ostree gir/ostree-sys
.PHONY: update-gir-files
@ -16,7 +16,7 @@ target/tools/bin/rustdoc-stripper:
cargo install --root target/tools -- rustdoc-stripper
merge-lgpl-docs: target/tools/bin/gir target/tools/bin/rustdoc-stripper
target/tools/bin/gir -c conf/libostree.toml -m doc
target/tools/bin/gir -c conf/ostree.toml -m doc
target/tools/bin/rustdoc-stripper -g -o target/vendor.md

View File

@ -1,17 +1,17 @@
extern crate gio;
extern crate glib;
extern crate libostree;
extern crate ostree;
extern crate tempfile;
use glib::prelude::*;
use libostree::prelude::*;
use ostree::prelude::*;
use std::fs;
use std::io;
use std::io::Write;
fn create_repo(repodir: &tempfile::TempDir) -> Result<libostree::Repo, glib::Error> {
let repo = libostree::Repo::new_for_path(repodir.path());
repo.create(libostree::RepoMode::Archive, None)?;
fn create_repo(repodir: &tempfile::TempDir) -> Result<ostree::Repo, glib::Error> {
let repo = ostree::Repo::new_for_path(repodir.path());
repo.create(ostree::RepoMode::Archive, None)?;
Ok(repo)
}
@ -23,17 +23,17 @@ fn create_test_file(treedir: &tempfile::TempDir) -> Result<(), io::Error> {
fn create_mtree(
treedir: &tempfile::TempDir,
repo: &libostree::Repo,
) -> Result<libostree::MutableTree, glib::Error> {
repo: &ostree::Repo,
) -> Result<ostree::MutableTree, glib::Error> {
let gfile = gio::File::new_for_path(treedir.path());
let mtree = libostree::MutableTree::new();
let mtree = ostree::MutableTree::new();
repo.write_directory_to_mtree(&gfile, &mtree, None, None)?;
Ok(mtree)
}
fn commit_mtree(
repo: &libostree::Repo,
mtree: &libostree::MutableTree,
repo: &ostree::Repo,
mtree: &ostree::MutableTree,
) -> Result<String, glib::Error> {
repo.prepare_transaction(None)?;
let repo_file = repo.write_mtree(mtree, None)?.downcast().unwrap();
@ -43,8 +43,8 @@ fn commit_mtree(
Ok(checksum)
}
fn open_repo(repodir: &tempfile::TempDir) -> Result<libostree::Repo, glib::Error> {
let repo = libostree::Repo::new_for_path(repodir.path());
fn open_repo(repodir: &tempfile::TempDir) -> Result<ostree::Repo, glib::Error> {
let repo = ostree::Repo::new_for_path(repodir.path());
repo.open(None)?;
Ok(repo)
}