main: add experimental --use-librepo to support librepo downloads
This commit switches to the librepo enabled `images` library via: ``` go mod -replace github.com/osbuild/iamges=github.com/mvo5/images@librepo-sources-osbuild1974 ``` which in turn needs osbuild PR#1974. With that it then adds a new `--use-librepo` switch that will enable librepo based downloading so that people can play with the new backend.
This commit is contained in:
parent
78f62e21e2
commit
f8ffa8a258
5 changed files with 96 additions and 46 deletions
|
|
@ -5,20 +5,22 @@ import (
|
|||
|
||||
"github.com/osbuild/images/pkg/distro"
|
||||
"github.com/osbuild/images/pkg/imagefilter"
|
||||
"github.com/osbuild/images/pkg/osbuild"
|
||||
"github.com/osbuild/images/pkg/ostree"
|
||||
|
||||
"github.com/osbuild/image-builder-cli/internal/blueprintload"
|
||||
"github.com/osbuild/image-builder-cli/internal/manifestgen"
|
||||
)
|
||||
|
||||
func generateManifest(dataDir, blueprintPath string, res *imagefilter.Result, output io.Writer, ostreeOpts *ostree.ImageOptions) error {
|
||||
func generateManifest(dataDir, blueprintPath string, res *imagefilter.Result, output io.Writer, ostreeOpts *ostree.ImageOptions, rpmDownloader osbuild.RpmDownloader) error {
|
||||
repos, err := newRepoRegistry(dataDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
// XXX: add --rpmmd/cachedir option like bib
|
||||
mg, err := manifestgen.New(repos, &manifestgen.Options{
|
||||
Output: output,
|
||||
Output: output,
|
||||
RpmDownloader: rpmDownloader,
|
||||
})
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue