diff options
| author | Alexander Kanavin <alex@linutronix.de> | 2024-12-04 07:49:20 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-12 13:22:08 +0000 |
| commit | 2d22ef81952b90167bb70f6e3a20097a75aecbab (patch) | |
| tree | 7ed8de1167fca45c20b348fe374a583766442046 /meta/lib/oe | |
| parent | ea9c2cfb6901251b95e07e052616a512b91ea0c7 (diff) | |
| download | poky-2d22ef81952b90167bb70f6e3a20097a75aecbab.tar.gz | |
rpm: replace use of rpm2cpio with rpm2archive
rpm2cpio has been deprecated upstream, so this prepares for its
eventual removal.
rpm2archive produces a tar archive which can be uncompressed
with tar executable from the host.
(From OE-Core rev: ed824d3fb23f0c89d8dfdacb2c4ef0b7c21a5144)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oe')
| -rw-r--r-- | meta/lib/oe/package_manager/rpm/__init__.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/lib/oe/package_manager/rpm/__init__.py b/meta/lib/oe/package_manager/rpm/__init__.py index f40c880af4..323ec5008f 100644 --- a/meta/lib/oe/package_manager/rpm/__init__.py +++ b/meta/lib/oe/package_manager/rpm/__init__.py | |||
| @@ -393,8 +393,8 @@ class RpmPM(PackageManager): | |||
| 393 | # Strip file: prefix | 393 | # Strip file: prefix |
| 394 | pkg_path = pkg_name[5:] | 394 | pkg_path = pkg_name[5:] |
| 395 | 395 | ||
| 396 | cpio_cmd = bb.utils.which(os.getenv("PATH"), "cpio") | 396 | tar_cmd = bb.utils.which(os.getenv("PATH"), "tar") |
| 397 | rpm2cpio_cmd = bb.utils.which(os.getenv("PATH"), "rpm2cpio") | 397 | rpm2archive_cmd = bb.utils.which(os.getenv("PATH"), "rpm2archive") |
| 398 | 398 | ||
| 399 | if not os.path.isfile(pkg_path): | 399 | if not os.path.isfile(pkg_path): |
| 400 | bb.fatal("Unable to extract package for '%s'." | 400 | bb.fatal("Unable to extract package for '%s'." |
| @@ -405,7 +405,7 @@ class RpmPM(PackageManager): | |||
| 405 | os.chdir(tmp_dir) | 405 | os.chdir(tmp_dir) |
| 406 | 406 | ||
| 407 | try: | 407 | try: |
| 408 | cmd = "%s %s | %s -idmv" % (rpm2cpio_cmd, pkg_path, cpio_cmd) | 408 | cmd = "%s -n %s | %s xv" % (rpm2archive_cmd, pkg_path, tar_cmd) |
| 409 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) | 409 | output = subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True) |
| 410 | except subprocess.CalledProcessError as e: | 410 | except subprocess.CalledProcessError as e: |
| 411 | bb.utils.remove(tmp_dir, recurse=True) | 411 | bb.utils.remove(tmp_dir, recurse=True) |
