Prepare for crates.io release by removing git dependencies

parent 7297400b
This diff is collapsed.
[package]
name = "pkgutils"
version = "0.1.1"
name = "redox_pkgutils"
version = "0.1.2"
build = "build.rs"
[lib]
......@@ -15,11 +15,12 @@ path = "src/bin/pkg.rs"
clap = {version = "2.25", default-features = false}
hyper-rustls = "0.6"
libflate = "0.1.4"
liner = { git = "https://gitlab.redox-os.org/redox-os/liner" }
pbr = { version = "1.0", git = "https://github.com/ids1024/pb", branch = "duration" }
liner = "0.4"
pbr = "1.0"
serde = "1.0"
serde_derive = "1.0"
tar = { git = "https://gitlab.redox-os.org/redox-os/tar-rs" }
sha3 = "0.8.2"
tar = "0.4"
toml = "0.4"
version-compare = "0.0.4"
petgraph = "0.4.5"
......@@ -29,8 +30,3 @@ ordermap = "0.2.11"
[dependencies.hyper]
version = "0.10"
default-features = false
[dependencies.octavo]
git = "https://github.com/libOctavo/octavo.git"
default-features = false
features = ["digest"]
......@@ -63,7 +63,6 @@ fn upgrade(repo: Repo) -> io::Result<()> {
let line = liner::Context::new().read_line(
"Do you want to upgrade these packages? (Y/n) ",
None,
&mut |_| {}
)?;
match line.to_lowercase().as_str() {
......@@ -151,7 +150,7 @@ fn main() {
Ok(res) => eprintln!(concat!("{0:.0?}", $ok_fmt), res),
Err(err) => {
eprint!("failed: {}", err);
if let Some(cause) = err.cause() {
if let Some(cause) = err.source() {
eprint!(" ({})", cause);
}
eprintln!();
......@@ -201,7 +200,7 @@ fn main() {
},
Err(e) => {
eprintln!("error during package open: {}", e);
if let Some(cause) = e.cause() {
if let Some(cause) = e.source() {
eprintln!("cause: {}", cause);
}
success = false;
......@@ -216,7 +215,7 @@ fn main() {
},
Err(e) => {
eprintln!("error during dependency calculation: {}", e);
if let Some(cause) = e.cause() {
if let Some(cause) = e.source() {
eprintln!("cause: {}", cause);
}
success = false;
......
extern crate libflate;
extern crate hyper;
extern crate hyper_rustls;
extern crate octavo;
#[macro_use]
extern crate serde_derive;
extern crate sha3;
extern crate tar;
extern crate toml;
extern crate pbr;
......@@ -12,8 +12,7 @@ extern crate bidir_map;
extern crate ordermap;
use libflate::gzip::Encoder;
use octavo::octavo_digest::Digest;
use octavo::octavo_digest::sha3::Sha512;
use sha3::{Digest, Sha3_512};
use std::str;
use std::fs::{self, File};
use std::io::{self, stderr, Read, Write, BufWriter};
......@@ -101,13 +100,13 @@ impl Repo {
let mut data = vec![];
File::open(&file)?.read_to_end(&mut data)?;
let mut output = vec![0; Sha512::output_bytes()];
let mut hash = Sha512::default();
hash.update(&data);
hash.result(&mut output);
let mut hash = Sha3_512::default();
hash.input(&data);
let output = hash.result();
let mut encoded = String::new();
for b in output.iter() {
//TODO: {:>02x}
encoded.push_str(&format!("{:X}", b));
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment