Commit Graph

25 Commits

Author SHA1 Message Date
Shreenidhi Shedi bd7fcc6d32 print improvements
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>
2020-12-18 13:21:08 +05:30
Oliver Kurth ab8fe128ba use excludes for all alter commands, not just update 2020-12-09 14:17:43 -08:00
Siddharth Chandrasekaran 896f6b269a Hoist call to TDNFPkgsToExclude() in TDNFGoal()
TDNFGoal() calls TDNFPkgsToExclude() in two places. One of these calls
is from within a loop that calls TDNFAddGoal(). Hoisting this call to
TDNFPkgsToExclude() and passing the ouptput to TDNFAddGoal() prevents
needless calls at each loop iteration.

Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-09-15 17:14:31 +05:30
Siddharth Chandrasekaran 1d14714333 Allow alter type ALTER_UPGRADE to call SolvAddExcludes()
TDNFPrepareAllPackages() forces nAlterType to ALTER_UPGRADE for both
ALTER_UPGRADE and ALTER_UPGRADEALL when --security is passed.
Subsequently, when TDNFGoal() is called, the excludes are skipped from the
job queue in TDNFAddGoal() but are not marked in solver map as excludes
with a call to SolvAddExcludes() as it's gating condition only check for
nAlterType == ALTER_UPGRADEALL.

Fix this by allowing nAlterType == ALTER_UPGRADE to also call
SolvAddExcludes().

Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-09-11 18:11:58 +05:30
Siddharth Chandrasekaran 790ac5d649 Remove unused Queue object
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2020-09-11 18:11:58 +05:30
Shreenidhi Shedi 5f4b96d5eb Add an extra check to check the providers
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>
2020-04-07 19:42:01 +05:30
Shreenidhi Shedi 390a829234 Handle already installed packages faster.
Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-03-02 22:24:51 +05:30
Ankit Jain 88c68bd4d5 tdnf: Added options skipconflicts, skipobsoletes to check command
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
2019-03-13 21:07:38 +05:30
Keerthana K df71acf4e2 Add security and security severity support
--security option is used to filter out the packages which have
the updates of security type.

--sec-severity option is used to filter out the packages which
has the update of type security and has a CVSS score greater than
the value mentioned in the opion value.

Change-Id: Ic83dd6fdb39d9037d303c69622de57a17c5751d8
2018-11-08 16:10:04 -07:00
Keerthana K 1ebd476ab6 Add exclude support
Change-Id: I9ea27eecdacba3dc93dca9fff9a7e12eb74b0f64
2018-10-10 05:25:39 +00:00
Priyesh Padmavilasom eecc0b6c4f add check implementation
Change-Id: Ib518a34dc979325ebc95add80764300c23e2956e
2018-01-09 19:24:02 +00:00
Priyesh Padmavilasom 15abaf339c Fix issues with libsolv merge
Change-Id: I51e1b5c7abc21c120bc294bf365a40c1e17c7c95
2018-01-08 15:38:03 -08:00
xiaolin-vmware 811e61fed9 merge uselibsolv branch.
Change-Id: I3e7e66d257897ade8319c562b9c9228a7c53af3b
2017-05-15 17:32:45 -07:00
ppadmavilasom 71a75d5ccc fix bug in upgrade and downgrade by version
Change-Id: I0c7c442e72bf5eec7e6cf28c2b09797c90929bac
2016-04-28 15:13:38 -07:00
Priyesh Padmavilasom ecb49ed5ea fix code scan reported errors - dead code, unreachable code, unnecessary free etc 2016-03-31 01:10:31 +00:00
Priyesh Padmavilasom be1dddab7a Add wrap check in alloc routine 2016-01-03 15:55:37 -05:00
Priyesh Padmavilasom 04bbbc1b76 cleanup multi package handling 2015-11-08 22:52:04 -05:00
Priyesh Padmavilasom 89d71e8e41 support multiple packages 2015-11-06 05:42:02 +00:00
Priyesh Padmavilasom 9a0d09f69b Handle obsoleted packages 2015-10-26 12:59:28 -04:00
Priyesh Padmavilasom 25c5269b05 ensure latest packages on install 2015-10-02 11:57:07 -04:00
Priyesh Padmavilasom dea86ee4a2 fix upgrade, add distro-sync 2015-10-01 13:18:08 -04:00
Priyesh Padmavilasom a66e9fd23e write debug/verbose to stdout instead of stderr 2015-09-08 13:06:00 -04:00
Priyesh Padmavilasom ef0725b01c Update license info 2015-04-15 17:10:08 -04:00
Priyesh Padmavilasom 73ac20ecfd fix gpg check code, move static function defs out from source files, address naming conventions in rpmtrans internal structures 2015-04-02 20:23:08 -04:00
ppadmavilasom 6732366551 initial commit 2015-04-01 18:59:27 -07:00