From 17c9848b280d198cc0f5bb54e98c56c9bfdcbfed Mon Sep 17 00:00:00 2001 From: Piotr Gorski Date: Thu, 8 Feb 2024 23:11:38 +0100 Subject: [PATCH] scheds-git: Replace patch loop with git loop Signed-off-by: Piotr Gorski --- scx-scheds-git/.SRCINFO | 8 ++++---- scx-scheds-git/PKGBUILD | 27 ++++++++++++++++++--------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/scx-scheds-git/.SRCINFO b/scx-scheds-git/.SRCINFO index 1615fbef..9728e79f 100644 --- a/scx-scheds-git/.SRCINFO +++ b/scx-scheds-git/.SRCINFO @@ -1,9 +1,9 @@ # Generated by makepkg 6.0.2 -# Sat Jan 27 16:53:12 UTC 2024 +# Thu Feb 8 22:10:51 UTC 2024 pkgbase = scx-scheds-git pkgdesc = sched_ext schedulers - pkgver = 0.1.6.r10.g46ba590 - pkgrel = 1 + pkgver = 0.1.6.r57.g73c68c6 + pkgrel = 3 url = https://github.com/sched-ext/scx arch = x86_64 license = GPL-2.0-only @@ -18,7 +18,7 @@ pkgbase = scx-scheds-git depends = bpf depends = libelf depends = zlib - provides = scx-scheds=0.1.6.r10.g46ba590 + provides = scx-scheds=0.1.6.r57.g73c68c6 conflicts = scx-scheds options = !lto backup = etc/default/scx diff --git a/scx-scheds-git/PKGBUILD b/scx-scheds-git/PKGBUILD index c33a5599..aac05aae 100644 --- a/scx-scheds-git/PKGBUILD +++ b/scx-scheds-git/PKGBUILD @@ -3,8 +3,8 @@ pkgname=scx-scheds-git gitname=scx -pkgver=0.1.6.r10.g46ba590 -pkgrel=1 +pkgver=0.1.6.r57.g73c68c6 +pkgrel=3 pkgdesc="sched_ext schedulers" arch=('x86_64') url="https://github.com/sched-ext/scx" @@ -18,6 +18,12 @@ options=(!lto) provides=("scx-scheds=$pkgver") conflicts=("scx-scheds") +_backports=( +) + +_reverts=( +) + pkgver() { cd $gitname git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g' @@ -26,13 +32,16 @@ pkgver() { prepare() { cd $gitname - local src - for src in "${source[@]}"; do - src="${src%%::*}" - src="${src##*/}" - [[ $src = *.patch ]] || continue - echo "Applying patch $src..." - patch -Np1 < "../$src" + local _c _l + for _c in "${_backports[@]}"; do + if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi + git log --oneline "${_l}" "${_c}" + git cherry-pick --mainline 1 --no-commit "${_c}" + done + for _c in "${_reverts[@]}"; do + if [[ "${_c}" == *..* ]]; then _l='--reverse'; else _l='--max-count=1'; fi + git log --oneline "${_l}" "${_c}" + git revert --mainline 1 --no-commit "${_c}" done }