diff options
| author | John Turner <jturner.usa@gmail.com> | 2025-10-29 20:06:59 +0000 |
|---|---|---|
| committer | John Turner <jturner.usa@gmail.com> | 2025-10-29 20:06:59 +0000 |
| commit | 72b6774e2b43edf4228df2d5a7af20c041e6745c (patch) | |
| tree | 32ecc67a4349a6d08729062f2127083b8b210b58 /src/ebuild/mod.rs | |
| parent | 8937e096a4b7eba649817d12d23d3e369a4a4f1d (diff) | |
| download | gentoo-utils-72b6774e2b43edf4228df2d5a7af20c041e6745c.tar.gz | |
impl Repo and md5-cache reading
Diffstat (limited to 'src/ebuild/mod.rs')
| -rw-r--r-- | src/ebuild/mod.rs | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/ebuild/mod.rs b/src/ebuild/mod.rs index 2558cf4..50d9f3f 100644 --- a/src/ebuild/mod.rs +++ b/src/ebuild/mod.rs @@ -7,6 +7,7 @@ use crate::{ }; pub mod parsers; +pub mod repo; #[derive(Clone, Debug)] pub enum Conditional { @@ -23,10 +24,28 @@ pub enum Depend<T> { ConditionalGroup(Conditional, Vec<Self>), } +#[derive(Debug, Clone)] +pub enum UriPrefix { + Mirror, + Fetch, +} + #[derive(Debug, Clone, Get)] -pub struct SrcUri { - uri: String, - file_name: Option<PathBuf>, +pub struct Uri { + #[get(kind = "deref")] + protocol: String, + #[get(kind = "deref")] + path: String, +} + +#[derive(Debug, Clone)] +pub enum SrcUri { + Filename(PathBuf), + Uri { + prefix: Option<UriPrefix>, + uri: Uri, + filename: Option<PathBuf>, + }, } #[derive(Debug, Clone, Get)] @@ -44,14 +63,22 @@ pub struct Ebuild { version: Version, slot: Option<Slot>, homepage: Option<String>, + #[get(kind = "deref")] src_uri: Vec<Depend<SrcUri>>, eapi: Option<Eapi>, + #[get(kind = "deref")] inherit: Vec<Eclass>, + #[get(kind = "deref")] iuse: Vec<IUseFlag>, + #[get(kind = "deref")] license: Vec<Depend<License>>, description: Option<String>, + #[get(kind = "deref")] depend: Vec<Depend<Atom>>, + #[get(kind = "deref")] bdepend: Vec<Depend<Atom>>, - rdpened: Vec<Depend<Atom>>, + #[get(kind = "deref")] + rdepend: Vec<Depend<Atom>>, + #[get(kind = "deref")] idepend: Vec<Depend<Atom>>, } |
