mirror of
https://gitlab.com/nonguix/nonguix.git
synced 2024-11-22 00:18:07 +01:00
nonguix: binary: Improve .deb unpacking.
.deb could contain data.tar compressed in any format, not just .xz as it assumes now. * nonguix/build/binary-build-system (unpack-deb): find a data.tar archive to extract. Signed-off-by: Jonathan Brielmaier <jonathan.brielmaier@web.de>
This commit is contained in:
parent
2be61e5d23
commit
ea84538b88
1 changed files with 10 additions and 5 deletions
|
@ -2,12 +2,14 @@
|
|||
;;; Copyright © 2019 Julien Lepiller <julien@lepiller.eu>
|
||||
;;; Copyright © 2022 Attila Lendvai <attila@lendvai.name>
|
||||
;;; Copyright © 2023 Giacomo Leidi <goodoldpaul@autistici.org>
|
||||
;;; Copyright © 2024 Ashish SHUKLA <ashish.is@lostca.se>
|
||||
|
||||
(define-module (nonguix build binary-build-system)
|
||||
#:use-module ((guix build gnu-build-system) #:prefix gnu:)
|
||||
#:use-module (nonguix build utils)
|
||||
#:use-module (guix build utils)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:export (%standard-phases
|
||||
binary-build))
|
||||
|
||||
|
@ -139,11 +141,14 @@ The inputs are optional when the file is an executable."
|
|||
|
||||
(define (unpack-deb deb-file)
|
||||
(invoke "ar" "x" deb-file)
|
||||
(invoke "tar" "xvf" "data.tar.xz")
|
||||
(invoke "rm" "-rfv" "control.tar.gz"
|
||||
"data.tar.xz"
|
||||
deb-file
|
||||
"debian-binary"))
|
||||
(let ((data-file (find file-exists?
|
||||
(list "data.tar.xz" "data.tar.gz"
|
||||
"data.tar.bz2"))))
|
||||
(invoke "tar" "xvf" data-file)
|
||||
(invoke "rm" "-rfv" "control.tar.gz"
|
||||
data-file
|
||||
deb-file
|
||||
"debian-binary")))
|
||||
|
||||
(define* (binary-unpack #:key source #:allow-other-keys)
|
||||
(let* ((files (filter (lambda (f)
|
||||
|
|
Loading…
Reference in a new issue