Commit Graph

94 Commits

Author SHA1 Message Date
Oliver Kurth bd2145735b check file from command line for rpm extension 2021-12-06 23:22:49 +00:00
Oliver Kurth 8e586f5810 replace path building with TDNFAllocateStringPrintf() with TDNFJoin() 2021-11-29 17:43:32 +00:00
Oliver Kurth 2d1229f910 add --repoid/--repo and --repofrompath options 2021-11-22 23:42:46 +00:00
Oliver Kurth ca54ffdc94 repoquery: various optimizations, fixes and
issues that came up in reviews.
2021-10-29 17:34:11 +00:00
Oliver Kurth 2307675fa1 repoquery: add changelogs and source options 2021-10-21 19:52:40 +00:00
Oliver Kurth b5950a843e repoquery: add --file option 2021-10-21 19:52:40 +00:00
Oliver Kurth c6d8bdbb6d repoquery: add --duplicates option 2021-10-21 19:52:40 +00:00
Oliver Kurth 2d827294a4 repoquery: add --extras option 2021-10-21 19:52:40 +00:00
Oliver Kurth d6394b165d repoquery: add --upgrades option 2021-10-21 19:52:39 +00:00
Oliver Kurth c1fe2a0779 repoquery: add --installed and --available 2021-10-21 19:52:39 +00:00
Oliver Kurth 5467a399de repoquery: add --list option 2021-10-21 19:52:39 +00:00
Oliver Kurth b2c7dbc5b4 repoquery: add --requires-pre option 2021-10-21 19:52:39 +00:00
Oliver Kurth 582d897197 repoquery: add dependency query options 2021-10-21 19:52:32 +00:00
Oliver Kurth b3be85a88f repoquery: add all repoquery --what* options 2021-10-21 19:39:13 +00:00
Oliver Kurth ca5523fb96 repoquery: skeleton and argument handling 2021-10-21 17:47:14 +00:00
Oliver Kurth 5f6fe1c648 add minversions config option 2021-10-06 17:20:38 +00:00
Nitesh Kumar 1c133c3b05 ITS issue fixed for tdnf. 2021-09-09 07:27:58 +00:00
Oliver Kurth 557ab3b2cf reposync: deal with '/' as root dir 2021-08-05 16:06:00 -07:00
Shreenidhi Shedi 1c804c665e tdnf-python: various fixes
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>
2021-08-02 07:30:56 +05:30
Oliver Kurth 4d61db48e8 unify TDNFList()/TDNFInfo() 2021-06-30 11:22:22 -07:00
Oliver Kurth 92c8c721b6
Merge pull request #243 from oliverkurth/topic/okurth/no-refresh-in-alter-command
Fix unnecessary meta data refresh when installing
2021-06-23 11:30:57 -07:00
Oliver Kurth 99399a595e do not call TDNFRefresh() in TDNFAlterCommand(), it was already called in TDNFResolv() 2021-06-22 13:18:45 -07:00
Oliver Kurth 1e7c50ffe0 don't fail if 'tdnf list <scope>' is empty unless it's a package spec, fixes issue #94 2021-06-21 14:21:25 -07:00
Oliver Kurth 9d2ab6090c read main config from installroot if it exists
cache dir relative to installroot, repo dir if it exists

add reposdir setopt
2021-06-17 13:24:23 -07:00
Oliver Kurth 2770ae91af reposync: improve error handling 2021-05-28 12:18:44 -07:00
Oliver Kurth 68be8d9bd5 reposync: implement --newest-only option 2021-05-28 12:18:44 -07:00
Oliver Kurth cede8c8918 reposync: arch and source options, TDNFCliFreeRepoSyncArgs() 2021-05-28 12:18:44 -07:00
Oliver Kurth 3edb3e0f3f reposync: add TDNFDownloadPackageToTree() function 2021-05-28 12:18:44 -07:00
Oliver Kurth 9089cce071 reposync: fix various nits 2021-05-28 12:18:44 -07:00
Oliver Kurth eb590a3fe2 reposync: implement gpgcheck option 2021-05-28 12:18:44 -07:00
Oliver Kurth 8544b87e14 reposync: urls only option, delete option, norepopath and check conflicting options 2021-05-28 12:18:44 -07:00
Oliver Kurth 52e5ade2f6 reposync: basics, metadata, metadata/download-path and option handling 2021-05-27 13:39:36 -07:00
Oliver Kurth c89404d257 move TDNFRefresh and TDNFAddCmdLinePackages calls to client/api.c 2021-02-18 17:14:33 -08:00
Oliver Kurth fe9795ef2e recursively remove directories for clean 2021-02-18 17:06:18 -08:00
Oliver Kurth 964e23f0db move TDNFCliParsePackageArgs() call to TDNFCliAlterCommand() 2021-02-03 16:55:40 -08:00
Oliver Kurth 9a077e517a delay repo refrsh to point where args are parsed 2021-01-04 14:24:44 -08:00
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
Shreenidhi Shedi 4c45258d58 Fixed dead code issue
Compare return values before bailing out

Signed-off-by: Shreenidhi Shedi <sshedi@vmware.com>
2020-10-28 12:18:24 +05:30
oliverkurth f2793f3085 install local and remote RPMs from command line 2020-10-21 22:22:39 -07:00
oliverkurth 641b99ac57 remove TDNFMakeCache, it's not used anywhere 2020-10-01 10:38:24 -07:00
Shreenidhi Shedi dc0bb82ad5 Report missing providers when achieving goal
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>
2020-08-08 00:00:54 +05:30
sshedi 8265d42017
Remove duplicate code (#136)
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>
2020-06-05 11:09:43 +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
Keerthana K 1da45e068b tdnf clean all command updates
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>
2020-03-20 09:28:34 +00:00
Priyesh Padmavilasom 6a6b9987fe plugin support
- 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)
2020-01-29 23:37:42 +00:00
Priyesh Padmavilasom 58ed019bed fix version getting overwritten as empty
- 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
2020-01-08 18:30:27 +00:00
Siddharth Chandrasekaran 4b6ec983f9 cmake: Add scripts/configs to allow cmake build/test
Signed-off-by: Siddharth Chandrasekaran <csiddharth@vmware.com>
2019-11-28 19:01:43 +05:30
Shreenidhi Shedi c4de6ae9db Minor fixes all over the place.
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>
2019-10-14 22:25:38 +05:30
Ankit Jain a5cc08d8b8 Merge "tdnf: Added options skipconflicts, skipobsoletes to check command" into dev 2019-03-14 22:22:30 -07:00
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