Make defaults/software.sh not override variables already present
authorPeter Hjalmarsson <xake@rymdraket.net>
Sun, 12 Aug 2012 21:44:59 +0000 (23:44 +0200)
committerPeter Hjalmarsson <xake@rymdraket.net>
Sun, 12 Aug 2012 22:03:49 +0000 (00:03 +0200)
defaults/software.sh

index e0d25378ceaeecc39fd8c28ad71abd1a3f4321e8..fa7d1361c6f50f3d5fce11ce80d25830787b9bf8 100644 (file)
@@ -1,51 +1,48 @@
 # NOTE:
-# - This file (software.sh) is sourced by /etc/genkernel.conf .
+# - This file (software.sh) is sourced by genkernel .
 #   Rather than changing this very file, please override specific versions/variables
-#   somewhere after the (existing) line
+#   somewhere in /etc/genkernel.conf .
 #
-#     source "${GK_SHARE}/defaults/software.sh"
-#
-#   in /etc/genkernel.conf .
-#
-# - The *_VER variables below in here are/were filled with actual version strings
+# - The VERSION_* variables below in here are/were filled with actual version strings
 #   by the genkernel ebuild.
-
-BUSYBOX_VER="VERSION_BUSYBOX"
-BUSYBOX_SRCTAR="${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2"
-BUSYBOX_DIR="busybox-${BUSYBOX_VER}"
-BUSYBOX_BINCACHE="%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2"
-
-LVM_VER="VERSION_LVM"
-LVM_DIR="LVM2.${LVM_VER}"
-LVM_SRCTAR="${DISTDIR}/LVM2.${LVM_VER}.tgz"
-LVM_BINCACHE="%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2"
-
-MDADM_VER="VERSION_MDADM"
-MDADM_DIR="mdadm-${MDADM_VER}"
-MDADM_SRCTAR="${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2"
-MDADM_BINCACHE="%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2"
-
-DMRAID_VER="VERSION_DMRAID"
-DMRAID_DIR="dmraid/${DMRAID_VER}/dmraid"
-DMRAID_SRCTAR="${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2"
-DMRAID_BINCACHE="%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2"
-
-ISCSI_VER="VERSION_ISCSI"
-ISCSI_DIR="open-iscsi-${ISCSI_VER}"
-ISCSI_SRCTAR="${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz"
-ISCSI_BINCACHE="%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2"
-
-FUSE_VER="VERSION_FUSE"
-FUSE_DIR="fuse-${FUSE_VER}"
-FUSE_SRCTAR="${DISTDIR}/fuse-${FUSE_VER}.tar.gz"
-FUSE_BINCACHE="%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2"
-
-UNIONFS_FUSE_VER="VERSION_UNIONFS_FUSE"
-UNIONFS_FUSE_DIR="unionfs-fuse-${UNIONFS_FUSE_VER}"
-UNIONFS_FUSE_SRCTAR="${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2"
-UNIONFS_FUSE_BINCACHE="%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2"
-
-GPG_VER="VERSION_GPG"
-GPG_DIR="gnupg-${GPG_VER}"
-GPG_SRCTAR="${DISTDIR}/gnupg-${GPG_VER}.tar.bz2"
-GPG_BINCACHE="%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2"
+# - This file should not override already existing vars, as they are probably from genkernel.conf
+
+BUSYBOX_VER="${BUSYBOX_VER:-VERSION_BUSYBOX}"
+BUSYBOX_SRCTAR="${BUSYBOX_SRCTAR:-${DISTDIR}/busybox-${BUSYBOX_VER}.tar.bz2}"
+BUSYBOX_DIR="${BUSYBOX_DIR:-busybox-${BUSYBOX_VER}}"
+BUSYBOX_BINCACHE="${BUSYBOX_BINCACHE:-%%CACHE%%/busybox-${BUSYBOX_VER}-%%ARCH%%.tar.bz2}"
+
+LVM_VER="${LVM_VER:-VERSION_LVM}"
+LVM_DIR="${LVM_DIR:-LVM2.${LVM_VER}}"
+LVM_SRCTAR="${LVM_SRCTAR:-${DISTDIR}/LVM2.${LVM_VER}.tgz}"
+LVM_BINCACHE="${LVM_BINCACHE:-%%CACHE%%/LVM2.${LVM_VER}-%%ARCH%%.tar.bz2}"
+
+MDADM_VER="${MDADM_VER:-VERSION_MDADM}"
+MDADM_DIR="${MDADM_DIR:-mdadm-${MDADM_VER}}"
+MDADM_SRCTAR="${MDADM_SRCTAR:-${DISTDIR}/mdadm-${MDADM_VER}.tar.bz2}"
+MDADM_BINCACHE="${MDADM_BINCACHE:-%%CACHE%%/mdadm-${MDADM_VER}-%%ARCH%%.tar.bz2}"
+
+DMRAID_VER="${DMRAID_VER:-VERSION_DMRAID}"
+DMRAID_DIR="${DMRAID_DIR:-dmraid/${DMRAID_VER}/dmraid}"
+DMRAID_SRCTAR="${DMRAID_SRCTAR:-${DISTDIR}/dmraid-${DMRAID_VER}.tar.bz2}"
+DMRAID_BINCACHE="${DMRAID_BINCACHE:-%%CACHE%%/dmraid-${DMRAID_VER}-%%ARCH%%.tar.bz2}"
+
+ISCSI_VER="${ISCSI_VER:-VERSION_ISCSI}"
+ISCSI_DIR="${ISCSI_DIR:-open-iscsi-${ISCSI_VER}}"
+ISCSI_SRCTAR="${ISCSI_SRCTAR:-${DISTDIR}/open-iscsi-${ISCSI_VER}.tar.gz}"
+ISCSI_BINCACHE="${ISCSI_BINCACHE:-%%CACHE%%/iscsi-${ISCSI_VER}-%%ARCH%%.bz2}"
+
+FUSE_VER="${FUSE_VER:-VERSION_FUSE}"
+FUSE_DIR="${FUSE_DIR:-fuse-${FUSE_VER}}"
+FUSE_SRCTAR="${FUSE_SRCTAR:-${DISTDIR}/fuse-${FUSE_VER}.tar.gz}"
+FUSE_BINCACHE="${FUSE_BINCACHE:-%%CACHE%%/fuse-${FUSE_VER}-%%ARCH%%.tar.bz2}"
+
+UNIONFS_FUSE_VER="${UNIONFS_FUSE_VER:-VERSION_UNIONFS_FUSE}"
+UNIONFS_FUSE_DIR="${UNIONFS_FUSE_DIR:-unionfs-fuse-${UNIONFS_FUSE_VER}}"
+UNIONFS_FUSE_SRCTAR="${UNIONFS_FUSE_SRCTAR:-${DISTDIR}/unionfs-fuse-${UNIONFS_FUSE_VER}.tar.bz2}"
+UNIONFS_FUSE_BINCACHE="${UNIONFS_FUSE_BINCACHE:-%%CACHE%%/unionfs-fuse-${UNIONFS_FUSE_VER}-%%ARCH%%.bz2}"
+
+GPG_VER="${GPG_VER:-VERSION_GPG}"
+GPG_DIR="${GPG_DIR:-gnupg-${GPG_VER}}"
+GPG_SRCTAR="${GPG_SRCTAR:-${DISTDIR}/gnupg-${GPG_VER}.tar.bz2}"
+GPG_BINCACHE="${GPG_BINCACHE:-%%CACHE%%/gnupg-${GPG_VER}-%%ARCH%%.bz2}"