Pamac CLI

pamac

#102

The question is, is AUR support enabled? If not, at least we should give an output about that fact.


#103

Does the cli care about AUR support being enabled? If you explicitly tell it to upgrade AUR packages it will do so regardless of the setting(At least, it did so for me). That seems to make sense.

If the setting is set does it upgrade them either way?


#104

No pamac cli doesn’t check AUR enabled variable in pamac.conf, it only checks if you use --aur option.


#105

Thanks for your reply! No, without sudo I get no output from pamac update or pamac update --aur --force-refresh at all. It exits pretty quickly, so it is definitely not refreshing, for example.

pamac checkupdates --aur seems to give the correct output, it shows an available update to an AUR package.


#106

So it should be an polkit authentication issue. Try to run pkttyagent & before running pamac update.


#107

Thanks. No change at all though.

Okay, after reading up on polkit I should mention the following:
I’m running the commands in an SSH session. I now tried in an Xfce terminal and it worked fine.

Any way to get it running in an SSH session? Thanks!


#108

Sounds like Linux is putting the cart before the horse with polkit. Switching everything to polkit when it’s not quire ready for prime time yet.


#109

Applications that do not run under a desktop environment (for example, if launched from a ssh(1) login) may not have have an authentication agent associated with them. Such applications may use the PolkitAgentTextListener type or the pkttyagent(1) helper so the user can authenticate using a textual interface.


#110

Maybe it’s just a polkit policy config issue. I just pushed a commit on gitlab. Can you build pamac with this commit and try again with ssh ?


#111

I built pamac from source with meson and ninja, then went into the src directory and ran ./pamac update --aur --force-refresh --enable-downgrade. The end result is the same, a quick exit with no output.
If what I did is not enough to test, please tell me how I can install my own build but then revert to the repository version afterwards?

Thanks again for your help and trying to find the problem!


#112

Yes you need to install it with sudo ninja install after building and to be sure, if possible, a reboot.
To revert back just reinstall pamac from repos.


#113

You can also install v6.5.0-1 which includes this:

sudo pacman -U https://manjaro.moson.eu/pool/overlay/pamac-6.5.0-1-x86_64.pkg.tar.xz

#114

Thanks, I did it this way!


#115

Your change in the polkit policy config did it, it works fine for me now in the SSH session. Thank you very much!


#116

@mko: Great to known it works !
@philm: remember you can also install a remote package with pamac:
pamac install <url> :wink:


#117

I know, but I’m old-school :stuck_out_tongue:


#118

for “old-school”, you can write your script with your pacman syntax

#!/usr/bin/env bash
# pamac -Q
colorb="\033[34m" # blue
colorg="\033[32m" # green
colore="\033[0m"

[[ "${1:0:2}" != "-Q" ]] && exit

IFS='{'  datas=($(dbus-send --print-reply --dest=org.manjaro.pamac.user /org/manjaro/pamac/user org.manjaro.pamac.user.GetInstalledPkgs))
echo "my $((${#datas[@]} - 1)) packages: "
for pkg in ${datas[@]}; do
    IFS=$'"' pkg=($pkg)
    [ -n "${pkg[1]}" ] && printf "${colorge}%s${colore} ${colorg}%s${colore} \t${colorb}%s${colore}\n" "${pkg[1]}" "${pkg[7]}" "${pkg[9]}"
done

# list pamac service
# qdbus org.manjaro.pamac.user /org/manjaro/pamac/user

#119

Is that the correct Manjaro green? :wink: :slight_smile: :rofl:

Sorry, OT :wink:


#120

about

==== AUTHENTICATING FOR org.manjaro.pamac.commit ====

I think it does not need so much emphasis to auth notice, red and all capitials somehow terrible. Full name for org.manjaro.pamac.commit seems confusing and misleading.

IMO as other cmd tools which need auth, use an usual prompt with note would be fine.


#121

its the official prompt for polkit authorization in tty : its polkit not pamac

for test, one exemple : open tty2 and type pkexec gparted
acapture_0817_181857