Pacdiff -s Bug, after changing from Kernel 6.1 to 6.6

In the last stable update there was 2x pacnew files, i merged on my PC/Laptop right after the update 1 file and then i switched on both system from Kernel 6.1 to 6.6… 1 week later, i just wanted to merge the other pacnew file with pacdiff -s but when i press m for Merge there is only a message in Terminal: -> Unable to find a base package.

v for view is working on both system and Meld is showing up.
q for quit and s for skip is working too.

pacdiff doesn’t change when changing kernel.

pacdiff is part of pacman-contrib

It is not kernel related since i was on 6.6 since long time. There is some “bug” or probably misconfiguration with merging and meld since the last update. But i just edited my pacnew manually and didn’t bother to debug.

Yeah i reinstalled it after the stable release.

Well i also could still use V (for VIEW) and was still able to merge it with Meld… i just wanted to tell there is a bug, even its minor.

Maybe i have flawed memories? But i think i would know when Merge (M) Hotkey wasnt working in first place.

Besides Kernel Switch, i don’t think i changed anything else around my Manjaro, specially not on my Laptop. :man_shrugging:

If I recall correct pacdiff requires vi - so possibly you will need to use Esc to switch back to command mode.

If think this is a common mistake when using vi based tools - switching command mode back and forth.

There was actually some error message that pacdiff threw, but i do not remember anymore…i just had to change one line in ma passwd file so i did it manually with another text editor and did not bother anymore.
As i said, in my case i noticed it after last update. I think it worked without errors before, but the last pacnews before that were some months ago…

i tried to simulate it - either pacdiff is buggy or it does not work with my simulation

[teo@teo-lenovo-v15 ~]$ sudo updatedb
[teo@teo-lenovo-v15 ~]$ DIFFPROG=meld pacdiff -s -l
==> pacnew file found for /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] v
error: No package owns /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] m
error: No package owns /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] q
[teo@teo-lenovo-v15 ~]$ pacdiff -s -l
==> pacnew file found for /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] v
error: No package owns /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] m
error: No package owns /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] q
[teo@teo-lenovo-v15 ~]$ pacdiff -l
==> pacnew file found for /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] v
error: No package owns /home/teo/bla.conf
:: (V)iew, (M)erge, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/m/s/r/o/q] q
[teo@teo-lenovo-v15 ~]$ 

Because of this I moved to meld to merge new configuration files.

I made another test, this time for real with pacman.conf. The error about ownership is logically not there anymore. By hitting M i get the error about the base package. As far as i understand from topics in the arch forum, that seems to be connected with me clearing the pacman cache.

However, if i select V for view, Meld opens, i can make changes to the files and after saving and closing meld everything is fine (pacdiff sees the changes, asks for deletion, etc. as expected).

1 Like

Atleast im not alone. So there is something wrong with the pacman cache? Can this be fixed?

As i said already, its just a minor bug… V (View) and Edit/Merging still works. But when there is a solution, i would love to fix it.

Sry, I can’t follow you.
vi? command mode???

Some new feature since update of pacdiff a couple of months ago according to arch forum
, seems like it requires cached version of packets and i cleaned my cache after the update.

It does not start VI editor at all, that is the problem. Not the meld variable.

1 Like

Maybe my cache was cleaned also, but after the switch from 6.1 to 6.6 Kernel, thats why it was running first but then not…!? :face_with_monocle:

I just remember i was also using Bleachbit on both systems, a cache cleaning program. :scream: :innocent: :rofl:

First off,
I never use the ‘merge’ function.
heres a bit of it, related to your query.

base_cache_tar() {

        for cachedir in "${cachedirs[@]}"; do
                pushd "$cachedir" &>/dev/null || {
                        error "failed to chdir to '%s', skipping" "$cachedir"

                find "$PWD" -name "$package-[0-9]*.pkg.tar*" ! -name '*.sig' |
                        pacsort --files --reverse | sed -ne '2p'

                popd &>/dev/null || exit


merge_file() {

        package="$(pacman -Qoq "$file")" || return 1
        base_tar="$(base_cache_tar "$package")"

        if [[ -z $base_tar ]]; then
                msg2 "Unable to find a base package."
                return 1

        basename="$(basename "$file")"
        tempdir="$(mktemp -d --tmpdir "pacdiff-merge-$basename.XXX")"
        base="$(mktemp "$tempdir"/"$basename.base.XXX")"
        merged="$(mktemp "$tempdir"/"$basename.merged.XXX")"

        if ! bsdtar -xqOf "$base_tar" "${file#/}" >"$base"; then
                msg2 "Unable to extract the previous version of this file."
                return 1

        if $mergeprog "$file" "$base" "$pacfile" >"$merged"; then
                msg2 "Merged without conflicts."

        $diffprog "$file" "$merged"

        while :; do
                ask "Would you like to use the results of the merge? [y/n] "

                read -r c || return 1
                case $c in
                        y|Y) break ;;
                        n|N) return 1 ;;
                        *) msg2 "Invalid answer." ;;

        if ! $SUDO cp -v "$merged" "$file"; then
                warning "Unable to write merged file to %s. Merged file is preserved at %s" "$file" "$merged"
                return 1
        $SUDO rm -rv "$pacfile" "$tempdir"
        return 0

So yeah … anything between missing package or package cache could do it.

pacdiff is the utility for finding/parsing the pacnews. It is not an editor or diff manager.
I dont understand this statement.
I use meld too … as called by pacdiff.