Skip to content

Commit

Permalink
feat(scan): Support RHEL8
Browse files Browse the repository at this point in the history
  • Loading branch information
kotakanbe committed May 16, 2019
1 parent 98fee7b commit 522d766
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scan/redhatbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,12 @@ func (o *redhatBase) parseInstalledPackagesLine(line string) (models.Package, er
}

func (o *redhatBase) scanUpdatablePackages() (models.Packages, error) {
cmd := `repoquery --all --pkgnarrow=updates --qf="%{NAME} %{EPOCH} %{VERSION} %{RELEASE} %{REPO}"`
isDnf := o.exec(util.PrependProxyEnv(`repoquery --version| grep dnf`), o.sudo.repoquery()).isSuccess()
cmd := `repoquery --all --pkgnarrow=updates --qf='%{NAME} %{EPOCH} %{VERSION} %{RELEASE} %{REPO}'`
if isDnf {
cmd = `repoquery --upgrades --qf='%{NAME} %{EPOCH} %{VERSION} %{RELEASE} %{REPONAME}' -q`
}

for _, repo := range o.getServerInfo().Enablerepo {
cmd += " --enablerepo=" + repo
}
Expand Down

0 comments on commit 522d766

Please sign in to comment.