Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Discussion & Documentation Documentation, Tips & Tricks
  • Search

[IMPROVED] Shell script for pretty kernel config comparison

Unofficial documentation for various parts of Gentoo Linux. Note: This is not a support forum.
Post Reply
Advanced search
31 posts
  • 1
  • 2
  • Next
Author
Message
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

[IMPROVED] Shell script for pretty kernel config comparison

  • Quote

Post by Goverp » Mon Apr 24, 2023 12:55 pm

The (somewhat long, sorry) shell script at the end will produce a succinct and pretty (and colourful on terminals) comparison between two kernel configuration files as produced by "make menuconfig" etc.
Its Unique Selling Point is that it retains the comments that group the settings in the menus, and uses them to produce an indented list.
For example,

Code: Select all

bin/cfcfg /boot/config-6.2.12-git /boot/config-6.3.1-git | less
produces the following output on my system (sadly lacking colour):

Code: Select all

# Linux/x86 6.2.12 Kernel Configuration ---> # Linux/x86 6.3.1 Kernel Configuration
   # General setup
-      GCC12_NO_ARRAY_BOUNDS=y 
+      SCHED_MM_CID=y 
   # Processor type and features
       # Performance monitoring
-          PERF_EVENTS_AMD_POWER=y 
-          PERF_EVENTS_AMD_UNCORE=y 
+  AS_GFNI=y 
-  BLOCK_COMPAT=y 
   # Networking options
       # Core Netfilter Configuration
-          NETFILTER_FAMILY_ARP=y 
       # IP: Netfilter Configuration
-          IP_NF_TARGET_CLUSTERIP=m 
   # Device Drivers
       # Intel thermal drivers
-          X86_PKG_TEMP_THERMAL=m 
       # Media drivers
           # Media drivers
               # FireWire (IEEE 1394) Adapters
+                  UVC_COMMON=m 
       # Graphics support
+          DRM_DISPLAY_HDCP_HELPER=y 
       # HID support
+          HID_SUPPORT=y 
   # File systems
+      LEGACY_DIRECT_IO=y 
+      RPCSEC_GSS_KRB5=y
And here's the script. The help text at the top is also the documentation:

Code: Select all

#!/bin/sh
# cfcfg - Produce a succinct kernel configuration comparison

# Copyright (C) 2023 Paul Gover
# 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, either version 3 of the License, or
# (at your option) any later version.

ME="${0##*/}"
set -e	# Abort on errors - will leave some temp files

### Help and documentation:
doHelp() {
cat << endhelp
SYNTAX: $ME [-c] [-m] [-w nnn] oldcondfigfile newconfigfile

Produce a succinct comparison of two kernel config files,
which MUST be the unmodified .config file from the kernel "make" configurator.
Changes such as sorting or manual editing will probably cause erroneous and voluminous output.
Retains contextual information comments such as Processor options, Device driver,
including nested contexts.
"Succinct" means that all unset items and irrelevant comments get stripped from the output,
as are the "CONFIG_" prefixes to item names.

Can also be used to pretty-print a succinct config file extract
by making one of the comparison configs /dev/null.

OPTIONS:
-c      Force output colouring when output to file or pipe.
-m      Conver module settings (=m) to builtin (=y) before comparison
        This will remove non-functional differences.
-w nnn  Width of "diff" columns used internally for the comparison.
        Output lines can be up to twice this length, plus gutters and indentation,
        but usually a lot less.

Note that the output is truncated to fit the screen, but the comparison is based on all the text.
This means that the display of long lines might not reach the differences.

The indentation is based on the location of comments in the configuration files.
This is not a defined API, so the algorithm used may not always get it right.
There are missing comments such as Bluetooth and duplicates such as Media drivers.

Uses "diff", "gawk" and "mktemp".  It might not work with other awk implemenations.
These come from diffutils, gawk and coreutils packages.
Coded for Posix shells such as dash, and works with bash.
endhelp
}

