Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
3cdb4cbd67 | |||
7cfa02ecbd
|
|||
31e4580c91
|
|||
5dac79b54a
|
6
Cargo.lock
generated
6
Cargo.lock
generated
@@ -410,7 +410,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "artix-gitea"
|
name = "artix-gitea"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-web",
|
"actix-web",
|
||||||
"awc",
|
"awc",
|
||||||
@@ -420,7 +420,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "artix-pkglib"
|
name = "artix-pkglib"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"alpm",
|
"alpm",
|
||||||
"alpm-utils",
|
"alpm-utils",
|
||||||
@@ -430,7 +430,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "artixweb_packages"
|
name = "artixweb_packages"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"actix-files",
|
"actix-files",
|
||||||
"actix-identity",
|
"actix-identity",
|
||||||
|
@@ -8,7 +8,7 @@ homepage = "https://packages.artixlinux.org"
|
|||||||
keywords = ["artix", "packages", "gitea"]
|
keywords = ["artix", "packages", "gitea"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "artix_gitea"
|
name = "artix_gitea"
|
||||||
|
@@ -8,7 +8,7 @@ homepage = "https://packages.artixlinux.org"
|
|||||||
keywords = ["artix", "packages"]
|
keywords = ["artix", "packages"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "artix_pkglib"
|
name = "artix_pkglib"
|
||||||
|
@@ -7,7 +7,7 @@ repository = "gitea.artixlinux.org/artix/artixweb_packages"
|
|||||||
keywords = ["artix", "packages"]
|
keywords = ["artix", "packages"]
|
||||||
license = "MIT OR Apache-2.0"
|
license = "MIT OR Apache-2.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
version = "0.1.3"
|
version = "0.1.4"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "artixweb_packages"
|
name = "artixweb_packages"
|
||||||
@@ -15,8 +15,8 @@ test = false
|
|||||||
bench = false
|
bench = false
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
artix-gitea = { path = "../artix-gitea", version = "=0.1.3" }
|
artix-gitea = { path = "../artix-gitea", version = "=0.1.4" }
|
||||||
artix-pkglib = { path = "../artix-pkglib", version = "=0.1.3" }
|
artix-pkglib = { path = "../artix-pkglib", version = "=0.1.4" }
|
||||||
|
|
||||||
actix-files = "0.6.0"
|
actix-files = "0.6.0"
|
||||||
actix-identity = "0.4"
|
actix-identity = "0.4"
|
||||||
|
@@ -110,6 +110,7 @@ pub(crate) struct ResponseDetail {
|
|||||||
pub required_by: Vec<String>,
|
pub required_by: Vec<String>,
|
||||||
pub contents: Vec<String>,
|
pub contents: Vec<String>,
|
||||||
pub maintainers: Vec<String>,
|
pub maintainers: Vec<String>,
|
||||||
|
pub packaged_by: String,
|
||||||
pub flagged: bool,
|
pub flagged: bool,
|
||||||
pub flagged_on: i64,
|
pub flagged_on: i64,
|
||||||
pub flagged_by: Vec<String>,
|
pub flagged_by: Vec<String>,
|
||||||
@@ -506,6 +507,7 @@ pub(crate) async fn get_packages_details_inner(
|
|||||||
pkg.replaces(),
|
pkg.replaces(),
|
||||||
&DependencyKind::Misc,
|
&DependencyKind::Misc,
|
||||||
),
|
),
|
||||||
|
packaged_by: format_packager(pkg.packager().unwrap_or("").to_string()),
|
||||||
flagged: false,
|
flagged: false,
|
||||||
flagged_on: 0,
|
flagged_on: 0,
|
||||||
flagged_by: Vec::new(),
|
flagged_by: Vec::new(),
|
||||||
@@ -565,6 +567,14 @@ pub(crate) async fn get_packages_details_inner(
|
|||||||
Err(ArtixWebPackageError::NotFound)
|
Err(ArtixWebPackageError::NotFound)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// removes email address from the packager string
|
||||||
|
fn format_packager(mut input: String) -> String {
|
||||||
|
if let Some(pos) = input.find('<') {
|
||||||
|
input.truncate(pos - 1);
|
||||||
|
}
|
||||||
|
input
|
||||||
|
}
|
||||||
|
|
||||||
// adds package metadata into the local postgres database
|
// adds package metadata into the local postgres database
|
||||||
fn add_package_metadata(metadata: &PackageMeta, pool: &web::Data<Pool>) {
|
fn add_package_metadata(metadata: &PackageMeta, pool: &web::Data<Pool>) {
|
||||||
use crate::schema::packages::dsl::packages;
|
use crate::schema::packages::dsl::packages;
|
||||||
|
@@ -72,6 +72,8 @@
|
|||||||
<section role="value">{{ pkg.installed_size|human_readable }} MB</section>
|
<section role="value">{{ pkg.installed_size|human_readable }} MB</section>
|
||||||
<section role="key">Build Date:</section>
|
<section role="key">Build Date:</section>
|
||||||
<section role="value">{{ pkg.build_date|show_date }}</section>
|
<section role="value">{{ pkg.build_date|show_date }}</section>
|
||||||
|
<section role="key">Packaged By:</section>
|
||||||
|
<section role="value">{{ pkg.packaged_by }}</section>
|
||||||
{% if pkg.flagged && !pkg.flagged_by.is_empty() %}
|
{% if pkg.flagged && !pkg.flagged_by.is_empty() %}
|
||||||
<section role="key">Flagged By:</section>
|
<section role="key">Flagged By:</section>
|
||||||
<section role="value">{{ pkg.flagged_by|join(", ") }}</section>
|
<section role="value">{{ pkg.flagged_by|join(", ") }}</section>
|
||||||
|
Reference in New Issue
Block a user