This option adds extra packages listed in the specified file to build.
For now, osc does not support automatic buildrequires.
When a package has automatic buildrequires, osc just
returns error code 9 that is returned by build,
but build leaves a list of missing dependencies in
".build.packages/OTHER/_generated_buildreqs" file inside build root.
These extra packages can be added using "--extra-pkgs" ("-x") option,
but this is very inconvenient if there are many of them.
Allowing to add extra dependencies listed in a file makes building
packages with automatic buildrequires much more convenient:
just do a first stage build, resulting in a file with list of
extra dependencies, and then add extra packages from this file
using "--extra-pkgs-from" ("-X") option that is added by this change.
Signed-off-by: Oleg Girko <ol@infoserver.lv>
dot (".") is already used as magic "current project/package" in
other commands like "ls" for example, but in the most useful ones
like copypac and rdelete it was missing. this adds a function that
does the dot expansion and adds it to the respective command expansions.
This causes downloads to come from the api, generally on noarch packages.
However, in countries like australia, due to OBS' high latency, and poor
bandwidth, these faults can cause downloads to take more than an hour, compared
to using a local mirror which can take minutes. There is actually nothing
wrong with the packages it all, OBS just sends the wrong md5.
As a result, ignore the problem and complain about it, because OBS is broken
here, not osc, and this wastes a lot of time.
If a plugin uses an argument that conflicts with osc's global args,
osc fails with argparse.ArgumentError.
The exception is now caught and reported as a warning,
while the conflicting argument is skipped.
The original findpacs() was returning either [Package]
or ([Package], [str]) depending on the `fatal` option.
This confused pylint and it was returning false-positives:
E1101: Instance of 'list' has no '...' member (no-member)
A list of strings is expected, but a string was passed.
It was working only by coincidence, because iterating
through ["."] and "." gives the same result.