Skip to content

Commit

Permalink
Use licences
Browse files Browse the repository at this point in the history
  • Loading branch information
isbm committed Apr 5, 2024
1 parent d3a8242 commit 8a15642
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
mod clidef;
mod licences;
mod pkgcache;
mod rfs;

Expand Down
7 changes: 7 additions & 0 deletions src/rfs/rfsdeb.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use crate::licences::PkgLicence;

use super::rfsitf::RootFSItf;
use std::{
fs::File,
Expand Down Expand Up @@ -46,4 +48,9 @@ impl RootFSItf for DebRootFsScan {

out
}

/// Get license(s) of a package
fn get_pkg_license(&self, pkgname: String) -> PkgLicence {
todo!()
}
}
4 changes: 4 additions & 0 deletions src/rfs/rfsitf.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
use crate::licences::PkgLicence;

pub trait RootFSItf {
/// Gets a list of packages on that rootfs.
/// It will basically read the corresponding package database.
fn get_pkg_list(&self) -> Vec<String>;

fn get_pkg_license(&self, pkgname: String) -> PkgLicence;
}

0 comments on commit 8a15642

Please sign in to comment.