Discussion:
[gentoo-user] Feature "split-log" in Portage variable "FEATURES"
(too old to reply)
Dr Rainer Woitok
2023-05-15 13:50:01 UTC
Permalink
Greetings,

skimming through "man make.conf" looking for something else I stumbled
upon

split-log
Store build logs in category subdirectories of
PORTAGE_LOGDIR/build, instead of using PORTAGE_LOGDIR di‐
rectly.

and I decided to give it a try. After adding "split-log" to variable
"FEATURES" in file "make.conf" I updated a single small package, but the
build log did not turn up anywhere, even though file "/var/log/emerge.
log" contained a new entry telling me the package has been successfully
updated.

What am I missing?

Sincerely,
Rainer
tastytea
2023-05-15 14:10:01 UTC
Permalink
Post by Dr Rainer Woitok
Greetings,
skimming through "man make.conf" looking for something else I
stumbled upon
split-log
Store build logs in category subdirectories of
PORTAGE_LOGDIR/build, instead of using PORTAGE_LOGDIR di‐
rectly.
and I decided to give it a try. After adding "split-log" to
variable "FEATURES" in file "make.conf" I updated a single small
package, but the build log did not turn up anywhere, even though
file "/var/log/emerge. log" contained a new entry telling me the
package has been successfully updated.
What am I missing?
most likely you didn't define PORTAGE_LOGDIR in your make.conf and it's
empty by default (check with `portageq envvar PORTAGE_LOGDIR`).

kind regards, tastytea
Dr Rainer Woitok
2023-05-15 14:20:01 UTC
Permalink
Post by Dr Rainer Woitok
...
After adding "split-log" to variable
"FEATURES" in file "make.conf" I updated a single small package, but the
build log did not turn up anywhere, even though file "/var/log/emerge.
log" contained a new entry telling me the package has been successfully
updated.
What am I missing?
Well I simply missed the "--update" option of the "emerge" command. :-)

Sorry for the noise ...

Sincerely,
Rainer
Dale
2023-05-15 16:40:01 UTC
Permalink
Post by Dr Rainer Woitok
Post by Dr Rainer Woitok
...
After adding "split-log" to variable
"FEATURES" in file "make.conf" I updated a single small package, but the
build log did not turn up anywhere, even though file "/var/log/emerge.
log" contained a new entry telling me the package has been successfully
updated.
What am I missing?
Well I simply missed the "--update" option of the "emerge" command. :-)
Sorry for the noise ...
Sincerely,
Rainer
If you got a minute, what is the reason for split-log?  What exactly
does it split?  I'm guessing this is new since I don't recall reading
about it. 

Dale

:-)  :-) 
Dr Rainer Woitok
2023-05-15 17:30:02 UTC
Permalink
Dale,
Post by Dale
...
If you got a minute, what is the reason for split-log?  What exactly
does it split?  I'm guessing this is new since I don't recall reading
about it. 
Under Gentoo each package has a name consisting of two parts: "category/
name". But since under Unix/Linux the "/" is used to separate path com-
ponents, the build logs in "/var/log/portage/" have sort of ugly names:
"category:name-version:YYYYMMDD:HHMMSS.log" with a colon rather than a
slash between category and name. The "split-log" feature now splits the
category to a sub-directory name under "/var/log/portage/build/" and us-
es name, version and time stamp as the log file name. This enables you
to simply use the full Gentoo package name in scripts as in

$ pkg=media-gfx/gimp
$ ls /var/log/portage/build/$pkg-*.log | sort -t : -rk 2,3 | head -1

to get the path to the most recent log file without first having to re-
place the slash with a colon.

This is probably only relevant if you write your own scripts to get your
tasks done. And I don't have any idea whether or not it's new, I just
found it by pure chance when looking for something else ... :-)

Sincerely,
Rainer
Dale
2023-05-15 18:00:01 UTC
Permalink
Post by Dr Rainer Woitok
Dale,
Post by Dale
...
If you got a minute, what is the reason for split-log?  What exactly
does it split?  I'm guessing this is new since I don't recall reading
about it. 
Under Gentoo each package has a name consisting of two parts: "category/
name". But since under Unix/Linux the "/" is used to separate path com-
"category:name-version:YYYYMMDD:HHMMSS.log" with a colon rather than a
slash between category and name. The "split-log" feature now splits the
category to a sub-directory name under "/var/log/portage/build/" and us-
es name, version and time stamp as the log file name. This enables you
to simply use the full Gentoo package name in scripts as in
$ pkg=media-gfx/gimp
$ ls /var/log/portage/build/$pkg-*.log | sort -t : -rk 2,3 | head -1
to get the path to the most recent log file without first having to re-
place the slash with a colon.
This is probably only relevant if you write your own scripts to get your
tasks done. And I don't have any idea whether or not it's new, I just
found it by pure chance when looking for something else ... :-)
Sincerely,
Rainer
Would this make using tab completion easier too?  I ask because when I
want to cat a error log file, tab completion gets difficult pretty
quick.  I'm not sure this would help with that tho. 

Thanks. 

Dale

:-)  :-) 
Dr Rainer Woitok
2023-05-16 14:20:01 UTC
Permalink
Dale,
Post by Dale
...
Would this make using tab completion easier too?  I ask because when I
want to cat a error log file, tab completion gets difficult pretty
quick.
At least the first part -- selecting the category directory -- should
become easier, because the possible completion suggestions only involve
matching categories rather than all installed matching packages.

Sincerely,
Rainer

Loading...