lgogdownloader 3.8 has received a patch that enabled headless operations if there are existing, valid credentials detected. Please add the following script in the src_install phase: https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/68da7f9f5b1a549b655ec484875d294271f6ca6a/games-util/lgogdownloader/files/export_gog_to_portage as demonstrated in this verion of 3.7 ebuild: https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/68da7f9f5b1a549b655ec484875d294271f6ca6a/games-util/lgogdownloader/lgogdownloader-3.7-r1.ebuild This script produces a base64 representation of a tar.xz with GOG credentials. Putting the resulting string in /etc/portage/make.conf enables the gog eclass from src_prepare-overlay to install ebuilds that source the gamedata from GOG, as demonstrated in: https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/15af7b3d8f82f2527ff1cbc075caf058b5de35c3/games-rpg/fallout1/fallout1-1.1.ebuild https://gitlab.com/src_prepare/src_prepare-overlay/-/blob/bc00b0a0a7f8581cd20bf61d95522078ca3fe332/eclass/gog.eclass
Sorry for taking a while. I've had a think about this, and I'm not convinced it needs to be part of the lgogdownloader package. Why not package it separately? It doesn't matter that it's a tiny script. Hell, you could even just stick it in the files directory of the repo. That's what I do with esteam. I'd do the same if I were adding something like this to the main repo. I still want to be helpful though. Your script scared me a little so I've come up with something a lot simpler and safer: -------- #!/bin/bash set -euo pipefail TMPDIR=$(mktemp -d) trap 'rm -r "${TMPDIR}"' EXIT XDG_CONFIG_HOME=${TMPDIR} lgogdownloader --login echo "Your GOG_CONFIG:" >&2 XZ_OPT=-9 tar -C "${TMPDIR}" -Jc lgogdownloader/ | base64 -w0 echo -------- This doesn't include .config in the tarball, but if you set XDG_CONFIG_HOME in a similar manner in your eclass, then you won't need it. Hope this helps.