### Pipe filters using gawk
# BEWARE: the gawk program parameters are passed as '-commented strings over several lines
# so the gawk command line almost invariable ends with a ' matched several lines later

### Filter useful stuff from a config file
strip() {
        # We have to build the awk program in bits to allow shell variable substitution
        local stripper
        stripper='
                /^CONFIG_.*/ {'

        [ "$ignoremodules" ] && stripper="$stripper "'gsub( /=m$/ , "=y") ;'  # Convert module items to inline

        stripper="$stripper"'print substr($0, 8); next }        # Strip out the fixed prefix - less work for diff

                /^[#[:space:]]*$/       { next }                # Skip comments without text
                /^#.*is not set/        { next }                # Skip unset items
                /^#.*generated file/    { next }                # Skip boilerplate heading
                /^#/                    { print ; next }        # Print comments with text
                { print "Unexpected", $0 > "/dev/stderr" }      # Catchall for cruft
        '

        gawk "$stripper"
}

### Filter "end of" comments so we can identify nesting comments
ended() {
        gawk -v FIELDWIDTHS="1 1:$width 1:*" '$2~/^# end of/ { gsub( /[[:space:]]*$/ , "", $2) ; print substr($2, 10) ; next }'
}

### Split side-by-side diff output containing comments
# into two separate lines (or one if both halves of the line are equal)
# Remove non-comment lines with no changes
# Reorder the fields to put the indication first
# There's probably a better way than using side-by-side...
split() {
        gawk -v FIELDWIDTHS="$width 1:1 1:*" '
        NR<5 && /^#.*Kernel Configuration.*[\\|\/]/     {
                print "|", $1, $3 ; next
                }                                               # Leave the header line
        /^#/ && $2~/ /          { print " ", $1 ; next }        # Matched comments, print once
        $2~/ /                  { next }                        # Matched settings - ignore
        $2~/[\\|\/]/ && ($1~/^#/ || $3~/^#/)    {
                print "-", $1 ; print "+", $3 ; next
                }                                               # Change involving a comment, do both
        $2~/[\\|\/]/            { print "|", $1, $3 ; next }    # Changed settings
        $2~/[>]/                { print "+", $3 ; next }        # Added line, comment or setting
        $2~/[<]/                { print "-", $1 ; next }        # Removed line, comment or setting
        { print "What?", $2, $1, $3 > "/dev/stderr" }           # Anything else is an error
        '
}

### Parse diff output:
# Handle initial label comment (describing kernel versions).
# Use the list of ending with "# end of <foo>";
# they indicate nesting. so we can count indentation levels.
# Abbreviate inserts, deletions and changes for a concise report.
reduce() {
        gawk -v FIELDWIDTHS="1 1:$width 1:*" -v endedFile="$endsFile" -v colors="$ADD:$REM:$CHG:$NIL" '
        BEGIN {
                while( getline < endedFile ) { matched[$0]=0 }  # Build lookup array of nesting comments

                # Set up an array of ANSI colour codes for additions, removals and changes.
                split(colors, colours, /:/)
                colours["+"]=colours[1] ; colours["-"]=colours[2] ; colours[">"]=colours[3] ; reset=colours[4]
                depth=0+0               # Current nesting level of comments; numeric
                last=depth              # Nesting level of last printed output

                # Initialize stack of nested comments
                comment[depth]="SPURIOUS"
                matched[comment[depth]]=0
        }
        function indent(n) {
                return substr("                                                                     ", 1, 4*n)
        }
        function debug(what, this        , i) {
                print what, this, "depth=" depth, "last=" last, "matched=" (this in matched)
                for(i=0; i<=depth; i++) print i, comment[i]
        }
        function dostart(this) {
                if(comment[depth] in matched) comment[++depth]=this
                else { comment[depth]=this ; if(last>=depth) last=depth-1 }
                # debug("Start", this)
        }
        function doend(this     , nest) {
                nest=1
                while( nest<depth && comment[nest]!=this) nest++
                if(comment[nest]==this) depth=nest-1
                if(depth<last) last=depth
                # debug("End", this)
        }
        function dosetting(type, item) {
                # if (last!=depth) debug("Stack", item)
                while(last<depth) { print " ", indent(last++), "#", comment[last] }
                print type, indent(depth) colours[type], item, reset
        }
        function dochange(o, n          , old, new) {
                split(o, old,  /=/)
                split(n, new,  /=/)
                if(old[1]==new[1])  dosetting(">", old[1] "=" old[2] "--->" new[2])
                else {
                        dosetting("-", o)
                        dosetting("+", n)
                }
        }

        { gsub( /[[:space:]]*$/ , "", $2) }     # Trim trailing space from first field

        1==NR && /Kernel Configuration/ { print $2, "--->", $3 ; next }         # Handle the header line

        # Comments
        $2~/^# end of/  { doend(substr($2, 10)) ; next }
        $2~/^#/         { dostart(substr($2, 3)) ; next }

        # Settings
        $1=="-"         { dosetting("-", $2) ; next }
        $1=="+"         { dosetting("+", $2) ; next }
        $1=="|"         { dochange($2, $3) ; next }

        # Cruft
        { print "Oops", $0 > "/dev/stderr" }'
}

### Shell functions

# Create a tempfile, using /run ramdisk if possible
Tempfile() {
        local id dir
        id="$(id -u)"

        if      [ "$id" = "0" ]
        then
                dir="${XDG_RUNTIME_DIR:-/run}"
                [ -d "$dir" ] || dir=""
                mktemp -p "$dir" "tmp.$ME.XXXXXXXXXX"
        else    mktemp -p "${XDG_RUNTIME_DIR}" "tmp.$ME.XXXXXXXXXX"
        fi
}

# Print message to stderr and exit 1
Die() {
        local template
        template="$1" ; shift
        printf "$CHG$template\n" "$@" >&2
        exit 1
}

### Mainline code

# Handle parameters - flags ask, pretend and verbose will either be null or set to themselves, so "if [ $flag ]" works
while getopts '?hw:mc' f
do
        case "$f" in
                c)      colour="always" ;;
                m)      ignoremodules="true" ;;
                w)      width="$OPTARG" ;;
                *)      doHelp ; exit ;;
        esac
