aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormerakor <cem@ckyln.com>2020-08-31 20:57:31 +0000
committermerakor <cem@ckyln.com>2020-08-31 20:57:31 +0000
commite09210f1d6660e21925015c6ab6b7c420b53834b (patch)
treef0c37dcea7fce49a599b7d6cc658aa00c52b1afa
parent650a936486856024718ce9737c854ea56155437c (diff)
downloadcpt-e09210f1d6660e21925015c6ab6b7c420b53834b.tar.gz
pkg_sources(): return when there is no source file.
FossilOrigin-Name: 1c0091a687350b6f6eefc9dd676c4e4f2d3c4a81a514aa3c95113898cc4c1ea1
-rw-r--r--src/cpt-lib5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cpt-lib b/src/cpt-lib
index 288838c..db7f26a 100644
--- a/src/cpt-lib
+++ b/src/cpt-lib
@@ -499,6 +499,11 @@ pkg_cache() {
pkg_sources() {
# Download any remote package sources. The existence of local
# files is also checked.
+ repo_dir=$(pkg_find "$1")
+
+ # Support packages without sources. Simply do nothing.
+ [ -f "$repo_dir/sources" ] || return 0
+
log "$1" "Downloading sources"
# Store each downloaded source in a directory named after the