In some situations it's useful to allow overriding the branch name determined from the git branch and make fedpkg behave like the old "make foo BRANCH=bar". It works now in "local", "prep" and "srpm" targets.
My usage includes testing a rawhide package on a released fedora or working on private branches where fedpkg throws a traceback now.
attachment 0001-allow-branch-override.patch
Looks like this patch could workaround the issue where only master branch exists (and no fX/master branches) and fedpkg throw a traceback for actions like srpm, prep, import (see https://bugzilla.redhat.com/show_bug.cgi?id=619979)
''branch'' and --branch may be a little unspecific words.
--branch
Could --target or something else be better?
--target
Target could be IMHO confused with build targets in koji, but I'm open to suggestions.
[ Just some more thoughts about this, not claiming to be the one and only absolute truth. ]
Right off the top of my head, I can think of the following uses of the word "target":
fedpkg
fedpkg build
dist-f14
As to the word "branch", we have
So which "branch" type is this patch dealing with? I would say it is short-circuiting the fedpkg remote branch detection logic with a more typing friendly version of "--remote-branch=f14/master".
However, isn't the remote branch only detected to determine which koji target to build for? So... wouldn't --koji-target=dist-f13 or a shorter version for convenience make more sense?''''''
--koji-target=dist-f13
Apparently, [cda6081ad56a792fd116ec2350653b3e0ede3ea9] fixes this (and calls the parameter --dist).
--dist
And I like --dist.
Ah yes, I went on a bit of a hackfest and fixed a number of things. I forgot this ticket was here.
I'm inclined to reopen this ticket, because --dist is a bit too smart. One cannot set arbitrary values, because it mocks around with the argument value:
Of course I can guess what's the reason behind this, but shouldn't it be possible freely set the %dist value?
Ah, sorry, I spoiled it by wrongly pasting the rawhide example, it should read: