加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
0008-pkgbuild-use-yumdownloader-if-source-url-is-missing.patch 881 Bytes
一键复制 编辑 原始数据 按行查看 历史
From 066da27aaf6b153c215bee353e7190fe226f5b3b Mon Sep 17 00:00:00 2001
From: Pavel Boldin <pboldin@cloudlinux.com>
Date: Thu, 14 Dec 2017 18:02:15 +0200
Subject: [PATCH 08/89] pkgbuild: use yumdownloader if source url is missing
Signed-off-by: Pavel Boldin <pboldin@cloudlinux.com>
---
scripts/pkgbuild | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/pkgbuild b/scripts/pkgbuild
index 8803db3..97c78a9 100755
--- a/scripts/pkgbuild
+++ b/scripts/pkgbuild
@@ -105,7 +105,11 @@ kp_prepare_source_raw() {
kp_download_source_rpm() {
mkdir -p /kcdata
- curl $KP_PROJECT_SOURCE_URL -o /kcdata/$KP_PROJECT_SOURCE
+ if test -n "$KP_PROJECT_SOURCE_URL"; then
+ curl $KP_PROJECT_SOURCE_URL -o /kcdata/$KP_PROJECT_SOURCE
+ else
+ yumdownloader --source --destdir /kcdata ${KP_PROJECT_SOURCE%.src.rpm}
+ fi
}
kp_prepare_source_rpm() {
--
2.23.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化