Compare commits
8 Commits
e14d29cc2b
...
master
Author | SHA1 | Date | |
---|---|---|---|
56bdfe5c35 | |||
82a583f00d | |||
5db7afa3d5 | |||
662d9b42f4 | |||
e1973e3055 | |||
910a2e8426 | |||
452a71560e | |||
b71af2ce28 |
@ -49,7 +49,7 @@ fi
|
|||||||
printf "%s\n" \
|
printf "%s\n" \
|
||||||
">>> Starting full test" \
|
">>> Starting full test" \
|
||||||
"Running repoman -Idix"
|
"Running repoman -Idix"
|
||||||
repoman -Idix
|
repoman --verbose -Idix
|
||||||
printf "%s\n" "Running pkgcheck scan"
|
printf "%s\n" "Running pkgcheck scan"
|
||||||
pkgcheck scan
|
pkgcheck scan
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ do
|
|||||||
printf "\n%s\n" \
|
printf "\n%s\n" \
|
||||||
"Directory $(pwd):" \
|
"Directory $(pwd):" \
|
||||||
"Running repoman -Idix"
|
"Running repoman -Idix"
|
||||||
repoman -Idix || test_success=false
|
repoman --verbose -Idix || test_success=false
|
||||||
cd - >/dev/null || return
|
cd - >/dev/null || return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||||
# Copyright (c) 2020, src_prepare group
|
# Copyright (c) 2020-2021, src_prepare group
|
||||||
# Licensed under the GNU GPL v3 License
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ fi
|
|||||||
for ebuild in "${@}"
|
for ebuild in "${@}"
|
||||||
do
|
do
|
||||||
# one may want this to be unprivileged
|
# one may want this to be unprivileged
|
||||||
repoman manifest || ebuild "${ebuild}" manifest
|
GENTOO_MIRRORS="" repoman manifest || ebuild "${ebuild}" manifest
|
||||||
|
|
||||||
# we want this to be privileged on Gentoo systems
|
# we want this to be privileged on Gentoo systems
|
||||||
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
if [ "$(whoami)" != root ] && [ -z "${EPREFIX}" ]
|
||||||
|
119
src/ebuild-activate
Normal file
119
src/ebuild-activate
Normal file
@ -0,0 +1,119 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
|
# This file is part of scripts.
|
||||||
|
|
||||||
|
# scripts is free software: you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation, version 3.
|
||||||
|
|
||||||
|
# scripts is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
|
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||||
|
# Copyright (c) 2021, src_prepare group
|
||||||
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
|
|
||||||
|
# Exit if script is not sourced
|
||||||
|
|
||||||
|
case ${-}
|
||||||
|
in
|
||||||
|
*i* )
|
||||||
|
:
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
printf "%s\n" "Run: source ${0}" \
|
||||||
|
">>> Exiting the shell" \
|
||||||
|
>> /dev/stderr
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
# Internal
|
||||||
|
|
||||||
|
_timest="$(date +%Y-%m-%d_%H:%M:%S || echo 'null')"
|
||||||
|
_tmpdir='/tmp/edev'
|
||||||
|
_toplevel="$(git rev-parse --show-toplevel || echo '/dev/null')"
|
||||||
|
|
||||||
|
|
||||||
|
# Mark time when user entered environment for given repository
|
||||||
|
|
||||||
|
if mkdir -p "${_tmpdir}"
|
||||||
|
then
|
||||||
|
if cd "${_tmpdir}"
|
||||||
|
then
|
||||||
|
ln -fs "${_toplevel}" "${_timest}"
|
||||||
|
cd - ||
|
||||||
|
echo 'Bug?'
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
# Set variables for ebuild development
|
||||||
|
|
||||||
|
ACCEPT_LICENSE='*'
|
||||||
|
export ACCEPT_LICENSE
|
||||||
|
|
||||||
|
if type lz4 >/dev/null
|
||||||
|
then
|
||||||
|
BINPKG_COMPRESS='lz4'
|
||||||
|
export BINPKG_COMPRESS
|
||||||
|
fi
|
||||||
|
|
||||||
|
if mkdir -p "${_tmpdir}/dist"
|
||||||
|
then
|
||||||
|
DISTDIR="${_tmpdir}/dist"
|
||||||
|
export DISTDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
GENTOO_MIRRORS=''
|
||||||
|
export GENTOO_MIRRORS
|
||||||
|
|
||||||
|
INSTALL_MASK=''
|
||||||
|
export INSTALL_MASK
|
||||||
|
|
||||||
|
if mkdir -p "${_tmpdir}/elog"
|
||||||
|
then
|
||||||
|
PORTAGE_ELOG_CLASSES='warn error log'
|
||||||
|
export PORTAGE_ELOG_CLASSES
|
||||||
|
PORTAGE_ELOG_SYSTEM='save'
|
||||||
|
export PORTAGE_ELOG_SYSTEM
|
||||||
|
PORTAGE_LOGDIR="${_tmpdir}/elog"
|
||||||
|
export PORTAGE_LOGDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -e "${_toplevel}/profiles/repo_name" ]
|
||||||
|
then
|
||||||
|
PORTDIR="${_toplevel}"
|
||||||
|
export PORTDIR
|
||||||
|
fi
|
||||||
|
|
||||||
|
PS1="(ebuild) ${PS1}"
|
||||||
|
|
||||||
|
|
||||||
|
# Some helpful aliases
|
||||||
|
|
||||||
|
alias cd-edev='cd ${_tmpdir}'
|
||||||
|
alias cd-repo='cd ${_toplevel}'
|
||||||
|
alias cd-dist='cd ${DISTDIR}'
|
||||||
|
alias cd-elog='cd ${PORTAGE_LOGDIR}'
|
||||||
|
|
||||||
|
alias clean-edev='rm -r ${_tmpdir}'
|
||||||
|
alias clean-dist='rm -r ${DISTDIR}'
|
||||||
|
alias clean-elog='rm -r ${PORTAGE_LOGDIR}'
|
||||||
|
|
||||||
|
alias ls-edev='ls -ahl ${_tmpdir}'
|
||||||
|
alias ls-repo='ls -ahl ${_toplevel}'
|
||||||
|
alias ls-dist='ls -ahl ${DISTDIR}'
|
||||||
|
alias ls-elog='ls -ahl ${PORTAGE_LOGDIR}'
|
||||||
|
|
||||||
|
|
||||||
|
clear
|
||||||
|
echo ">>> Entering Ebuild development environment"
|
@ -16,7 +16,7 @@
|
|||||||
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
# along with scripts. If not, see <https://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
# Original author: Maciej Barć <xgqt@riseup.net>
|
# Original author: Maciej Barć <xgqt@riseup.net>
|
||||||
# Copyright (c) 2020, src_prepare group
|
# Copyright (c) 2020-2021, src_prepare group
|
||||||
# Licensed under the GNU GPL v3 License
|
# Licensed under the GNU GPL v3 License
|
||||||
|
|
||||||
|
|
||||||
@ -26,7 +26,7 @@ export PATH
|
|||||||
|
|
||||||
main() {
|
main() {
|
||||||
[ -f Manifest ] && rm -v Manifest
|
[ -f Manifest ] && rm -v Manifest
|
||||||
repoman --verbose manifest
|
GENTOO_MIRRORS="" repoman --verbose manifest
|
||||||
|
|
||||||
repoman --verbose -Idx full
|
repoman --verbose -Idx full
|
||||||
pkgcheck --verbose scan
|
pkgcheck --verbose scan
|
||||||
|
@ -29,13 +29,16 @@
|
|||||||
ignored_dirs=(
|
ignored_dirs=(
|
||||||
.
|
.
|
||||||
.git
|
.git
|
||||||
|
3rd_party
|
||||||
|
doc
|
||||||
eclass
|
eclass
|
||||||
files
|
files
|
||||||
licenses
|
licenses
|
||||||
metadata
|
metadata
|
||||||
profiles
|
profiles
|
||||||
|
public
|
||||||
|
scribblings
|
||||||
scripts
|
scripts
|
||||||
3rd_party
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +54,7 @@ ignored_dirs=(
|
|||||||
printf "%s\n" \
|
printf "%s\n" \
|
||||||
">>> Starting full test" \
|
">>> Starting full test" \
|
||||||
"Running repoman -Idix"
|
"Running repoman -Idix"
|
||||||
repoman -Idix
|
repoman --verbose -Idix
|
||||||
|
|
||||||
|
|
||||||
printf "%s\n" ">>> Starting latest commit test"
|
printf "%s\n" ">>> Starting latest commit test"
|
||||||
@ -81,7 +84,7 @@ do
|
|||||||
printf "\n%s\n" \
|
printf "\n%s\n" \
|
||||||
"Checking ${commit_dir}" \
|
"Checking ${commit_dir}" \
|
||||||
"Running repoman -Idix"
|
"Running repoman -Idix"
|
||||||
repoman -Idix || test_success="false"
|
repoman --verbose -Idix || test_success="false"
|
||||||
cd - >/dev/null || return
|
cd - >/dev/null || return
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user