commit:     69ca7442778fcb3afed50d4c5639e521869389e9
Author:     ingenarel <ingenarelitems <AT> gmail <DOT> com>
AuthorDate: Tue Jul 22 02:18:38 2025 +0000
Commit:     David Roman <davidroman96 <AT> gmail <DOT> com>
CommitDate: Tue Jul 22 02:18:38 2025 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=69ca7442

app-portage/showbuild: fix the showbuild package

original package didn't even compile because there were no files/ dir

- added a files dir and the source
- EAPI 7 -> EPAI 8
- add a metadata.xml

also fixes the following pkgcheck errors:

app-portage/showbuild
  MissingRemoteId: missing <remote-id 
type="github">junghans/cj-overlay</remote-id> (inferred from URI 
'https://github.com/junghans/cj-overlay')

Signed-off-by: ingenarel <ingenarelitems <AT> gmail.com>

 app-portage/showbuild/files/showbuild-0.9.1        | 41 ++++++++++++++++++++++
 app-portage/showbuild/metadata.xml                 |  8 +++++
 ...d-0.9.1-r1.ebuild => showbuild-0.9.1-r2.ebuild} |  2 +-
 3 files changed, 50 insertions(+), 1 deletion(-)

diff --git a/app-portage/showbuild/files/showbuild-0.9.1 
b/app-portage/showbuild/files/showbuild-0.9.1
new file mode 100644
index 0000000000..2026dfc06c
--- /dev/null
+++ b/app-portage/showbuild/files/showbuild-0.9.1
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+log="$(portageq envvar PORTAGE_TMPDIR)/portage/*/*/temp/build.log"
+cmd="${SB:-tail -f}"
+c=0
+
+die() { echo -e "$*" >&2; exit 1; }
+
+if [[ $1 = -h || $1 = --help ]]; then
+  echo "Script to follow log of running portage builds"
+  echo
+  echo "Usage: ${0##*/}         # see running builds"
+  echo "       ${0##*/} N       # follow build #N"
+  echo "       ${0##*/} --fetch # follow emerge-fetch.log"
+  echo "       ${0##*/} --help  # show this help"
+  echo
+  echo "Use environment variable SB to override the default cmd ($cmd)"
+elif [[ $1 = -f || $1 = --fetch ]]; then
+  log="$(portageq envvar EMERGE_LOG_DIR)"
+  log="${log:=$(portageq envvar EPREFIX)/var/log}/emerge-fetch.log"
+  [[ -f $log ]] || die "Could open '$log'"
+  exec $cmd $log
+elif [[ $(echo $log) = "$log" ]]; then
+  echo "No running build found (try '${0##*/} --help')"
+elif [[ ! $1 ]]; then
+  echo "Running builds - use '${0##*/} NUMBER' to select"
+  for i in $log; do
+    [[ $i =~ ^${log%%\**}([^/]*)/([^/]*)${log##*\*}$ ]] || continue
+    echo -e "$((++c))\t${BASH_REMATCH[2]}\t(${BASH_REMATCH[1]})"
+  done
+else
+  [[ -z ${1//[0-9]} && $1 -gt 0 ]] || die "Argument should be a number greater 
0"
+  for i in $log; do
+    [[ $i =~ ^${log%%\**}([^/]*)/([^/]*)${log##*\*}$ ]] || continue
+    [[ $((++c)) -eq $((10#$1)) ]] || continue
+    [[ -f ${i} ]] || die "Build number $1 was gone in the meanwhile"
+    echo -ne "\033]0;Viewing: ${BASH_REMATCH[2]}\t(${BASH_REMATCH[1]})\007"
+    exec $cmd $i
+  done
+  die "Build number $1 not found (there are only $((c--)) build(s) running)" 
+fi

diff --git a/app-portage/showbuild/metadata.xml 
b/app-portage/showbuild/metadata.xml
new file mode 100644
index 0000000000..d54940e312
--- /dev/null
+++ b/app-portage/showbuild/metadata.xml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd";>
+<pkgmetadata>
+       <!-- maintainer-needed -->
+       <upstream>
+               <remote-id type="github">junghans/cj-overlay</remote-id>
+       </upstream>
+</pkgmetadata>

diff --git a/app-portage/showbuild/showbuild-0.9.1-r1.ebuild 
b/app-portage/showbuild/showbuild-0.9.1-r2.ebuild
similarity index 97%
rename from app-portage/showbuild/showbuild-0.9.1-r1.ebuild
rename to app-portage/showbuild/showbuild-0.9.1-r2.ebuild
index 698635c599..e3d2f66689 100644
--- a/app-portage/showbuild/showbuild-0.9.1-r1.ebuild
+++ b/app-portage/showbuild/showbuild-0.9.1-r2.ebuild
@@ -1,7 +1,7 @@
 # Copyright 1999-2021 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
-EAPI="7"
+EAPI=8
 
 DESCRIPTION="Script to follow log of running portage builds"
 HOMEPAGE="https://github.com/junghans/cj-overlay";

Reply via email to