tito icon indicating copy to clipboard operation
tito copied to clipboard

Additional arguments to build, like specfile, ignored

Open ringerc opened this issue 11 years ago • 2 comments
trafficstars

tito ignores extra args to build. As the docs suggest that nested trees of specfiles are allowed, one might reasonably expect that

cd tito-topdir
tito build rpm/mypackage.spec

would work, but it produces:

pgpackaging$ tito build  rpm/postgresql-9.4.spec

ERROR: Unable to locate a .spec file in /path/to/pgpackaging

It looks like tito doesn't use argparse; maybe it's worth looking into. (If tito proves viable to do what I'm trying to do I'll see if I can make these kinds of changes, but right now it's looking like it won't work out).

A hint like "tito expects to find a spec file in the current working directory; cd to the spec file location" might help.

ringerc avatar Jul 30 '14 04:07 ringerc

tito uses optparse. There is no CLI argument for pointing to a specific specfile currently. That may be possible but we'd have to work through the implications for things like building old tags when the specfile was at another location, etc. Probably possible.

dgoodwin avatar Jul 30 '14 14:07 dgoodwin

I had a quick look at how to detect excess args but a change in what seemed like the logical place, the UpstreamBuilder ctor, seemed to have no effect. It might be an issue for subclasses anyway.

The above-referenced commit adds an informational message to help a little.

ringerc avatar Jul 31 '14 07:07 ringerc