osbuild-pipeline: include base and build packages in depsolving
This will detect inconsistent blueprints, and in the future will allow us to use the returned packages for generating the pipeline. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
6d94028976
commit
59da8b066f
1 changed files with 20 additions and 4 deletions
|
|
@ -4,10 +4,11 @@ import (
|
|||
"encoding/json"
|
||||
"flag"
|
||||
"fmt"
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/common"
|
||||
|
||||
"github.com/osbuild/osbuild-composer/internal/blueprint"
|
||||
"github.com/osbuild/osbuild-composer/internal/distro"
|
||||
"github.com/osbuild/osbuild-composer/internal/rpmmd"
|
||||
|
|
@ -80,10 +81,25 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
rpmmd := rpmmd.NewRPMMD()
|
||||
_, checksums, err := rpmmd.Depsolve(packages, nil, d.Repositories(archArg), d.ModulePlatformID(), true)
|
||||
pkgs, exclude_pkgs, err := d.BasePackages(imageType, archArg)
|
||||
if err != nil {
|
||||
panic(err.Error())
|
||||
panic("could not get base packages: " + err.Error())
|
||||
}
|
||||
packages = append(pkgs, packages...)
|
||||
|
||||
rpmmd := rpmmd.NewRPMMD()
|
||||
_, checksums, err := rpmmd.Depsolve(packages, exclude_pkgs, d.Repositories(archArg), d.ModulePlatformID(), false)
|
||||
if err != nil {
|
||||
panic("Could not depsolve: " + err.Error())
|
||||
}
|
||||
|
||||
buildPkgs, err := d.BuildPackages(archArg)
|
||||
if err != nil {
|
||||
panic("Could not get build packages: " + err.Error())
|
||||
}
|
||||
_, _, err = rpmmd.Depsolve(buildPkgs, nil, d.Repositories(archArg), d.ModulePlatformID(), false)
|
||||
if err != nil {
|
||||
panic("Could not depsolve build packages: " + err.Error())
|
||||
}
|
||||
|
||||
pipeline, err := d.Pipeline(blueprint, nil, checksums, archArg, imageType, 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue