Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 835734 - dev-util/pkgdev-0.1.9: please add a very useful utility
Summary: dev-util/pkgdev-0.1.9: please add a very useful utility
Status: RESOLVED NEEDINFO
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement
Assignee: Arthur Zamarin
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-21 11:52 UTC by Andrey Grozin
Modified: 2022-06-13 20:09 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Grozin gentoo-dev 2022-03-21 11:52:23 UTC
When I do something in my local copy of the tree and then

pkgdev push

quite often I get the error message that somebody has pushed something to the tree before me. Then I go to https://wiki.gentoo.org/wiki/Gentoo_git_workflow, copy and execute

git pull --rebase=merges -S"$(git config --get user.signingkey)" origin master

I am absolutely unable to remember all details of this long command correctly. If there were a command

pkgdev something

with the same effect (you can call it whatever you like), it would be *much* more convenient. And there would no longer be reasons to go to https://wiki.gentoo.org/wiki/Gentoo_git_workflow :-)
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-21 15:43:52 UTC
This sounds a bit like your git repo could be configured better, actually...?

As per the wiki link, set:
git config --local user.signingkey 0xLONG-GPG-KEY
git config --local commit.gpgsign 1
git config --local push.gpgsign 1

... and also set:
git config --local pull.rebase true
git config --local --unset pull.ff

... and you should just be able to do 'git pull && pkgdev push'?
Comment 2 Arthur Zamarin archtester Gentoo Infrastructure gentoo-dev Security 2022-06-12 18:56:34 UTC
Also FYI, you can use `git config --local alias.<name> "<cmd>"` to add aliases to your repo for hard commands, which you can then call using `git <name>` which is very nice.

I have for example `git sync` which does similar things using:

git config --local alias.sync "rebase --exec 'git commit --amend --no-edit -n -S -s' -i upstream/master"
Comment 3 Andrey Grozin gentoo-dev 2022-06-13 04:59:56 UTC
Yes thanks, the comment 1 (or 2, with alias) solve my problem. But they are not in the documentation. This information should then be added to https://wiki.gentoo.org/wiki/Gentoo_git_workflow.
Comment 4 Pacho Ramos gentoo-dev 2022-06-13 19:59:26 UTC
Hi Andrey,

I think the info is in:
https://wiki.gentoo.org/wiki/Gentoo_git_workflow#Configuration

and
https://wiki.gentoo.org/wiki/Gentoo_git_workflow#GPG_Configuration

Even if I also ended up here as I was hitting the same issue and relied on comment #1, that simply makes all the important configuration commands together.

Maybe the wiki page would benefit from a section simply listing the commands to get the recommended configuration, even if still explaining in the following sections the details :/
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-13 20:04:14 UTC
You guys know anyone can edit the wiki, right? ;)

But I'll shove in a TL;DR, then you guys can edit if I missed something.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-13 20:05:13 UTC Comment hidden (obsolete)
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-06-13 20:05:23 UTC
(In reply to Sam James from comment #5)
> You guys know anyone can edit the wiki, right? ;)
> 
> But I'll shove in a TL;DR, then you guys can edit if I missed something.

https://wiki.gentoo.org/wiki/Gentoo_git_workflow#Summary
Comment 8 Pacho Ramos gentoo-dev 2022-06-13 20:09:31 UTC
(In reply to Sam James from comment #7)
> (In reply to Sam James from comment #5)
> > You guys know anyone can edit the wiki, right? ;)
> > 
> > But I'll shove in a TL;DR, then you guys can edit if I missed something.
> 
> https://wiki.gentoo.org/wiki/Gentoo_git_workflow#Summary

Oh yeah, sorry, I thought that page was under a Project

Current summary looks fine to me

Thanks a lot!