restructure project into a virtual manifest
- remove redundant readme - de-duplicate Cargo.toml information using workspace inheritance - rename "pacdef_core" to "pacdef" - move "crates/main/main.rs" to "crates/pacdef/src/main.rs"
This commit is contained in:
48 files changed
+37
-73
No files matched your search
Generated
-8
@@ -390,14 +390,6 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92"
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "pacdef"
|
name = "pacdef"
|
||||||
version = "1.6.0"
|
version = "1.6.0"
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"pacdef_core",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "pacdef_core"
|
|
||||||
version = "1.6.0"
|
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alpm",
|
"alpm",
|
||||||
"anyhow",
|
"anyhow",
|
||||||
|
|||||||
+7
-21
@@ -1,8 +1,9 @@
|
|||||||
[package]
|
[workspace]
|
||||||
name = "pacdef"
|
members = ["crates/*"]
|
||||||
version = "1.6.0"
|
resolver = "2"
|
||||||
|
|
||||||
|
[workspace.package]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
description = "multi-backend declarative package manager for Linux"
|
|
||||||
license = "GPL-3.0-or-later"
|
license = "GPL-3.0-or-later"
|
||||||
repository = "https://github.com/steven-omaha/pacdef"
|
repository = "https://github.com/steven-omaha/pacdef"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
@@ -10,26 +11,11 @@ keywords = ["package-manager", "linux", "declarative", "cli"]
|
|||||||
categories = ["command-line-utilities"]
|
categories = ["command-line-utilities"]
|
||||||
rust-version = "1.74"
|
rust-version = "1.74"
|
||||||
|
|
||||||
[workspace]
|
|
||||||
members = ["crates/pacdef_macros", "crates/pacdef_core"]
|
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
anyhow = "1.0"
|
pacdef_macros = { path = "crates/pacdef_macros", version = "1.0" }
|
||||||
|
pacdef = { path = "crates/pacdef", version = "1.6" }
|
||||||
[dependencies]
|
|
||||||
anyhow = {workspace = true}
|
|
||||||
pacdef_core = {path = "crates/pacdef_core", version = "=1.6.0" }
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "pacdef"
|
|
||||||
path = "crates/main/main.rs"
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "off"
|
lto = "off"
|
||||||
opt-level = "z"
|
opt-level = "z"
|
||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
[features]
|
|
||||||
default = []
|
|
||||||
debian = ["pacdef_core/debian"]
|
|
||||||
arch = ["pacdef_core/arch"]
|
|
||||||
@@ -6,7 +6,7 @@ Release Checklist
|
|||||||
* Run `cargo outdated` and review semver incompatible updates.
|
* Run `cargo outdated` and review semver incompatible updates.
|
||||||
Unless there is a strong motivation otherwise, review and update every dependency.
|
Unless there is a strong motivation otherwise, review and update every dependency.
|
||||||
* Update the date and version in all man pages: "chore(release): bump man pages".
|
* Update the date and version in all man pages: "chore(release): bump man pages".
|
||||||
* Run `cargo release -p pacdef_core -p pacdef <level>`.
|
* Run `cargo release -p pacdef <version>`.
|
||||||
`pacdef_core` and `pacdef` shall have the same version at all times.
|
`pacdef_core` and `pacdef` shall have the same version at all times.
|
||||||
Verify everything works as expected.
|
Verify everything works as expected.
|
||||||
* Rerun `cargo publish` with `--execute.`
|
* Rerun `cargo publish` with `--execute.`
|
||||||
|
|||||||
+1
-1
@@ -42,7 +42,7 @@ command = [
|
|||||||
"--color",
|
"--color",
|
||||||
"always",
|
"always",
|
||||||
"--package",
|
"--package",
|
||||||
"pacdef_core",
|
"pacdef",
|
||||||
"--",
|
"--",
|
||||||
"--color",
|
"--color",
|
||||||
"always", # see https://github.com/Canop/bacon/issues/124
|
"always", # see https://github.com/Canop/bacon/issues/124
|
||||||
|
|||||||
@@ -1,16 +1,17 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pacdef_core"
|
name = "pacdef"
|
||||||
|
description = "multi-backend declarative package manager for Linux"
|
||||||
version = "1.6.0"
|
version = "1.6.0"
|
||||||
edition = "2021"
|
|
||||||
description = "pacdef core library"
|
edition.workspace = true
|
||||||
license = "GPL-3.0-or-later"
|
license.workspace = true
|
||||||
repository = "https://github.com/steven-omaha/pacdef/tree/main/crates/pacdef_core"
|
repository.workspace = true
|
||||||
readme = "README.md"
|
readme.workspace = true
|
||||||
keywords = ["package-manager", "linux", "declarative", "cli"]
|
keywords.workspace = true
|
||||||
categories = ["command-line-utilities"]
|
categories.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
anyhow = { workspace = true }
|
anyhow = "1.0"
|
||||||
clap = "4.5"
|
clap = "4.5"
|
||||||
const_format = { version = "0.2", default-features = false }
|
const_format = { version = "0.2", default-features = false }
|
||||||
path-absolutize = "3.1"
|
path-absolutize = "3.1"
|
||||||
@@ -24,7 +25,7 @@ serde_derive = "1.0"
|
|||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde_yaml = "0.9"
|
serde_yaml = "0.9"
|
||||||
|
|
||||||
pacdef_macros = { path = "../pacdef_macros", version = "1.0" }
|
pacdef_macros.workspace = true
|
||||||
|
|
||||||
# backends
|
# backends
|
||||||
alpm = { version = "3.0", optional = true }
|
alpm = { version = "3.0", optional = true }
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -548,7 +548,7 @@ where
|
|||||||
Err(e) => {
|
Err(e) => {
|
||||||
// CrossesDevices is nightly. See rust #86442.
|
// CrossesDevices is nightly. See rust #86442.
|
||||||
// We cannot check that here, so we just assume that
|
// We cannot check that here, so we just assume that
|
||||||
// that would be the error if permisisons are okay.
|
// that would be the error if permissions are okay.
|
||||||
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
if e.kind() == std::io::ErrorKind::PermissionDenied {
|
||||||
bail!(e);
|
bail!(e);
|
||||||
}
|
}
|
||||||
@@ -583,7 +583,7 @@ fn find_groups_by_name<'a>(names: &[String], groups: &'a HashSet<Group>) -> Resu
|
|||||||
Ok(result)
|
Ok(result)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Show the error chain for an error that has occured when a backend was queried
|
/// Show the error chain for an error that has occurred when a backend was queried
|
||||||
/// if the `RUST_BACKTRACE` env variable is set to `1` or `full`.
|
/// if the `RUST_BACKTRACE` env variable is set to `1` or `full`.
|
||||||
#[allow(clippy::option_if_let_else)]
|
#[allow(clippy::option_if_let_else)]
|
||||||
fn show_backend_query_error(error: &anyhow::Error, backend: &dyn Backend) {
|
fn show_backend_query_error(error: &anyhow::Error, backend: &dyn Backend) {
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,5 +1,5 @@
|
|||||||
/*!
|
/*!
|
||||||
Main program for `pacdef`. All internal logic happens in [`pacdef_core`].
|
Main program for `pacdef`.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#![warn(
|
#![warn(
|
||||||
@@ -21,8 +21,8 @@ use std::process::{ExitCode, Termination};
|
|||||||
|
|
||||||
use anyhow::{bail, Context, Result};
|
use anyhow::{bail, Context, Result};
|
||||||
|
|
||||||
use pacdef_core::path::{get_config_path, get_config_path_old_version, get_group_dir};
|
use pacdef::path::{get_config_path, get_config_path_old_version, get_group_dir};
|
||||||
use pacdef_core::{get_args, Config, Error as PacdefError, Group, Pacdef};
|
use pacdef::{get_args, Config, Error as PacdefError, Group, Pacdef};
|
||||||
|
|
||||||
const MAJOR_UPDATE_MESSAGE: &str = "VERSION UPGRADE
|
const MAJOR_UPDATE_MESSAGE: &str = "VERSION UPGRADE
|
||||||
You seem to have used version 0.x of pacdef before.
|
You seem to have used version 0.x of pacdef before.
|
||||||
File renamed without changes.
File renamed without changes.
@@ -53,8 +53,8 @@ pub fn review(
|
|||||||
println!();
|
println!();
|
||||||
let mut iter = strategies.iter().peekable();
|
let mut iter = strategies.iter().peekable();
|
||||||
|
|
||||||
while let Some(strat) = iter.next() {
|
while let Some(strategy) = iter.next() {
|
||||||
strat.show();
|
strategy.show();
|
||||||
|
|
||||||
if iter.peek().is_some() {
|
if iter.peek().is_some() {
|
||||||
println!();
|
println!();
|
||||||
@@ -66,8 +66,8 @@ pub fn review(
|
|||||||
return Ok(());
|
return Ok(());
|
||||||
}
|
}
|
||||||
|
|
||||||
for strat in strategies {
|
for strategy in strategies {
|
||||||
strat.execute()?;
|
strategy.execute()?;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,8 +0,0 @@
|
|||||||
# pacdef_core
|
|
||||||
|
|
||||||
core library for pacdef
|
|
||||||
|
|
||||||
|
|
||||||
## supported rust version
|
|
||||||
|
|
||||||
latest stable
|
|
||||||
@@ -1,13 +1,14 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "pacdef_macros"
|
name = "pacdef_macros"
|
||||||
version = "1.0.1"
|
|
||||||
edition = "2021"
|
|
||||||
license = "GPL-3.0-or-later"
|
|
||||||
readme = "README.md"
|
|
||||||
repository = "https://github.com/steven-omaha/pacdef/tree/main/crates/pacdef_macros"
|
|
||||||
description = "procedural macros for pacdef"
|
description = "procedural macros for pacdef"
|
||||||
keywords = ["macro", "proc-macro"]
|
version = "1.0.1"
|
||||||
categories = ["command-line-utilities"]
|
|
||||||
|
edition.workspace = true
|
||||||
|
license.workspace = true
|
||||||
|
repository.workspace = true
|
||||||
|
readme.workspace = true
|
||||||
|
keywords.workspace = true
|
||||||
|
categories.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
proc-macro2 = "1.0"
|
proc-macro2 = "1.0"
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
# pacdef_macros
|
|
||||||
|
|
||||||
procedural macros for pacdef
|
|
||||||
|
|
||||||
|
|
||||||
## supported rust version
|
|
||||||
|
|
||||||
latest stable
|
|
||||||
Reference in new issue
Block a user