repo->pszMetaLink can be null and PyBytes_FromString doesn't validate
null pointers which was resulting in a seg fault.
Other changes:
1. Added dist flag support to spec (which helps in reinstalling tdnf if
needed)
2. Fixed a typo in python/README.md
3. Added config file parameter support to tdnf-python
4. Added tests for tdnf-python
5. Changed test framework. Repo server now runs as a process, if run as
a thread it hangs while running tdnf-python tests.
6. Use fedora:latest image for testing
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Added a utilty function to print only if quiet not set
Also print errors irrespective of quiet option
If a non-exisitng package is provided for install/update let's show the
name of the invalid package in error message
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
tdnf used to report false positives on failure to get providers while
using 'tdnf check', the fix for that issue didn't take care of the issue
while achieving goal. This fixes the issue by reporting missing
providers while installing a package.
To put it in simple terms, if we are trying to install a package and a
provider is missing, it should be reported.
Added test scripts for the same.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Cleaned up redundant macros
Use <tdnf-common-includes.h> everywhere
Fixed few function prototypes
Added few missing validations
Use ARRAY_SIZE, UNUSED from a common header file
Added and rectified few test scripts
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
tdnf check currently has options to skip conflicts & obsoletes.
However it reports error on providers even though the required packages
are available. This will fix that issue by adding an extra check on
providers.
Added a test script for the same
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
tdnf clean all does not delete cache rpms. Fix to delete
the cached rpms if keepcache is not set.
Fixes https://github.com/vmware/photon/issues/832
Signed-off-by: Keerthana K <keerthanak@vmware.com>
- read conf file, read cmdline params.
- read plugins (default to 0. this means plugins are disabled by default)
- read pluginpath (default to /usr/lib/tdnf-plugins)
- read pluginconfpath (default to /etc/tdnf/pluginconf.d)
- add code to generate config.h
- config.h contains just package name and version
- cmake will generate config.h from config.h.in
- add version tests which was missing
Changes include:
1. Fix build warnings like unused parameters, sign mismatch while comparing.
2. Using printf instead of fprintf(stdout, ...).
3. Added header guard in few .h files.
4. Added a rule for silent build in configure.ac
5. Removal of trailing spaces, my vim does it automatically
6. Fixed few wrong date entries in spec files.
7. Removed unused function parameters in few places.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
Option Added to check command:
------------------------------
--skipconflicts: "tdnf check --skipconflicts" will hide the
conflict problems from the report and display it.
--skipobsoletes: "tdnf check --skipobsoletes" will hide the
obsoletes problems from the report and display it
If both options are given to check command, then it will display
the problems except conflicts and obsoletes problems
Additional Change:
-----------------
* replaced existing getopt_long call with getopt_long_only
Issue with getopt_long:
----------------------
** "tdnf check --sk" , it will parse --sk as --skipconflicts
*** --skip also it will parse as --skipconflicts as it occurs first in list
Fix with getopt_long_only:
-------------------------
** "tdnf check --skip" will give command error
*** --skipc will parse as --skipconflicts
*** --skipo will parse as --skipobsoletes
To differentiate between --skipconflicts and --skipobsoletes
replaced getopt_long with getopt_long_only
Testing:
-------
1) Added check.at under tests directory for "make check"
2) Executed TDNF tests to verify the changes
3) Executed PMD tests to verify the chnages
Change-Id: I8055d0ea3de6d46f80b7d6c8144f2637413ae917