#22 rmpdev-bumpspec: default to *.spec in the current directory
Closed: Invalid None Opened 10 years ago by pavlix.

As a fedora packager, I routinely use rpmdev-bumpspec in local git directories with '.spec' as the argument. I think it would be nice to default to a local .spec when no arguments are supplied.


This is a patch I'm currently using.
glob.patch

I'm afraid I don't like this as the behavior would be inconsistent with how various command line utilities behave in general. It would also raise questions like why it doesn't bump all *.spec recursively but only in the current dir. And with this change, forgetting to specify arguments could do unexpected things.

for example fedpkg tools operate on dist-git directories. Maybe we could have some compromise and rpmdevtools could detect whether the current direcotry is dist-git before doing so. It's more about convenience than anything else, though.

Nah, I think that's overkill, potentially confusing, and specific to Fedora git setup, not something I want to see in rpmdevtools.

If you want this feature I suggest either adding a shell alias for it, or asking for a "fedpkg bumpspec". Quite seriously I don't see the trouble of just writing "rpmdev-bumpspec *spec" if that's what you want... but having said that I just tuned the bumpspec bash completion so that it excludes some VCS dirs by default so in a dist-git package dir all it takes now is rpmde<TAB>b<TAB><TAB>, see [f14c388]

Works great! I should have presented the use case first. Just installed the git master (with the mentioned commit) and the only minor glitch is that multiple <tab>s and the pkgname.spec file multiple times but I don't know whether it's easy to fix. Thanks!

That's kind of a generic problem with almost all bash completions. Turns out most cases are fairly easy to fix, done for rpmdevtools in [3ddca83] and I'll look into doing it in bash-completion proper sometime.

Login to comment on this ticket.

Metadata