|
|
@ -1,13 +1,10 @@
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# # Copyright: (c) 2012, Red Hat, Inc
|
|
|
|
# # Copyright: (c) 2018, Red Hat, Inc
|
|
|
|
# Written by Seth Vidal <skvidal at fedoraproject.org>
|
|
|
|
# Written by Adam Miller <admiller@redhat.com>
|
|
|
|
# Contributing Authors:
|
|
|
|
# Contributing Authors:
|
|
|
|
# - Ansible Core Team
|
|
|
|
# - Ansible Core Team
|
|
|
|
# - Eduard Snesarev (@verm666)
|
|
|
|
# Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause)
|
|
|
|
# - Berend De Schouwer (@berenddeschouwer)
|
|
|
|
|
|
|
|
# - Abhijeet Kasurde (@Akasurde)
|
|
|
|
|
|
|
|
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import tempfile
|
|
|
|
import tempfile
|
|
|
@ -102,6 +99,10 @@ class YumDnf(with_metaclass(ABCMeta, object)):
|
|
|
|
def run(self):
|
|
|
|
def run(self):
|
|
|
|
raise NotImplementedError
|
|
|
|
raise NotImplementedError
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# This function originated from the YUM module which is GPLv3 licensed, there was
|
|
|
|
|
|
|
|
# explicit permission from the function's original author to relicence as documented
|
|
|
|
|
|
|
|
# in the below GitHub ticket for posterity.
|
|
|
|
|
|
|
|
# https://github.com/ansible/ansible/pull/19172#issuecomment-278409867
|
|
|
|
def fetch_rpm_from_url(self, spec):
|
|
|
|
def fetch_rpm_from_url(self, spec):
|
|
|
|
# download package so that we can query it
|
|
|
|
# download package so that we can query it
|
|
|
|
package_name, dummy = os.path.splitext(str(spec.rsplit('/', 1)[1]))
|
|
|
|
package_name, dummy = os.path.splitext(str(spec.rsplit('/', 1)[1]))
|
|
|
|