Several platforms are using Python 3.5 or lower. Replace the new f"..."
style strings with the traditional "...".format() style strings.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Fixes#14
Instead of adding the entire URL to the upstream file, only add the
archive basename after the sha1.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
These tests regularly fail in Travis for unknown reasons. Skip them
until the tests can be rewritten.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Instead of calling each test target individually, call the unittest
target to run all available tests in the test directory.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This allows python3 unittest to properly generate the tests when running
all the tests in the tests directory.
Also adds a fix to test_test.py to reset buildpattern.default_pattern
every test. This was a bug introduced by running all tests at once -
this was not being cleared correctly.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Asciidoc being in the configure log should not cause it to be added to
the build requires automatically. This is also intended to enable
asciidoc to be removed from use entirely.
The lib submodule requiring the config submodule was an artifact of
how autospec used to work before the stateless implementation in Clear
Linux. config is now mostly used for systemd configuration and unit
files which do not need to be pulled in for library use cases. So to
avoid having lib pull in systemd units that need the bin submodule,
stop having lib require config.
Instead of throwing an exception when pycurl errors are encountered
(such as timeouts), gracefully handle the error and exit. This helps
calling processes understand the error it is seeing and either retry or
continue without interruption.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
when g-ir-scanner is required, gobject-introspection
will be added as build requirement.
gobject-introspection-dev is not pulled because we
require the binary and not source files in gobject-introspection.
Aditionally, gobject-introspection requires glibc-bin to use 'ldd'
(which is required by g-ir-scanner at some point).
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
initial support for meson builds, this pattern will be
used if 'meson.build' file is found in project to be
packaged.
Signed-off-by: Simental Magana, Marcos <marcos.simental.magana@intel.com>
Remove leading space character before queryformat command.
Remove newline, since repoquery seems to automatically
include them, and remove double quotes since they are
printed in the output.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
Due to pkg_scan being informational as opposed to functional,
do not run pkg_scan file if it would cause breakage.
If /var/lib/rpm does not exist, skip whatrequires execution.
Also, added try statements around both commands in pkg_scan
file. If they reach the except, return from the function and
continue with autospec as normal.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
Wrap tar -tf command in try-except to print meaningful error message and
exit when tarball is malformed. Error message includes tarball file type
to help with debug.
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
Some packages that are verified using their MD5 hash in the
pypi index (last resort option) will fail the split by regex
function and will return more than the two expected tockens,
with this change the regex will return at most two tokens.
The file contains packages that require capabilities of the
specified package using the repoquery --whatrequires command.
This includes the recursive option to query for all packages,
and the archlist=src to specify only SRPMS. To use the
repoquery command a yum.conf file is required; the location
of this is specified in the autospec.conf file. If a path
is not provided, the path is set to the common location of
the yum.conf file in clear.
This file is informational and can be used by other tooling
and package maintainers to identify which packages need to be
rebuilt when this package is updated. It can also be used to
track dependent packages and versions over time by inspecting
git history.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
Run time requirements are not assumed to be build time requirements.
If a package has the same build and run time requirement it must be
added to both buildreq_add and requires_add.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>
with the imlpementation of the write_out functionality,
some unittests need to be changed to use that fuction.
Signed-off-by: Gabi Beyer <gabrielle.n.beyer@intel.com>