summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarel Kočí <karel.koci@nic.cz>2018-08-30 11:12:19 +0200
committerKarel Kočí <karel.koci@nic.cz>2018-08-30 11:15:06 +0200
commit7b230877a32027b4aef12685ca282db107301145 (patch)
tree13e7d895d8537881c99944e54b0ec766b4b7a2a8
parentc8654a69b75c4f52fa4da372d997708c8a4ecdcf (diff)
downloadopenwrt-personal-pkgs-7b230877a32027b4aef12685ca282db107301145.tar.gz
openwrt-personal-pkgs-7b230877a32027b4aef12685ca282db107301145.tar.bz2
openwrt-personal-pkgs-7b230877a32027b4aef12685ca282db107301145.zip
autopkg: try to fix pull
-rw-r--r--autopkg-branch.mk3
-rw-r--r--autopkg-common.mk5
2 files changed, 2 insertions, 6 deletions
diff --git a/autopkg-branch.mk b/autopkg-branch.mk
index 25e25e9..871cffb 100644
--- a/autopkg-branch.mk
+++ b/autopkg-branch.mk
@@ -6,9 +6,6 @@ ifndef PKG_SOURCE_BRANCH
$(error You have to define PKG_SOURCE_BRANCH before pkgauto.mk include)
endif
-# Explicitly fetch branch
-$(shell git $(GIT_ARGS) fetch --prune --prune-tags --force "$(PKG_SOURCE_URL)" "$(PKG_SOURCE_BRANCH):$(PKG_SOURCE_BRANCH)")
-
PKG_SOURCE_VERSION:=$(shell git $(GIT_ARGS) rev-parse "$(PKG_SOURCE_BRANCH)")
PKG_VERSION:=$(shell git $(GIT_ARGS) describe --abbrev=0 --tags "$(PKG_SOURCE_BRANCH)")
diff --git a/autopkg-common.mk b/autopkg-common.mk
index 73cff51..c539e1a 100644
--- a/autopkg-common.mk
+++ b/autopkg-common.mk
@@ -13,12 +13,11 @@ TMP_REPO_PATH=$(DL_DIR)/autopkg/$(PKG_NAME)
GIT_ARGS=--git-dir='$(TMP_REPO_PATH)' --bare
# Clone/update git history to bare repository
-# TODO it is possible that this won't fetch when there is force push to repository
$(shell \
if [ ! -d "$(TMP_REPO_PATH)" ]; then \
- git clone --bare "$(PKG_SOURCE_URL)" "$(TMP_REPO_PATH)"; \
+ git clone --mirror "$(PKG_SOURCE_URL)" "$(TMP_REPO_PATH)"; \
else \
- git $(GIT_ARGS) fetch --prune --prune-tags --force "$(PKG_SOURCE_URL)"; \
+ git $(GIT_ARGS) remote update origin; \
fi)