Skip to content

Commit

Permalink
Merge pull request #187 from renegart/17.1
Browse files Browse the repository at this point in the history
new profile scheme
  • Loading branch information
shiznix committed Jan 12, 2018
2 parents 1c051c2 + 6385c17 commit c9e4c61
Show file tree
Hide file tree
Showing 150 changed files with 77 additions and 265 deletions.
2 changes: 1 addition & 1 deletion eclass/ubuntu-versionator.eclass
Expand Up @@ -143,7 +143,7 @@ ubuntu-versionator_pkg_setup() {
if [ -z "$(echo ${CURRENT_PROFILE} | grep unity-gentoo)" ]; then
die "Invalid profile detected, please select a 'unity-gentoo' profile for your architecture shown in 'eselect profile list'"
else
PROFILE_RELEASE=$(echo "${CURRENT_PROFILE}" | awk -F/ '{print $(NF-1)}')
PROFILE_RELEASE=$(echo "${CURRENT_PROFILE}" | awk -F/ '{print $(NF-0)}')
fi

has_version unity-base/unity-build-env:0/${PROFILE_RELEASE} || \
Expand Down
5 changes: 0 additions & 5 deletions profiles/artful/amd64/parent

This file was deleted.

228 changes: 0 additions & 228 deletions profiles/artful/base/profile.bashrc

This file was deleted.

5 changes: 0 additions & 5 deletions profiles/artful/x86/parent

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.0/artful/parent
@@ -0,0 +1,2 @@
..
unity-gentoo:releases/artful/base
File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.0/parent
@@ -0,0 +1,2 @@
gentoo:default/linux/amd64/17.0
gentoo:arch/amd64/lib32
File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.0/zesty/parent
@@ -0,0 +1,2 @@
..
unity-gentoo:releases/zesty/base
File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.1/artful/parent
@@ -0,0 +1,2 @@
..
unity-gentoo:releases/artful/base
File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.1/parent
@@ -0,0 +1,2 @@
gentoo:default/linux/amd64/17.1
..
File renamed without changes.
2 changes: 2 additions & 0 deletions profiles/linux/amd64/17.1/zesty/parent
@@ -0,0 +1,2 @@
..
unity-gentoo:releases/zesty/base
1 change: 1 addition & 0 deletions profiles/linux/amd64/eapi
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions profiles/linux/amd64/parent
@@ -0,0 +1 @@
..
1 change: 1 addition & 0 deletions profiles/linux/eapi
@@ -0,0 +1 @@
5
2 changes: 2 additions & 0 deletions profiles/linux/parent
@@ -0,0 +1,2 @@
gentoo:targets/desktop/gnome
gentoo:targets/systemd
1 change: 1 addition & 0 deletions profiles/linux/x86/17.0/artful/eapi
@@ -0,0 +1 @@
5
3 changes: 3 additions & 0 deletions profiles/linux/x86/17.0/artful/parent
@@ -0,0 +1,3 @@
..
unity-gentoo:releases/artful/base

1 change: 1 addition & 0 deletions profiles/linux/x86/17.0/eapi
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions profiles/linux/x86/17.0/parent
@@ -0,0 +1 @@
gentoo:default/linux/x86/17.0
1 change: 1 addition & 0 deletions profiles/linux/x86/17.0/zesty/eapi
@@ -0,0 +1 @@
5
2 changes: 2 additions & 0 deletions profiles/linux/x86/17.0/zesty/parent
@@ -0,0 +1,2 @@
..
unity-gentoo:releases/zesty/base
1 change: 1 addition & 0 deletions profiles/linux/x86/eapi
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions profiles/linux/x86/parent
@@ -0,0 +1 @@
..
13 changes: 9 additions & 4 deletions profiles/profiles.desc
@@ -1,5 +1,10 @@
amd64 zesty/amd64 stable
x86 zesty/x86 stable
amd64 linux/amd64/17.0/zesty stable
x86 linux/x86/17.0/zesty stable

amd64 artful/amd64 dev
x86 artful/amd64 dev
amd64 linux/amd64/17.0/artful dev
x86 linux/x86/17.0/artful dev

# Experimental SYMLINK_LIB=no profiles
# Run app-portage/unsymlink-lib *before* switching the profile.
amd64 linux/amd64/17.1/zesty exp
amd64 linux/amd64/17.1/artful exp
1 change: 1 addition & 0 deletions profiles/releases/artful/base/eapi
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions profiles/releases/artful/base/make.defaults
File renamed without changes.
1 change: 1 addition & 0 deletions profiles/releases/artful/base/profile.bashrc
1 change: 1 addition & 0 deletions profiles/releases/artful/base/use.mask
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,13 +1,34 @@
if [[ ${EBUILD_PHASE} == "setup" ]] ; then
CURRENT_PROFILE="$(readlink /etc/portage/make.profile)"
PROFILE_DESC="/etc/portage/${CURRENT_PROFILE%%profiles*}/profiles/profiles.desc"
PROFILE_NAME="${CURRENT_PROFILE#*profiles}"
PROFILE_NAME="${PROFILE_NAME#"/"}"

if [ -z "$(echo ${CURRENT_PROFILE} | grep unity-gentoo)" ]; then
die "Invalid profile detected, please select a 'unity-gentoo' profile for your architecture shown in 'eselect profile list'"
else
PROFILE_RELEASE=$(echo "${CURRENT_PROFILE}" | awk -F/ '{print $(NF-1)}')
PROFILE_RELEASE=$(echo "${CURRENT_PROFILE}" | awk -F/ '{print $(NF-0)}')
fi
# if [ "$(eval echo \${UNITY_DEVELOPMENT_${PROFILE_RELEASE}})" != "yes" ]; then
# die "Oops! A development profile has been detected. Set 'UNITY_DEVELOPMENT_${PROFILE_RELEASE}=yes' in make.conf if you really know how broken this profile could be"
# fi

while read -r line; do
[[ "$line" =~ ^#.*$ ]] && continue
[[ -z "$line" ]] && continue

name=$(echo "${line}" | awk -F' ' '{print $(NF-1)}')
edition=$(echo "${line}" | awk -F' ' '{print $(NF-0)}')
if [[ "${PROFILE_NAME}" == "${name}" ]]; then
if [[ "${edition}" == "dev" ]]; then
if [ "$(eval echo \${UNITY_DEVELOPMENT_${PROFILE_RELEASE}})" != "yes" ]; then
die "Oops! A development profile has been detected. Set 'UNITY_DEVELOPMENT_${PROFILE_RELEASE}=yes' in make.conf if you really know how broken this profile could be"
fi
fi
if [[ "${edition}" == "exp" ]]; then
if [ "$(eval echo \${UNITY_EXPERIMENTAL_PROFILE_${PROFILE_RELEASE}})" != "yes" ]; then
die "Oops! A experimental profile has been detected. Set 'UNITY_EXPERIMENTAL_PROFILE_${PROFILE_RELEASE}=yes' in make.conf if you really know what you are doing!\nHave also a look at: https://www.gentoo.org/support/news-items/2017-12-26-experimental-amd64-17-1-profiles.html"
fi
fi
fi
done < "$PROFILE_DESC"

KEYWORD_STATE="${KEYWORD_STATE:=`grep ACCEPT_KEYWORDS /etc/portage/make.conf 2>/dev/null`}"
KEYWORD_STATE="${KEYWORD_STATE:=`grep ACCEPT_KEYWORDS /etc/make.conf 2>/dev/null`}"
Expand Down Expand Up @@ -38,7 +59,7 @@ if [[ ${EBUILD_PHASE} == "setup" ]] ; then
repodir=$(/usr/bin/portageq get_repo_path / unity-gentoo) \
optdir=${PORTAGE_CONFIGROOT%/}/etc/portage/ehooks
local -a basedirs=(
"${repodir}"/profiles/${PROFILE_RELEASE}/ehooks
"${repodir}"/profiles/releases/${PROFILE_RELEASE}/ehooks
"${optdir}"
)

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions profiles/releases/zesty/base/eapi
@@ -0,0 +1 @@
5
1 change: 1 addition & 0 deletions profiles/releases/zesty/base/make.defaults
File renamed without changes.
1 change: 1 addition & 0 deletions profiles/releases/zesty/base/profile.bashrc
1 change: 1 addition & 0 deletions profiles/releases/zesty/base/use.mask
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
5 changes: 0 additions & 5 deletions profiles/zesty/amd64/parent

This file was deleted.

2 changes: 0 additions & 2 deletions profiles/zesty/base/make.defaults

This file was deleted.

2 changes: 0 additions & 2 deletions profiles/zesty/base/use.mask

This file was deleted.

5 changes: 0 additions & 5 deletions profiles/zesty/x86/parent

This file was deleted.

0 comments on commit c9e4c61

Please sign in to comment.