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>
- In case of using baseurl:
When we do makecache first time, tdnf will
download the repomd.xml and copy all the
repodata.
From second time, if we do "makecache" or
"repolist --refresh" we will check the
shasum of repomd.xml with the existing
repomd.xml and if both are not same, will
replace the repodata.
If we switch from metalink to baseurl. In that case
we will download he repomd.xml and compare with
the existing one. If both are same, we will not
replace and use the existing one.
- In case of metalink:
If we were using baseurl and switched to metalink.
We will download metalink file and then download
repomd.xml and compare the shasum with existing
repomd.xml. If both matches we will not replace
the repomd.xml. We will just keep the metalink file
and save the baseurl.
From next time onwards, we will check the shasum
for metalink file, if it matches we will not proceed
to download the repomd.xml.
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
Below are the modifications done with this PR:
1. Add sha512sum support for verifying the repomd file.
2. Cache the baseurl in case of metalink.
3. support sequential retry of lesser priority mirrors
4. Removed hardcoded support of https, http, ftp, ftps, file resource types.
5. With this change, curl will decide on the protocol supported/unsupported.
6. Minor code cleanup and some improvements.
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
- Removed hardcoded name for metalink file. It will depend on user input file.
- Fix some issues related with repomd url which is coming from metalink file.
- Moved check for resource type to TDNFParseAndGetURLFromMetalink before selecting
the url.
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
This fix is to remove the old repomd , solv cache and lastrefresh
marker when there is a new repomd file downloaded. This fixes the issue
https://github.com/vmware/photon/issues/1008
Signed-off-by: Keerthana K <keerthanak@vmware.com>
-Added checks for files and resources.
-Added verifying checksum for the files to be downloaded using metalink file
-If verifying checksum fails, we will fail the discard the download.
-Added checks for resource type to:
- http
- https
- ftp
- ftps
- rsync
-We will also check the digest in below priority:
- sha256
- sha1
- md5
If sha256 is valid in metalink file, we will store sha256 to compare with the downloaded repomd.
In case sha256 is invalid, we will store sha1 and use it for validating the downloaded repomd file.
If both sha1 or sha256 is not valid, we will store md5.
In case we have only one digest present in metalink file and if thats invalid, we will not store any
digest and discard by throwing error, digest missing.
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
Added metalink support for repo files.
If metalink URL is present, we will get the URL with the highest priority.
Then we concat the metalink path to the url and download the metalink file.
Once metalink file is downloaded, we parse it and downlod the repomd.xml
file and then parse the xml to download repoMD parts.
Also, we set the BaseURL for the respective repo to the URL we got from
the metalink file for further package downloads.
Signed-off-by: Tapas Kundu <tkundu@vmware.com>
installs used to fail with generic error. this was because
gpgkey lookup would fail with a null or empty string and a
generic error was returned.
it is a better user experience when the specific error is
bubbled up so that corrective action can be taken.
- plugin event map for guidance to event items
- plugin events init, repo, repomd
- tests for plugin conf
- tests with a repomd sign and verify via plugin
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>
Previously tdnf makecache and --refresh always downloads repodata irrespective
of changes in repodata. This change uses shasum comaparison to detect if there
is any change in repodata and downloads repodata only if there is any
change in repodata.
Change-Id: Ia800bb54e69fec649aa10188fe981d66d2fc56a7
createwhatprovides() was moved to InitSack() as part of this commit
355b46fb6f. createwhatprovides()
needs to be called after parsing all the enabled repos to get the index
of dependencies. Without calling this creates a problem in dependency list.
Change-Id: Idad468a73b48ef8374322011ceb64b68fc45e935
pool_createwhatprovides is moved to InitSack() from InitRepo().
When no repos are enabled createwhatprovides is not set due to which
commands fail.
Change-Id: I3fc15022a9e6bfbcaec88c62343c856dba873861
This change includes the support of libsolv caching of metadata which is a .solv file.
When the cache is created, tdnf creates a metadata cache file (*.solv)
in cache directory (/var/cache/tdnf/REPO-NAME/solvcache/). This is consumed by tdnf in
subsequent tdnf operations till the refresh timer expires. Solv cache file improves the
time consumed by tdnf operation which results in quicker results.
Change-Id: I42894260b8e9a110188c38027fc480dd83bfdc10