summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorkitsunyan2018-05-20 20:13:04 +0300
committerkitsunyan2018-05-20 20:13:04 +0300
commit9c8e6c23b1dbad8bab88d48a8ae34965eebb3cfc (patch)
tree65d2181408d079e71ed2533e793d627ff93bc712
parent1331dbe79fed755717f6b44f50e50cc6aac80cf5 (diff)
downloadaur-9c8e6c23b1dbad8bab88d48a8ae34965eebb3cfc.tar.gz
upgpkg: pakku 0.12-2
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Specify-refspec-when-git-fetch-is-used.patch72
-rw-r--r--PKGBUILD13
3 files changed, 85 insertions, 4 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 13cbbdb2943a..4c3eb6e45235 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = pakku
pkgdesc = Pacman wrapper with AUR support
pkgver = 0.12
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/kitsunyan/pakku
arch = x86_64
license = GPL3
@@ -10,7 +10,9 @@ pkgbase = pakku
depends = git
backup = etc/pakku.conf
source = https://github.com/kitsunyan/pakku/releases/download/v0.12/pakku-0.12.tar.xz
+ source = 0001-Specify-refspec-when-git-fetch-is-used.patch
sha256sums = 73dc0da6bb36a9aa211b2e562d08d6cc60ab37ed527348f5d075df7aeac0e35c
+ sha256sums = 4987262977ab82fb86a3c02c6c8388c01d6744a0f4bedb794be2bbce23b99748
pkgname = pakku
diff --git a/0001-Specify-refspec-when-git-fetch-is-used.patch b/0001-Specify-refspec-when-git-fetch-is-used.patch
new file mode 100644
index 000000000000..670239e63638
--- /dev/null
+++ b/0001-Specify-refspec-when-git-fetch-is-used.patch
@@ -0,0 +1,72 @@
+From 5b5aa7c3968a4e36763edeb7d50b105a9248b39e Mon Sep 17 00:00:00 2001
+From: kitsunyan <`echo a2l0c3VueWFuQGFpcm1haWwuY2MK | base64 -d`>
+Date: Sun, 20 May 2018 20:08:41 +0300
+Subject: [PATCH] Specify refspec when git fetch is used
+
+---
+ src/common.nim | 20 ++++++++++++--------
+ 1 file changed, 12 insertions(+), 8 deletions(-)
+
+diff --git a/src/common.nim b/src/common.nim
+index ca6d8c9..8518ded 100644
+--- a/src/common.nim
++++ b/src/common.nim
+@@ -448,8 +448,8 @@ proc reloadPkgInfos*(config: Config, path: string, pkgInfos: seq[PackageInfo]):
+ template bareFullName*(bareKind: BareKind, bareName: string): string =
+ $bareKind & "-" & bareName & ".git"
+
+-proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string, url: string,
+- dropPrivileges: bool): Option[string] =
++proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string,
++ url: string, branchOption: Option[string], dropPrivileges: bool): Option[string] =
+ let fullName = bareFullName(bareKind, bareName)
+ let cachePath = config.userCache(dropPrivileges).cache(CacheKind.repositories)
+ let repoPath = repoPath(cachePath, fullName)
+@@ -457,9 +457,12 @@ proc cloneBareRepo(config: Config, bareKind: BareKind, bareName: string, url: st
+ if forkWait(() => (block:
+ if not dropPrivileges or dropPrivileges():
+ if existsDir(repoPath):
+- execResult(gitCmd, "-C", repoPath, "fetch", "-q", "--no-tags")
++ let branch = branchOption.get("master")
++ execResult(gitCmd, "-C", repoPath, "fetch", "-q", "--no-tags",
++ "origin", branch & ":" & branch)
+ else:
+- execResult(gitCmd, "-C", cachePath, "clone", "-q", "--bare", "--no-tags", url, fullName)
++ execResult(gitCmd, "-C", cachePath, "clone", "-q", "--bare", "--no-tags",
++ url, fullName)
+ else:
+ quit(1))) == 0:
+ some(repoPath)
+@@ -474,7 +477,7 @@ proc cloneBareRepos*(config: Config, bareKind: BareKind, gitRepos: seq[GitRepo],
+ else:
+ let bare = gitRepos
+ .filter(t => t.bareName.isSome)
+- .map(r => (r.bareName.unsafeGet, r.url))
++ .map(r => (r.bareName.unsafeGet, r.url, r.branch))
+ .deduplicate
+
+ proc cloneNext(index: int, messages: List[string]): seq[string] =
+@@ -483,8 +486,8 @@ proc cloneBareRepos*(config: Config, bareKind: BareKind, gitRepos: seq[GitRepo],
+ if index >= bare.len:
+ toSeq(messages.reversed.items)
+ else:
+- let (bareName, url) = bare[index]
+- let repoPath = cloneBareRepo(config, bareKind, bareName, url, dropPrivileges)
++ let (bareName, url, branch) = bare[index]
++ let repoPath = cloneBareRepo(config, bareKind, bareName, url, branch, dropPrivileges)
+ if repoPath.isSome:
+ cloneNext(index + 1, messages)
+ else:
+@@ -644,7 +647,8 @@ proc cloneAurRepo*(config: Config, base: string, gitUrl: string,
+ let cloneBareCode = forkWait(() => (block:
+ if not dropPrivileges or dropPrivileges():
+ if existsDir(bareRepoPath):
+- execResult(gitCmd, "-C", bareRepoPath, "fetch", "-q", "--no-tags")
++ execResult(gitCmd, "-C", bareRepoPath, "fetch", "-q", "--no-tags",
++ "origin", "master:master")
+ else:
+ execResult(gitCmd, "-C", cachePath, "clone", "-q", "--bare", "--no-tags",
+ gitUrl, "--single-branch", fullName)
+--
+2.17.0
+
diff --git a/PKGBUILD b/PKGBUILD
index d4677c74d5a4..b25b5c1b0134 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@
pkgname=pakku
pkgver=0.12
-pkgrel=1
+pkgrel=2
pkgdesc='Pacman wrapper with AUR support'
arch=('x86_64')
url="https://github.com/kitsunyan/$pkgname"
@@ -10,8 +10,15 @@ license=('GPL3')
depends=('libcurl.so' 'git')
makedepends=('nim')
backup=('etc/pakku.conf')
-source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz")
-sha256sums=('73dc0da6bb36a9aa211b2e562d08d6cc60ab37ed527348f5d075df7aeac0e35c')
+source=("$url/releases/download/v$pkgver/$pkgname-$pkgver.tar.xz"
+ '0001-Specify-refspec-when-git-fetch-is-used.patch')
+sha256sums=('73dc0da6bb36a9aa211b2e562d08d6cc60ab37ed527348f5d075df7aeac0e35c'
+ '4987262977ab82fb86a3c02c6c8388c01d6744a0f4bedb794be2bbce23b99748')
+
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+ patch -Np1 -i '../0001-Specify-refspec-when-git-fetch-is-used.patch'
+}
build() {
local addargs=()