summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorNick White <git@njw.me.uk>2009-06-16 12:11:39 +0100
committerNick White <git@njw.me.uk>2009-06-16 12:11:39 +0100
commitabda548dbd0195ce04547f5fc89188662995f0e4 (patch)
tree445049582bfa03171d16b0e53c12a0ccb46c5cec /eclass
parentc2acb28e796b839e5adda5b84bc18d91dc54602b (diff)
downloadnjw-gentoo-local-abda548dbd0195ce04547f5fc89188662995f0e4.tar.bz2
njw-gentoo-local-abda548dbd0195ce04547f5fc89188662995f0e4.zip
Check patches for blobs, and fix uri setting
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kernel-libre.eclass34
1 files changed, 28 insertions, 6 deletions
diff --git a/eclass/kernel-libre.eclass b/eclass/kernel-libre.eclass
index a042ab1..483015a 100644
--- a/eclass/kernel-libre.eclass
+++ b/eclass/kernel-libre.eclass
@@ -8,20 +8,42 @@
#
inherit kernel-2
-EXPORT_FUNCTIONS pkg_setup src_unpack
+EXPORT_FUNCTIONS src_unpack
-kernel-libre_pkg_setup() {
- libre_uri_base="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre"
+DEBLOB_CHECK="deblob-check"
+KERNEL_URI="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre/linux-${PV}-libre.tar.bz2"
+DEBLOB_URI="http://www.linux-libre.fsfla.org/pub/linux-libre/releases/${PV}-libre/${DEBLOB_CHECK}"
- DEBLOB_CHECK="deblob-check"
- KERNEL_URI="${LIBRE_URI_BASE}/linux-${PV}-libre.tar.bz2"
- DEBLOB_URI="${LIBRE_URI_BASE}/${DEBLOB_CHECK}"
+check_for_blobs() {
+ # usage: check_for_blobs name_of_variable_containing_paths_to_check
+ # we want the name of a variable (not just its contents)
+ # so can unset it if blobs are found
+
+ [[ -z "${!1}" ]] && return 1
+
+ sh ${DISTDIR}/${DEBLOB_CHECK} ${!1}
+
+ if [ $? -ne 0 ]; then
+ ewarn "Warning: A file in ${1} appears to contain blobs."
+ ewarn "Disabling ${1} for now."
+ eval "${1}=''"
+ ewarn "Please report this to http://bugs.gentoo.org/266157"
+ return 1
+ fi
+
+ return 0
}
kernel-libre_src_unpack() {
# kernel revision patches included in tarball
UNIPATCH_LIST_DEFAULT=""
+ if [ -n ${UNIPATCH_LIST_GENPATCHES} || -n ${UNIPATCH_LIST} ]; then
+ echo "Checking all patches are clean of blobs"
+ check_for_blobs "UNIPATCH_LIST_GENPATCHES"
+ check_for_blobs "UNIPATCH_LIST"
+ fi
+
# universal_unpack expects a different kernel tarball name
expected_tarball=${DISTDIR}/linux-${OKV}.tar.bz2