summaryrefslogtreecommitdiffstats
path: root/src/source
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-01-11 10:44:35 +0100
committerMatthias Beyer <mail@beyermatthias.de>2021-01-15 23:21:39 +0100
commitf02b9fa526ed3c360fc2a3b3f6a646f3cd0db0b0 (patch)
tree7eb004be462fbad47750f5e97b470083f5556abc /src/source
parentf330587fec0cdf2f041531d5e7aea1e4f525e11b (diff)
Add feature to mark a source entry as manual download
This patch adds a feature where a source entry in a package can be marked for manual download. This gives us the ability to mask downloads which are hidden behind cruel JavaScript bullshit bloat where a `curl` cannot access the remote file. Signed-off-by: Matthias Beyer <matthias.beyer@atos.net> Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/source')
-rw-r--r--src/source/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/source/mod.rs b/src/source/mod.rs
index 295d7a9..fac7dce 100644
--- a/src/source/mod.rs
+++ b/src/source/mod.rs
@@ -84,6 +84,10 @@ impl SourceEntry {
self.package_source.url()
}
+ pub fn download_manually(&self) -> bool {
+ *self.package_source.download_manually()
+ }
+
pub async fn remove_file(&self) -> Result<()> {
let p = self.source_file_path();
tokio::fs::remove_file(&p).await?;