Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 555472
Collapse All | Expand All

(-)aufs3-3_p20150622.ebuild (-12 / +18 lines)
Lines 53-70 Link Here
53
53
54
	linux-mod_pkg_setup
54
	linux-mod_pkg_setup
55
55
56
	if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
57
		PATCH_BRANCH="x-rcN"
58
	elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "40" ]]; then
59
		PATCH_BRANCH="${KV_MINOR}".40+
60
	elif [[ "${KV_MINOR}" == "14" ]] && [[ "${KV_PATCH}" -ge "21" ]]; then
61
		PATCH_BRANCH="${KV_MINOR}".21+
62
	elif [[ "${KV_MINOR}" == "18" ]] && [[ "${KV_PATCH}" -ge "1" ]]; then
63
		PATCH_BRANCH="${KV_MINOR}".1+
64
	else
65
		PATCH_BRANCH="${KV_MINOR}"
66
	fi
67
68
	case ${KV_EXTRA} in
56
	case ${KV_EXTRA} in
69
			"")
57
			"")
70
				elog "It seems you are using vanilla-sources with aufs3"
58
				elog "It seems you are using vanilla-sources with aufs3"
Lines 81-86 Link Here
81
	pushd "${T}" &> /dev/null
69
	pushd "${T}" &> /dev/null
82
	unpack ${A}
70
	unpack ${A}
83
	cd ${PN}-standalone || die
71
	cd ${PN}-standalone || die
72
73
	# choose the correct branch by inspecting the list in the package
74
	if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then
75
		PATCH_BRANCH="x-rcN"
76
	else
77
		local i min pat branches
78
		branches=$(git branch -a |grep 'remotes/origin/.*+' |sed -e 's#^.*remotes/origin/aufs3.##' |sort -rn)
79
		for i in ${branches}; do
80
			min=${i%.*}
81
			pat=${i##*.}
82
			if [[ ${KV_MINOR} == ${min} ]] && [[ ${KV_PATCH} -ge ${pat%+} ]]; then
83
				PATCH_BRANCH=${i}
84
				break;
85
			fi
86
		done
87
		: ${PATCH_BRANCH:=${KV_MINOR}}
88
	fi
89
84
	local module_branch=origin/${PN}.${PATCH_BRANCH}
90
	local module_branch=origin/${PN}.${PATCH_BRANCH}
85
	einfo "Using ${module_branch} as patch source"
91
	einfo "Using ${module_branch} as patch source"
86
	git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die
92
	git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die

Return to bug 555472