done
shift $(( OPTIND - 1 ))

# Set coloured output if necessary
if [ -t 1 ] || [ "$colour" = "always" ]
then
        ADD="\033[32m"          # Green
        REM="\033[34m"          # Blue
        CHG="\033[33m"          # Yellow/brown
        NIL="\033[0m"           # Back to white
fi

[ "2" = "$#" ] || Die "Must be exactly two arguments."
[ -r "$1" ] || Die "File 1 - $1 - must be readable."
[ -r "$2" ] || Die "File 2 - $2 - must be readable."
case "$width" in
        *[!0-9]*)       Die "Width (-w) must be numeric." ;;
esac

cfgFile1=$(Tempfile)
cfgFile2=$(Tempfile)
splitFile=$(Tempfile)
endsFile=$(Tempfile)

strip < "$1" > "$cfgFile1"
strip < "$2" > "$cfgFile2"

w="${width:=80}"
w=$(( w + w +3 ))

diff --expand-tabs --minimal --side-by-side --width="$w" "$cfgFile1" "$cfgFile2" \
        | split > "$splitFile"

ended < "$splitFile" >"$endsFile"       # Build list of "# end of ..." comments
reduce < "$splitFile"

rm "$cfgFile1" "$cfgFile2" "$splitFile" "$endsFile"
Last edited by Goverp on Tue May 02, 2023 3:59 pm, edited 3 times in total.
Greybeard
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Apr 24, 2023 2:03 pm

I would love it ...

Code: Select all

 ~ # LC_MESSAGES=C ./cfcfg -c /home/peter/Check/config-orig /usr/src/linux/.config
