mirror of https://github.com/vmware/tdnf.git
Merge pull request #242 from oliverkurth/topic/okurth/no-fail-on-empty-list
don't fail if 'tdnf list <scope>' is empty unless it's a package spec, fixes issue #94
This commit is contained in:
commit
55337af751
19
client/api.c
19
client/api.c
|
@ -629,20 +629,19 @@ TDNFList(
|
|||
BAIL_ON_TDNF_ERROR(dwError);
|
||||
|
||||
dwError = SolvGetQueryResult(pQuery, &pPkgList);
|
||||
BAIL_ON_TDNF_ERROR(dwError);
|
||||
|
||||
dwError = TDNFPopulatePkgInfoArray(
|
||||
pTdnf->pSack,
|
||||
pPkgList,
|
||||
DETAIL_LIST,
|
||||
&pPkgInfo,
|
||||
&dwCount);
|
||||
|
||||
if (dwError == ERROR_TDNF_NO_MATCH && !*ppszPackageNameSpecs)
|
||||
{
|
||||
dwError = 0;
|
||||
}
|
||||
|
||||
else if (dwError == 0)
|
||||
{
|
||||
dwError = TDNFPopulatePkgInfoArray(
|
||||
pTdnf->pSack,
|
||||
pPkgList,
|
||||
DETAIL_LIST,
|
||||
&pPkgInfo,
|
||||
&dwCount);
|
||||
}
|
||||
BAIL_ON_TDNF_ERROR(dwError);
|
||||
|
||||
*ppPkgInfo = pPkgInfo;
|
||||
|
|
|
@ -53,13 +53,7 @@ def test_list_upgrades(utils):
|
|||
spkg = utils.config["sglversion_pkgname"]
|
||||
|
||||
ret = utils.run([ 'tdnf', 'list', 'upgrades' ])
|
||||
|
||||
# TODO Fix this; see issue #94
|
||||
if ret['retval'] == 1011 or ret['retval'] == 0:
|
||||
result = True
|
||||
else:
|
||||
result = False
|
||||
assert(result)
|
||||
assert(ret['retval'] == 0)
|
||||
|
||||
utils.run([ 'tdnf', 'install', '-y', '--nogpgcheck', mpkg + '-' + mpkg_version ])
|
||||
ret = utils.run([ 'tdnf', 'list', 'upgrades', mpkg ])
|
||||
|
|
Loading…
Reference in New Issue