Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

config: per-repo configuration support #92

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

arthurzam
Copy link
Member

Resolves: #89

@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 94.90% // Head: 95.02% // Increases project coverage by +0.12% 🎉

Coverage data is based on head (77db324) compared to base (a096c08).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
+ Coverage   94.90%   95.02%   +0.12%     
==========================================
  Files          13       13              
  Lines        1178     1187       +9     
  Branches      298      299       +1     
==========================================
+ Hits         1118     1128      +10     
  Misses         34       34              
+ Partials       26       25       -1     
Impacted Files Coverage Δ
src/pkgdev/cli.py 100.00% <100.00%> (ø)
src/pkgdev/scripts/pkgdev_manifest.py 100.00% <100.00%> (ø)
src/pkgdev/scripts/argparsers.py 90.00% <0.00%> (-6.67%) ⬇️
src/pkgdev/scripts/pkgdev_showkw.py 83.76% <0.00%> (+1.94%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@arthurzam
Copy link
Member Author

@gyakovlev Could I request you to verify this patch if it works for you?

@gyakovlev
Copy link

seems to be working.

funny, I'm on another system and [DEFAULT] no longer works here at all (neither does [gentoo] without patch), but with the patch [gentoo] works =)
this system is a bit special because it explicitly defines some XDG_ variables (i was trying to cleanup some dotfile cruft from ~), so maybe it's related?

@gyakovlev
Copy link

env | grep XDG
XDG_CONFIG_DIRS=/etc/xdg
XDG_MENU_PREFIX=gnome-
XDG_DATA_HOME=/home/ya/.local/share
XDG_CONFIG_HOME=/home/ya/.config
XDG_SESSION_DESKTOP=gnome
XDG_SESSION_TYPE=wayland
XDG_CURRENT_DESKTOP=GNOME
XDG_CACHE_HOME=/home/ya/.cache
XDG_SESSION_CLASS=user
XDG_STATE_HOME=/home/ya/.local/state
XDG_RUNTIME_DIR=/run/user/1111
XDG_DATA_DIRS=/usr/local/share:/usr/share:/usr/share/gdm
cat ~/.config/environment.d/*
XDG_CONFIG_HOME="${XDG_CONFIG_HOME:-${HOME}/.config}"
XDG_CACHE_HOME="${XDG_CACHE_HOME:-${HOME}/.cache}"
XDG_DATA_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}"
XDG_STATE_HOME="${XDG_STATE_HOME:-${HOME}/.local/state}"
XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-/run/user/${UID}}"
#LESSHISTFILE="${XDG_DATA_HOME}/lesshst"

BOGOFILTER_DIR="${XDG_DATA_HOME}/bogofilter"
CARGO_HOME="${XDG_DATA_HOME}/cargo"
INPUTRC="${XDG_CONFIG_HOME}/inputrc"
NMBGIT="${XDG_CONFIG_HOME}/notmuch/nmbug"
NOTMUCH_CONFIG="${XDG_CONFIG_HOME}/mutt/notmuch-config"
PASSWORD_STORE_DIR="${XDG_DATA_HOME}/pass"
RUSTUP_HOME="${XDG_DATA_HOME}/rustup"
VIMINIT="set nocp | source ${XDG_CONFIG_HOME}/vim/vimrc"
WEECHAT_HOME="${XDG_CONFIG_HOME}/weechat"
WGETRC="${XDG_CONFIG_HOME}/wgetrc"
XAUTHORITY="${XDG_RUNTIME_DIR}/Xauthority"

@gyakovlev
Copy link

gyakovlev commented Sep 20, 2022

here's testcase with [DEFAULT] only

ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ cat ~/.config/pkgdev/pkgdev.conf 
[DEFAULT]
commit.scan = true
commit.ask = true
commit.signoff = true
push.ask = true
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git rm pk
pkgdev-0.2.1-r1.ebuild  pkgdev-0.2.1-r2.ebuild  pkgdev-0.2.1-r3.ebuild  pkgdev-9999.ebuild      
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git rm pkgdev-9999.ebuild 
rm 'dev-util/pkgdev/pkgdev-9999.ebuild'
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ pkgdev commit
[master 222886eba39a] dev-util/pkgdev: drop 9999
 1 file changed, 84 deletions(-)
 delete mode 100644 dev-util/pkgdev/pkgdev-9999.ebuild


ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git show HEAD | less

commit 222886eba39a68cf5a4da4712e8ffb13eaa97a65
Author: Georgy Yakovlev <gyakovlev@gentoo.org>
Date:   Mon Sep 19 23:17:52 2022 -0700

    dev-util/pkgdev: drop 9999

diff --git a/dev-util/pkgdev/pkgdev-9999.ebuild b/dev-util/pkgdev/pkgdev-9999.ebuild
deleted file mode 100644
index 5172a308d58..00000000000
--- a/dev-util/pkgdev/pkgdev-9999.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
-# Copyright 1999-2022 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
...snip...

@arthurzam
Copy link
Member Author

seems to be working.

funny, I'm on another system and [DEFAULT] no longer works here at all (neither does [gentoo] without patch), but with the patch [gentoo] works =) this system is a bit special because it explicitly defines some XDG_ variables (i was trying to cleanup some dotfile cruft from ~), so maybe it's related?

Does this commit helps?
9f60576

(I need to create a realese very soon - important fixes are in queue)

@gyakovlev
Copy link

testcase with [gentoo]

ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ cat ~/.config/pkgdev/pkgdev.conf 
[gentoo]
commit.scan = true
commit.ask = true
commit.signoff = true
push.ask = true
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git rm pk
pkgdev-0.2.1-r1.ebuild  pkgdev-0.2.1-r2.ebuild  pkgdev-0.2.1-r3.ebuild  pkgdev-9999.ebuild      
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git rm pkgdev-9999.ebuild 
rm 'dev-util/pkgdev/pkgdev-9999.ebuild'
ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ pkgdev commit
[master 330db433dc6a] dev-util/pkgdev: drop 9999
 1 file changed, 84 deletions(-)
 delete mode 100644 dev-util/pkgdev/pkgdev-9999.ebuild

ya@hydra ~/src/gentoo/gentoo/dev-util/pkgdev $ git show HEAD

commit 330db433dc6a02dba83195dd1fc9847fdf54a08b
Author: Georgy Yakovlev <gyakovlev@gentoo.org>
Date:   Mon Sep 19 23:21:08 2022 -0700

    dev-util/pkgdev: drop 9999

diff --git a/dev-util/pkgdev/pkgdev-9999.ebuild b/dev-util/pkgdev/pkgdev-9999.ebuild
deleted file mode 100644
index 5172a308d58..00000000000
--- a/dev-util/pkgdev/pkgdev-9999.ebuild
+++ /dev/null
@@ -1,84 +0,0 @@
....

now it does not work....

idk what's going on, but it also never asks me too.

@gyakovlev
Copy link

ok with this patch + 9f60576
everything now works

it actually started running pkgcheck, and sign-offs with both DEFAULT and [gentoo]

@gyakovlev
Copy link

also tested with ask options in [DEFAULT] and signoff option only in [gentoo]
works as intended.

Resolves: pkgcore#89
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
@arthurzam arthurzam merged commit 77db324 into pkgcore:main Sep 20, 2022
@arthurzam arthurzam deleted the cli-repos branch September 20, 2022 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

per-repo commit.signoff does not work
2 participants