-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
On Mon, 2017-09-04 at 09:25 -0700, Adam Williamson wrote:
On Fri, 2017-09-01 at 19:01 +0200, Igor Gnatenko wrote:
> So I think F28/F29 would be best time for retiring YUM. Right now
> DNF
> should be already stable and provide same capabilities (or
> documented
> that something will not be supported).
>
> Hopefully infrastructure / rel-eng folks will finally add support
> for
> rich dependencies[0] which would mean that yum will not work in
> Fedora
> anyway, so..
>
> Do you still have some critical missing functionality in DNF? And
> let
> us know reasons why would you like to keep YUM available (hopefully
> there are no)!
>
> P.S. I didn't wrote any Change Proposal yet, want to get feedback
> first
Pungi still uses yum:
Definitely it does!
[adamw@adam pungi (master)]$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working tree clean
[adamw@adam pungi (master)]$ grep -R yum pungi/
pungi/arch.py:def tree_arch_to_yum_arch(tree_arch):
pungi/arch.py: yum_arch = TREE_ARCH_YUM_ARCH_MAP.get(tree_arch,
tree_arch)
pungi/arch.py: return yum_arch
pungi/arch.py:def get_multilib_arch(yum_arch):
pungi/arch.py: arch_info =
rpmUtils.arch.getMultiArchInfo(yum_arch)
pungi/arch.py: yum_arch = tree_arch_to_yum_arch(tree_arch)
pungi/arch.py: multilib_arch = get_multilib_arch(yum_arch)
pungi/arch.py: yum_arch = tree_arch_to_yum_arch(tree_arch)
pungi/arch.py: for arch in rpmUtils.arch.getArchList(yum_arch):
pungi/multilib.py:def do_multilib(yum_arch, methods, repos, tmpdir,
logfile):
pungi/multilib.py: import yum
pungi/multilib.py: archlist =
yum.rpmUtils.arch.getArchList(yum_arch)
pungi/multilib.py: yumbase = yum.YumBase()
pungi/multilib.py: yumbase.preconf.init_plugins = False
pungi/multilib.py: yumbase.preconf.root = tmpdir
pungi/multilib.py: # must run doConfigSetup() before touching
yumbase.conf
pungi/multilib.py: yumbase.doConfigSetup(fn="/dev/null")
pungi/multilib.py: yumbase.conf.cache = False
pungi/multilib.py: yumbase.conf.cachedir = tmpdir
pungi/multilib.py: yumbase.conf.exactarch = True
pungi/multilib.py: yumbase.conf.gpgcheck = False
pungi/multilib.py: yumbase.conf.logfile = logfile
pungi/multilib.py: yumbase.conf.plugins = False
pungi/multilib.py: yumbase.conf.reposdir = []
pungi/multilib.py: yumbase.verbose_logger.setLevel(logging.ERROR)
pungi/multilib.py: yumbase.doRepoSetup()
pungi/multilib.py: yumbase.doTsSetup()
pungi/multilib.py: yumbase.doRpmDBSetup()
pungi/multilib.py: yumbase.ts.pushVSFlags((rpm._RPMVSF_NOSIGNATURE
S|rpm._RPMVSF_NODIGESTS))
pungi/multilib.py: for repo in yumbase.repos.findRepos("*"):
pungi/multilib.py: yumbase.add_enable_repo(repo_id,
baseurls=[baseurl])
pungi/multilib.py: yumbase.doSackSetup(archlist=archlist)
pungi/multilib.py: yumbase.doSackFilelistPopulate()
pungi/multilib.py: for po in sorted(yumbase.pkgSack):
pungi/multilib.py: help="path or url to yum repo; can be
specified multiple times",
pungi/phases/pkgset/sources/source_repos.py: # populate pkgset
from yum repos
pungi/phases/osbs.py: config['yum_repourls'] =
[self._get_repo(compose, variant)]
pungi/phases/gather/methods/method_deps.py:from pungi.arch import
tree_arch_to_yum_arch
pungi/phases/gather/methods/method_deps.py: yum_arch =
tree_arch_to_yum_arch(arch)
pungi/phases/gather/methods/method_deps.py: cmd =
pungi_wrapper.get_pungi_cmd(pungi_conf, destdir=tmp_dir,
name=variant.uid, selfhosting=selfhosting, fulltree=fulltree,
arch=yum_arch, full_archlist=True, greedy=greedy_method,
cache_dir=cache_dir, lookaside_repos=lookaside_repos,
multilib_methods=multilib_methods)
pungi/wrappers/comps.py:import yum.comps
pungi/wrappers/comps.py: self.comps = yum.comps.Comps()
pungi/wrappers/kojiwrapper.py: # HACK: remove rpmdb and yum
cache
pungi/wrappers/kojiwrapper.py: command = "rm -f
/var/lib/rpm/__db*; rm -rf /var/cache/yum/*; set -x; " + command
pungi/checks.py: ("yum-utils", "/usr/bin/createrepo", None),
pungi/checks.py: ("yum-utils", "/usr/bin/mergerepo", None),
pungi/checks.py: ("yum-utils", "/usr/bin/repoquery", None),
pungi/config.py:import yum
pungi/config.py: self.set('pungi', 'arch',
yum.rpmUtils.arch.getBaseArch())
pungi/gather.py:import yum
pungi/gather.py:def yumlocked(method):
pungi/gather.py: with self.yumlock:
pungi/gather.py: self.yum_arch =
arch_module.tree_arch_to_yum_arch(self.tree_arch)
pungi/gather.py: """A call back function used with
yum."""
pungi/gather.py:class PungiYum(yum.YumBase):
pungi/gather.py: yum.YumBase.__init__(self)
pungi/gather.py: yum.logging.basicConfig(level=yum.logging.DEB
UG, filename=logfile)
pungi/gather.py: # This function overrides a yum function,
allowing pungi to control
pungi/gather.py: result = yum.YumBase._compare_providers(self,
*args, **kwargs)
pungi/gather.py: filename = self.config.get('pungi',
'cachedir') + "/yumlock"
pungi/gather.py: self.yumlock = ReentrantYumLock(lock,
self.logger)
pungi/gather.py: def _add_yum_repo(self, name, url,
mirrorlist=False, groups=True,
pungi/gather.py: """This function adds a repo to the yum
object.
pungi/gather.py: thisrepo = yum.yumRepo.YumRepository(name)
pungi/gather.py: thisrepo.mirrorlist =
yum.parser.varReplace(url,
pungi/gather.py:
self.ayum.conf.yumvar)
pungi/gather.py: thisrepo.baseurl =
yum.parser.varReplace(url,
pungi/gather.py:
self.ayum.conf.yumvar)
pungi/gather.py: thisrepo.basecachedir =
self.ayum.conf.cachedir
pungi/gather.py: # This is until yum uses this failover by
default
pungi/gather.py: self.ayum.repos.add(thisrepo)
pungi/gather.py: self.ayum.repos.enableRepo(thisrepo.id)
pungi/gather.py: self.ayum._getRepos(thisrepo=thisrepo.id,
doSetup=True)
pungi/gather.py: self.ayum.repos.setProgressBar(CallBack())
pungi/gather.py: self.ayum.repos.callback = CallBack()
pungi/gather.py: @yumlocked
pungi/gather.py: def _inityum(self):
pungi/gather.py: """Initialize the yum object. Only needed
for certain actions."""
pungi/gather.py: # Create a yum object to use
pungi/gather.py: self.ayum = PungiYum(self.config)
pungi/gather.py: self.ayum.doLoggingSetup(6, 6)
pungi/gather.py: yumconf = yum.config.YumConf()
pungi/gather.py: yumconf.debuglevel = 6
pungi/gather.py: yumconf.errorlevel = 6
pungi/gather.py: yumconf.cachedir = self.config.get('pungi',
'cachedir')
pungi/gather.py: yumconf.persistdir = "/var/lib/yum" # keep at
default, gets appended to installroot
pungi/gather.py: yumconf.installroot =
os.path.join(self.workdir, 'yumroot')
pungi/gather.py: yumconf.uid = os.geteuid()
pungi/gather.py: yumconf.cache = 0
pungi/gather.py: yumconf.failovermethod = 'priority'
pungi/gather.py: yumconf.deltarpm = 0
pungi/gather.py: yumvars = yum.config._getEnvVar()
pungi/gather.py: yumvars['releasever'] =
self.config.get('pungi', 'version')
pungi/gather.py: yumvars['basearch'] =
yum.rpmUtils.arch.getBaseArch(myarch=self.tree_arch)
pungi/gather.py: yumconf.yumvar = yumvars
pungi/gather.py: self.ayum._conf = yumconf
pungi/gather.py: del self.ayum.prerepoconf
pungi/gather.py: self.ayum.repos.setCacheDir(self.ayum.conf.ca
chedir)
pungi/gather.py: self.ayum.arch.setup_arch(self.yum_arch)
pungi/gather.py: # whether to ignore groups, but yum
is a yes/no on whether to
pungi/gather.py: self._add_yum_repo(repo.name,
repo.mirrorlist,
pungi/gather.py: self._add_yum_repo(repo.name,
repo.baseurl,
pungi/gather.py: self.ayum._getSacks(archlist=self.valid_arche
s)
pungi/gather.py: self.ayum.install(po)
pungi/gather.py: def verifyCachePkg(self, po, path): # Stolen from
yum
pungi/gather.py: filesum = yum.misc.checksum(csum_type,
path)
pungi/gather.py: except yum.Errors.MiscError:
pungi/gather.py: deps = self.ayum.whatProvides(r, f,
v).returnPackages()
pungi/gather.py: deps =
yum.packageSack.ListPackageSack(deps).returnNewestByNameArch()
pungi/gather.py: deps =
[self.ayum._bestPackageFromList(all_deps)]
pungi/gather.py: except (yum.Errors.InstallError,
yum.Errors.YumBaseError), ex:
pungi/gather.py: exactmatched, matched, unmatched =
yum.packages.parsePackages(self.all_pkgs, [pattern], casematch=1,
pkgdict=self.pkg_refs.copy())
pungi/gather.py: match =
self.ayum._bestPackageFromList(pkg_sack)
pungi/gather.py: matches =
self.ayum.pkgSack.searchNevra(name=po.name, ver=po.version,
rel=po.release)
pungi/gather.py: match =
self.ayum._bestPackageFromList(matches)
pungi/gather.py: if not self.ayum.comps.has_group(group.name):
pungi/gather.py: groupobj =
self.ayum.comps.return_group(group.name)
pungi/gather.py: matches =
self.ayum.pkgSack.searchNevra(name=condreq)
pungi/gather.py: matches =
[self.ayum._bestPackageFromList(matches)]
pungi/gather.py: self.ayum.tsInfo.conditionals.setdefa
ult(cond, []).extend(matches)
pungi/gather.py: filter(lambda x: x.default,
self.ayum.comps.groups))
pungi/gather.py: self.langpacks =
list(self.ayum.comps.langpacks)
pungi/gather.py: # old yum
pungi/gather.py: self.logger.warning("Could not get
langpacks via yum.comps. You may need to update yum.")
pungi/gather.py: except yum.Errors.GroupsError:
pungi/gather.py: self.all_pkgs =
list(set(self.ayum.pkgSack.returnPackages()))
pungi/gather.py: self.pkg_refs =
yum.packages.buildPkgRefDict(self.all_pkgs, casematch=True)
pungi/gather.py: self.ayum.excludePackages()
pungi/gather.py: if "core" in [ i.groupid for i in
self.ayum.comps.groups ]:
pungi/gather.py: if "base" in [ i.groupid for i in
self.ayum.comps.groups ]:
pungi/gather.py: searchlist = yum.misc.unique(searchlist)
pungi/gather.py: matches =
self.ayum.whatProvides(name, None, None).returnPackages()
pungi/gather.py: exactmatched, matched, unmatched =
yum.packages.parsePackages(self.all_pkgs, [name], casematch=1,
pkgdict=self.pkg_refs.copy())
pungi/gather.py: packages =
yum.packageSack.ListPackageSack(packages).returnNewestByNameArch()
pungi/gather.py: packages =
[self.ayum._bestPackageFromList(packages)]
pungi/gather.py: for txmbr in self.ayum.tsInfo:
pungi/gather.py: srpm_po_list =
self.ayum.pkgSack.searchNevra(name=name, ver=ver, rel=rel,
arch="src")
pungi/gather.py: Requires yum still configured."""
pungi/gather.py: #(dummy1, everything, dummy2) =
yum.packages.parsePackages(self.all_pkgs, ['*'],
pkgdict=self.pkg_refs.copy())
pungi/gather.py: find the sourcerpm for them. Requires yum
still
pungi/gather.py: Requires yum still configured and a list
of package
pungi/gather.py: debuginfo rpms for them. Requires yum
still
pungi/gather.py: probs = self.ayum.downloadPkgs(polist)
pungi/gather.py: errors = yum.misc.unique(probs[key])
pungi/gather.py: self.logger.error("Unable to link %s
from the yum cache." % po.name)
pungi/gather.py: @yumlocked
pungi/gather.py: g =
self.ayum.comps.return_group(item.name)
pungi/gather.py: allgroups = [g.groupid for g in
self.ayum.comps.get_groups()]
pungi/gather.py: if group not in ourgroups and not
self.ayum.comps.return_group(group).langonly:
pungi/gather.py: del self.ayum.comps._groups[group]
pungi/gather.py: groups = [g.groupid for g in
self.ayum.comps.get_groups()]
pungi/gather.py: envs = self.ayum.comps.get_environments()
pungi/gather.py: del
self.ayum.comps._environments[env.environmentid]
pungi/gather.py: ourcomps.write(self.ayum.comps.xml())
pungi/gather.py: @yumlocked
pungi/gather.py: @yumlocked
pungi/gather.py: # whether to ignore groups, but yum
is a yes/no on whether to
pungi/gather.py: # Add the repo in the destdir to our yum
object
Some of those are false positives (just names for things that are
actually moved to dnf), but a lot of them are actual usage of the yum
module.
Pungi in rawhide uses DNF backend for gathering, so irrelevant.. 😉
--
Adam Williamson
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin .
net
http://www.happyassassin.net
_______________________________________________
devel mailing list -- devel(a)lists.fedoraproject.org
To unsubscribe send an email to devel-leave(a)lists.fedoraproject.org
- --
- -Igor Gnatenko
-----BEGIN PGP SIGNATURE-----
iQIzBAEBCAAdFiEEhLFO09aHZVqO+CM6aVcUvRu8X0wFAlmtnXEACgkQaVcUvRu8
X0z8oQ//Xhs8t5VSxbsKRM4AZcIIYY7GYE76JR3X7eljTrjrMLAxrdudp0bsROLM
vWU0CHcbwnLri11Z6FY/oXniL7QitX26Fff3/mVCTi0qngDAXF9mP6a2EBnifBaG
w7E/AheXXFHcnsXcz92hTDa4UiaZaSbZ4sZwRnYaFkNTfWX1x4iwJmuDQ/ZPf+9J
2LgXDLMSpRfcL32zZoQ9ddR0NDPEsAU2vp7DvEdR3QytS/sE0Xt8/FLmhWvOnZj6
lQ6YrVWhn2Khq/5hbYyoiXd9qVY5/rXmiEXKgq53ANMSbfqYf8jaiKtFa3pRY8He
GLTei+uZl956NEi8IQ/6QPPvs5VfZmlA/1Y1/WeElUTHNEMYtsgUGVQAesBJgibW
eaTxUFhZCPbD6WvTbu356d8yYgAis0zZr03yxQqMr07Nm9Rn+UuNQZLvzGRSqOjE
gxX3rUGmb6GUqFk1tEXq+iQf2ALZb7H6qIeceHLWnIpGuFsFUZCN/s/eFhf3KG/e
dRksNujhPjR2m3dBOvrt7fMdwJ3cWsRvFqhZoZgNAWdOHGQhNEU/5mF7Tmfk0VRV
jq7e0ksuh8vNSaX/DqWap2OxdZdXEOj99SHtQdy06Rx9YC0Dv+A16ZOfEVWH0CSN
OZuw/ixh+C9qD9X2eFCQlJfvb7Fq4Lyz4qK1lUcOUqD7+CmgOBQ=
=1QoQ
-----END PGP SIGNATURE-----