I’ve created two repositories:
- Yum hosted - “hosted”
- Yum proxy (to hosted) - “proxy”
My case is to keep the packages on “proxy” repositories regardless of whether they are available on “hosted” as described in documentation:
A proxy repository is a repository that is linked to a remote repository. Any request for a component is verified against the local content of the proxy repository. If no local component is found, the request is forwarded to the remote repository. The component is then retrieved and stored locally in the repository manager, which acts as a cache. Any future requests for the same component are fulfilled from the local storage, eliminating network bandwidth and time overhead when retrieving the component from the remote repository again. In addition, when components are downloaded to the NXRM3 proxy, a copy remains there indefinitely, unless removed by an NXRM administrator. This is extremely useful in the event a component becomes unavailable in the remote repository, and provides more control over the components needed to build your applications.
So the test cases are:
- Upload a package to the “hosted” repo
- Install package on the system from “proxy” repo
- Remove package from the system
- Remove package from the “hosted” repo
- Install package on the system from the “proxy” repo after metadata refreshes
So the 5th failed. The “proxy” repository contains the needed package, but the metadata does not.
Is it the right behavior for the yum proxy repositories for now?
Also, I’ve checked thatsome sort of this is planned, but not released:
…and in a future iteration of this feature we will be adding “keep n versions of packages”.
Or my configuration of a “proxy” repo is broken:
Maximum Metadata Age = 10 (for tests purposes) Cache responses for content not present in the proxied repository = true How long to cache the fact that a file was not found in the repository (in minutes) = 20 (for tests purposes)