./cfcfg: line 207: warning: here-document at line 14 delimited by end-of-file (wanted `endhelp')
./cfcfg: line 208: syntax error: unexpected end of file
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Mon Apr 24, 2023 4:25 pm

pietinger wrote:...

Code: Select all

 ~ # LC_MESSAGES=C ./cfcfg -c /home/peter/Check/config-orig /usr/src/linux/.config
./cfcfg: line 207: warning: here-document at line 14 delimited by end-of-file (wanted `endhelp')
./cfcfg: line 208: syntax error: unexpected end of file
I was about to ask which shell you are running, when I think I diagnosed the problem.
I use tabs to indent, and the start of the help text is

Code: Select all

cat <<- endhelp
which strips leading tabs, including on the "endhelp" line, so that "endhelp" effectively appears in column 1. But I suspect the cut-and-paste to put the program in the forum changed the tabs to spaces.
Cure is to remove the leading spaces on the endhelp line. I'll hack it in the original post.
Greybeard
Top
Hu
Administrator
Administrator
Posts: 24392
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Apr 24, 2023 4:54 pm

The forum is known to mangle tabs like that, which tends to break GNU patch files too. As a workaround, the reader can choose to quote your post, then copy the program from the quoted post textbox, instead of copying from the thread reading view. The version in the textbox used for composing the reply has its tabs intact. The reply can be discarded without posting it, to avoid cluttering the thread.
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Mon Apr 24, 2023 5:46 pm

Goverp wrote:[...] I'll hack it in the original post.
Thank you very much ! :D Works like a charm.

@Hu

First of all: Thanks a lot for this information and confirmation of @Goverp's supposition. I didnt knew that ... and I think ... many others dont know that either; so, the hack is IMHO the best solution (everyone can copy from the first post).
Top
Hu
Administrator
Administrator
Posts: 24392
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Apr 24, 2023 6:28 pm

Yes, if the OP is available to edit it (or if a moderator is willing and able to adjust it), removing tabs can make things easier, when that does not break the blob. For GNU patch files, removing tabs likely breaks the patch file anyway, so the blob must be used as provided.

The quote-based approach is useful if you find a post where someone used tabs, the tabs are important, and you cannot or will not wait for them to fix it (whether because you want to try the thing immediately or because you expect that the poster might be away for weeks).
Top
grknight
Retired Dev
Retired Dev
Posts: 2563
Joined: Fri Feb 20, 2015 9:36 pm

  • Quote

Post by grknight » Wed Apr 26, 2023 1:30 pm

FWIW, a simple tool is also available, without color or indentation, included with every kernel sources.

/usr/src/linux/scripts/diffconfig is also good for basic comparison. It defaults to comparing .config.old to .config but can be fed any 2 files.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Wed Apr 26, 2023 6:35 pm

grknight wrote:FWIW, a simple tool is also available, without color or indentation, included with every kernel sources.

/usr/src/linux/scripts/diffconfig is also good for basic comparison. It defaults to comparing .config.old to .config but can be fed any 2 files.
Indeed, though I'd question "simple", as it does a similar amount of processing, but in python instead of awk.
It's main deficit, IMHO, is that it reorders the statements (which is why I wrote mine), but it is even more succinct.
Greybeard
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Thu Apr 27, 2023 10:15 am

Goverp,
Nice :wink:

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Thu Apr 27, 2023 10:19 am

Code: Select all

Tempfile() {
for consistency maybe?
Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

Re: Shell script for pretty kernel config comparison

  • Quote

Post by mv » Thu Apr 27, 2023 6:47 pm

Goverp wrote:

Code: Select all

	printf "$template\n" "$@" >2&
In a POSIX shell like dash, this redirects to the file 2 and executes the line in the background.
What you want is probably

Code: Select all

	printf "$template\n" "$@" >&2
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sat Apr 29, 2023 4:30 pm

I did not investigate deeply, but the script showed me for the change of my default configuration with nconfig from 6.2 to 6.3 less than 10 changes while e.g. kccmp showed me more than 30.

I remember that I had a similar issue with the script from the kernel subdirectory, but there I could add some options and change the order of config files to see the remaining ones.
So unfortunately, it seems that I will stick with kccmp, although I would be happy about a cli replacment.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

Re: Shell script for pretty kernel config comparison

  • Quote

Post by Goverp » Sat Apr 29, 2023 5:12 pm

mv wrote:...
What you want is probably

Code: Select all

	printf "$template\n" "$@" >&2
Thanks, corrected!
Greybeard
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sat Apr 29, 2023 5:14 pm

mv wrote:I did not investigate deeply, but the script showed me for the change of my default configuration with nconfig from 6.2 to 6.3 less than 10 changes while e.g. kccmp showed me more than 30.
...
Interesting. Could you post or PM me the above examples so I can see why there's a difference.
The ebuild in your link points to a domain name that's up for sale :-(
Greybeard
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Sat Apr 29, 2023 6:59 pm

Goverp wrote:The ebuild in your link points to a domain name that's up for sale :-(
Thanks. Fixed.

Here is a minimal example
6.2.config wrote:# Automatically generated file; DO NOT EDIT.
#
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_SND_X86 is not set

#
# HID support
#
CONFIG_HID=m
CONFIG_HID_BATTERY_STRENGTH=y
# CONFIG_HIDRAW is not set
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=m
6.3.config wrote:# Automatically generated file; DO NOT EDIT.
#
CONFIG_THREAD_INFO_IN_TASK=y

#
# General setup
#
CONFIG_INIT_ENV_ARG_LIMIT=32
# CONFIG_SND_X86 is not set
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
CONFIG_HID_BATTERY_STRENGTH=y
# CONFIG_HIDRAW is not set
# CONFIG_UHID is not set
CONFIG_HID_GENERIC=m
Probably, the problem is that two sections were merged in kernel 6.3. Surprisingly cfcfg not only misses the new CONFIG_HID_SUPPORT=y but also reports a non-change for CONFIG_THREAD_INFO_IN_TASK=y.
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sun Apr 30, 2023 2:35 pm

mv, thanks.

I think I know the problem - my code isn't handling the case where a comment exists in only one of the two files and gets paired up with a spare CONFIG item - in that case it ignores whatever gets matched. diff is probably matching a spurious change with the comment to the CONFIG_HID_SUPPORT=y. I'll have to handle the comments a bit more carefully.
Greybeard
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Tue May 02, 2023 4:08 pm

I've improved the code, and updated the first post with the latest version. Enjoy.
It fixes brackets for Cap'n Blood, and I hope mv's problems, at the cost of another temp file - it ought to be possible to avoid that with a smarter call to "diff", but that's too complex for me... It also has all tabs expanded to spaces, so cut and paste should now work on the source.
mv's test case now produces (having removed the spurious blank at the end of the last line of 6.3.config)

Code: Select all

   # HID support
+      HID_SUPPORT=y 
It also fixes the mess I'd made of choosing the comment hierarchy printed. It's not perfect, but now that just reflects the limitations of the config file contents.
With a dummy "# end of General setup" comment at the end of the 6.2 and 6.3 configs, you get

Code: Select all

   # General setup
       # HID support
+          HID_SUPPORT=y
Greybeard
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Wed May 03, 2023 7:41 pm

Goverp, thanks a lot for your nice script!
Top
pietinger
Administrator
Administrator
Posts: 6621
Joined: Tue Oct 17, 2006 5:11 pm
Location: Bavaria

  • Quote

Post by pietinger » Wed May 03, 2023 9:24 pm

mv wrote:Goverp, thanks a lot for your nice script!
++

Again, thank you very much Goverp ... I am using it excessive ! :D


(and I linked to this thread from my wiki article ;-) )
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Thu May 04, 2023 4:45 am

Just for the records: kccmp still shows a lot more differences. Unless I missed something, these are all *unset* options which exist only in one of the two config files, that is, comment lines of the form

Code: Select all

# CONFIG_.... is not set
It would be nice if these lines could be treated like variable assignments (possibly optional). Of course, up to you (I can modify the script myself if needed).

BTW, what do you think about uploading your script to github so that one can easily (and publicly) easily suggest patches like this (and has no problem with tabs with downloading); in fact, one could then even have an ebuild for it. (As the script is GPL3+ I guess that I can theoretically upload it into my github account even without asking, but I would do this only if you explicitly agree and do not want to do it by yourself.)
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Thu May 04, 2023 7:15 am

mv wrote:Just for the records: kccmp still shows a lot more differences. Unless I missed something, these are all *unset* options which exist only in one of the two config files, that is, comment lines of the form

Code: Select all

# CONFIG_.... is not set
It would be nice if these lines could be treated like variable assignments (possibly optional). Of course, up to you (I can modify the script myself if needed).

BTW, what do you think about uploading your script to github so that one can easily (and publicly) easily suggest patches like this (and has no problem with tabs with downloading); in fact, one could then even have an ebuild for it. (As the script is GPL3+ I guess that I can theoretically upload it into my github account even without asking, but I would do this only if you explicitly agree and do not want to do it by yourself.)
mv, pietinger, thanks for the interest.

The behaviour to exclude unsets is deliberate. I guess it would be easy to add them in. Certainly in the world of modules, they're new modules not being built, and printing that out would be about as annoying as "make oldconfig" asking if you want something with default No :-).

As for putting it on github or gitlab, I've a couple of items on sourceforge; I could put it there, or start a gitlab account. The trouble then is I'd probably want to fix the way it uses diff, and then there's building a dictionary of prompts so you could restrict the output further to visible settings (with prompts) rather than the hidden ones used to make "make" work. There's a big python script somewhere to scan Kconfig files, though I suspect a mix of rg (or grep with bells on) and more awk could build the dictionary. The real issue is that's it's hacky, whatever we do; the comments in the .config file aren't an API, so it might break at any moment, but they're the big feature! Hmmm...

I'll ponder this over the weekend, while seeing if I can do something about the diff. I'll also see if I can find a Kconfig maintainer to ask about the comments' status (and point out the glaring errors at the moment!).
Greybeard
Top
Goverp
Advocate
Advocate
User avatar
Posts: 2402
Joined: Wed Mar 07, 2007 6:41 pm

  • Quote

Post by Goverp » Sun May 07, 2023 6:45 pm

OK, there's now a project on sourceforge.
It has a new "-u" option to retain unset items.
Greybeard
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Sun May 07, 2023 8:59 pm

Nice, :D

Any advice where to put cfcfg.1.man? (sorry, noob here)

EDIT:
Because cfcfg is located in /usr/local/share/bin here, I did;

Code: Select all

cp <source directory>/cfcfg.1.man /usr/local/share/man/man1/cfcfg.1
chown root:root /usr/local/share/man/man1/cfcfg.1
mandb #may be unrequired...
Thks 4 ur attention, interest & support
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
mv
Watchman
Watchman
User avatar
Posts: 6795
Joined: Wed Apr 20, 2005 12:12 pm

  • Quote

Post by mv » Tue May 09, 2023 4:47 pm

Goverp wrote:OK, there's now a project on sourceforge.
It has a new "-u" option to retain unset items.
That's great, thanks a lot.
There is now an ebuild in the mv overlay.
Top
CaptainBlood
Advocate
Advocate
User avatar
Posts: 4237
Joined: Sun Jan 24, 2010 9:38 am

  • Quote

Post by CaptainBlood » Tue May 09, 2023 5:21 pm

@mv, Neat.

Thks 4 ur attention, interest & support.
USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Top
Post Reply

31 posts
  • 1
  • 2
  • Next

Return to “Documentation, Tips & Tricks”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic