Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 1490729 Details for
Bug 1636239
get_best_query().filter(latest=True) is returning incorrect results
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Test script
dnf-fail-bash.py (text/plain), 1.41 KB, created by
Brian Lane
on 2018-10-04 21:17:28 UTC
(
hide
)
Description:
Test script
Filename:
MIME Type:
Creator:
Brian Lane
Created:
2018-10-04 21:17:28 UTC
Size:
1.41 KB
patch
obsolete
>#!/usr/bin/python3 >import dnf >import os >import shutil >import tempfile >import logging >log = logging > >def get_dbo(installroot, releasever): > > dnfbase = dnf.Base() > conf = dnfbase.conf > > conf.install_weak_deps = False > conf.releasever = releasever > conf.installroot = installroot > conf.prepend_installroot('persistdir') > conf.tsflags = ('nodocs',) > conf.module_platform_id = "platform:f29" > > # Use the .repo files from /etc/yum.repos.d/ > conf.reposdir = ["/etc/yum.repos.d"] > dnfbase.read_all_repos() > > dnfbase.fill_sack(load_system_repo=False) > dnfbase.read_comps() > > return dnfbase > >if __name__ == '__main__': > tempdir = tempfile.mkdtemp(prefix="pylorax.tmp.") > if not tempdir: > raise RuntimeError("Could not create tempdir") > > installroot = os.path.join(tempdir, "installroot") > > dbo = get_dbo(installroot, "29") > > # This should return 1 bash package, but it returns conflicting packages. > p = "bash" > pkgnames = [pkg for pkg in dnf.subject.Subject(p).get_best_query(dbo.sack).filter(latest=True)] > print("%s wants to install: %s" % (p, pkgnames)) > > # This should return 1 package, bash, but it doesn't > name = "bash" > version = "4.4.*" > pkgnames = [pkg for pkg in dnf.subject.Subject(name).get_best_query(dbo.sack).filter(version__glob=version,latest=True)] > print("%s-%s wants to install: %s" % (name, version, pkgnames)) > > shutil.rmtree(tempdir)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1636239
: 1490729