Mailing List Archive

Feature "split-log" in Portage variable "FEATURES"
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
Re: Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
On 2023-05-15 15:39+0200 Dr Rainer Woitok <rainer.woitok@gmail.com>
wrote:

> 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
Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
On Monday, 2023-05-15 15:39:57 +0200, I myself wrote:

> ...
> 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
Re: Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
Dr Rainer Woitok wrote:
> On Monday, 2023-05-15 15:39:57 +0200, I myself wrote:
>
>> ...
>> 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

:-)  :-) 
Re: Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
Dale,

On Monday, 2023-05-15 11:35:33 -0500, you wrote:

> ...
> 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
Re: Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
Dr Rainer Woitok wrote:
> Dale,
>
> On Monday, 2023-05-15 11:35:33 -0500, you wrote:
>
>> ...
>> 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
>

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

:-)  :-) 
Re: Re: [SOLVED] Feature "split-log" in Portage variable "FEATURES" [ In reply to ]
Dale,

On Monday, 2023-05-15 12:58:43 -0500, you wrote:

> ...
> 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