From ac6dc34e5960c87cfaefc45c4d5bdb075314d6d2 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Jun 24 2022 07:50:02 +0000 Subject: rpmbuild: drop an unused extract_srpm method If we ever need this in the future, we could use the extract_srpm method from the python3-rpkg project. Relates: #2225 --- diff --git a/rpmbuild/copr_rpmbuild/helpers.py b/rpmbuild/copr_rpmbuild/helpers.py index 1728b11..5b7186f 100644 --- a/rpmbuild/copr_rpmbuild/helpers.py +++ b/rpmbuild/copr_rpmbuild/helpers.py @@ -185,22 +185,6 @@ def get_mock_uniqueext(): return datetime.datetime.now().strftime('%s.%f') -def extract_srpm(srpm_path, destination): - """ - Extracts srpm content to the target directory. - - raises: CheckOutputError - """ - cwd = os.getcwd() - os.chdir(destination) - log.debug('Extracting srpm {0} to {1}'.format(srpm_path, destination)) - try: - cmd = "rpm2cpio {path} | cpio -idmv".format(path=pipes.quote(srpm_path)) - subprocess.check_call(cmd, shell=True) - finally: - os.chdir(cwd) - - def build_srpm(srcdir, destdir): cmd = [ 'rpmbuild', '-bs',