mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-15 17:06:58 +02:00
eclass/vcs-snapshot: Sync with gentoo
It's from gentoo commit 6aaf76e545af2f9489295c214673897994a4ce31.
This commit is contained in:
parent
b4d6d2916e
commit
bf3e9f2eae
@ -1,10 +1,10 @@
|
|||||||
# Copyright 1999-2019 Gentoo Authors
|
# Copyright 1999-2022 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: vcs-snapshot.eclass
|
# @ECLASS: vcs-snapshot.eclass
|
||||||
# @MAINTAINER:
|
# @MAINTAINER:
|
||||||
# mgorny@gentoo.org
|
# mgorny@gentoo.org
|
||||||
# @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
|
# @SUPPORTED_EAPIS: 6 7 8
|
||||||
# @BLURB: support eclass for unpacking VCS snapshot tarballs
|
# @BLURB: support eclass for unpacking VCS snapshot tarballs
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS.
|
# THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS.
|
||||||
@ -42,12 +42,13 @@
|
|||||||
# and however the tarballs were originally packed, all files will appear
|
# and however the tarballs were originally packed, all files will appear
|
||||||
# in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively.
|
# in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively.
|
||||||
|
|
||||||
case ${EAPI:-0} in
|
case ${EAPI} in
|
||||||
0|1|2|3|4|5|6|7) ;;
|
6|7|8) ;;
|
||||||
*) die "vcs-snapshot.eclass API in EAPI ${EAPI} not yet established."
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
EXPORT_FUNCTIONS src_unpack
|
if [[ ! ${_VCS_SNAPSHOT_ECLASS} ]]; then
|
||||||
|
_VCS_SNAPSHOT_ECLASS=1
|
||||||
|
|
||||||
# @FUNCTION: vcs-snapshot_src_unpack
|
# @FUNCTION: vcs-snapshot_src_unpack
|
||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
@ -102,7 +103,7 @@ vcs-snapshot_src_unpack() {
|
|||||||
|
|
||||||
if [[ ! ${renamed_any} ]]; then
|
if [[ ! ${renamed_any} ]]; then
|
||||||
local w=eerror
|
local w=eerror
|
||||||
[[ ${EAPI} == [0123456] ]] && w=eqawarn
|
[[ ${EAPI} == 6 ]] && w=eqawarn
|
||||||
"${w}" "${FUNCNAME} did not find any archives that needed renaming."
|
"${w}" "${FUNCNAME} did not find any archives that needed renaming."
|
||||||
"${w}" "Please verify that its usage is really necessary, and remove"
|
"${w}" "Please verify that its usage is really necessary, and remove"
|
||||||
"${w}" "the inherit if it is not."
|
"${w}" "the inherit if it is not."
|
||||||
@ -110,3 +111,7 @@ vcs-snapshot_src_unpack() {
|
|||||||
[[ ${w} == eerror ]] && die "${FUNCNAME}: Unnecessary usage detected"
|
[[ ${w} == eerror ]] && die "${FUNCNAME}: Unnecessary usage detected"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fi
|
||||||
|
|
||||||
|
EXPORT_FUNCTIONS src_unpack
|
||||||
|
Loading…
Reference in New Issue
Block a user