Compare commits

5 Commits

Author SHA1 Message Date
850ca56ff7 src/eball: update usage
Signed-off-by: Maciej Barć <xgqt@riseup.net>
2021-04-18 02:03:25 +02:00
c6b6f6062d *: update my email (xgqt@riseup.net)
Signed-off-by: Maciej Barć <xgqt@riseup.net>
2021-04-18 02:02:15 +02:00
ba55fe2f2d src/install-ebuild-deps: fix some stupid bugs; update copyright
Signed-off-by: Maciej Barć <xgqt@riseup.net>
2021-04-18 01:59:44 +02:00
e2cd817f72 src/commit-ebuild: rework; add options to quickly bump or drop pkgs
Signed-off-by: Maciej Barć <xgqt@riseup.net>
2021-04-08 23:57:45 +02:00
8945817ba4 LICENSE: original text
Signed-off-by: Maciej Barć <xgqt@riseup.net>
2021-03-29 13:26:46 +02:00
19 changed files with 93 additions and 48 deletions

View File

@ -12,7 +12,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -636,7 +636,8 @@ the "copyright" line and a pointer to where the full notice is found.
This program 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.
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com>
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2021, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com>
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020-2021, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License
@ -25,21 +25,53 @@ set -e
export PATH
pdir="$(git rev-parse --show-prefix)"
FEATURES="sign"
export FEATURES
package_directory="$(git rev-parse --show-prefix)"
package="${package_directory%/}"
error_no_version() {
echo "[ERROR]: No version given"
echo " Ran with option: ${1}"
exit 1
}
git add .
if [ -z "${1}" ]
then
case "${1}"
in
"" )
echo "[DEBUG]: no additional arguments/options given"
repoman commit
;;
-b | --bump )
echo "[DEBUG]: to be: ${package}: bump to ${2}"
if [ -n "${2}" ]
then
repoman commit -m "${package}: bump to ${2}"
else
repoman commit -m "${pdir%/}: ${*}"
error_no_version "${1}"
fi
git pull --verbose
git push --verbose
;;
-d | --drop )
echo "[DEBUG]: to be: ${package}: drop old ${2}"
if [ -n "${2}" ]
then
repoman commit -m "${package}: drop old ${2}"
else
error_no_version "${1}"
fi
;;
-* )
echo "[ERROR]: Unknown option ${1}"
exit 1
;;
* )
echo "[DEBUG]: to be: ${package}: ${*}"
repoman commit -m "${package}: ${*}"
;;
esac

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License
@ -29,9 +29,9 @@ usage() {
Usage: eball FILES
eball - test new ebuilds
Original author: XGQT
Copyright (c) 2020, src_prepare group
Licensed under the ISC License
Original author: Maciej Barć
Copyright (c) 2020-2021, src_prepare group
Licensed under the GPLv3
HELP
}

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -16,8 +16,8 @@ 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@protonmail.com)
Copyright (c) 2020, src_prepare group
Original author: Maciej Barć <xgqt@riseup.net>
Copyright (c) 2020-2021, src_prepare group
Licensed under the GNU GPL v3 License
Install Ebuild Dependencies
@ -29,12 +29,13 @@ to emerge dependencies we would just do "emerge --oneshot --onlydeps PKG".
import argparse
import sys
from subprocess import call
parser = argparse.ArgumentParser(
description="Install Ebuild Dependencies",
epilog="Copyright (c) 2020, src_prepare group (License: ISC)"
epilog="Copyright (c) 2020-2021, src_prepare group (License: GPLv3)"
)
parser.add_argument(
"ebuild",
@ -45,16 +46,14 @@ args = parser.parse_args()
def pkg_name(pkg_str):
"""Parse string and return a pkg name"""
"""
Parse string and return a pkg name.
"""
# TODO: don't strip but force
proper = ""
# Strip required use
for i in ["["]:
if i in pkg_str:
proper = pkg_str.split(i)[0]
proper = pkg_str.split("[")[0]
# Strip conditional use
for i in ["$", "DEPEND", "||", "!", "?", "(", ")"]:
@ -65,12 +64,21 @@ def pkg_name(pkg_str):
def ebuild_deps(ebuild_file):
"""Returns dependencies from a ebuild file"""
"""
Returns dependencies from a ebuild file.
"""
deps = []
adddeps = False
with open(ebuild_file) as ebuild:
for line in ebuild.read().splitlines():
if adddeps:
# TODO: Find a better way to find the depend "block"
if "DEPEND" in line:
adddeps = True
elif adddeps:
# TODO: Find a better pkg match method
if "/" in line:
deps.append(
@ -78,16 +86,20 @@ def ebuild_deps(ebuild_file):
)
elif "\"" in line:
adddeps = False
# TODO: Find a better way to find the depend "block"
elif "DEPEND" in line:
adddeps = True
return deps
def main():
"""The main function"""
"""
The main function.
"""
print("Ebuilds:", args.ebuild)
if args.ebuild == []:
print("[ERROR]: No ebuilds given")
sys.exit(1)
all_deps = []
for ebuild in args.ebuild:

View File

@ -16,7 +16,7 @@ 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@protonmail.com)
Original author: Maciej Barć <xgqt@riseup.net>
Copyright (c) 2020, src_prepare group
Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

2
src/pn
View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License

View File

@ -15,7 +15,7 @@
# 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@protonmail.com)
# Original author: Maciej Barć <xgqt@riseup.net>
# Copyright (c) 2020, src_prepare group
# Licensed under the GNU GPL v3 License