GNU bug report logs -
#37497
[PATCH] installer: Update to Guile-Parted 0.0.2 release.
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 37497 in the body.
You can then email your comments to 37497 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#37497
; Package
guix-patches
.
(Tue, 24 Sep 2019 12:27:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Mathieu Othacehe <m.othacehe <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Tue, 24 Sep 2019 12:27:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/installer/parted.scm (data-partition?, metadata-partition?,
freespace-partition?, normal-partition?, extended-partition?,
logical-partition?): Remove, as now provided by Guile-Parted.
* gnu/installer/newt/partition.scm (run-disk-page): Remove disk-destroy calls,
replace disk-delete-all by disk-remove-all-partitions and
disk-delete-partition by disk-remove-partition*.
---
gnu/installer/newt/partition.scm | 9 ++----
gnu/installer/parted.scm | 48 +++-----------------------------
2 files changed, 7 insertions(+), 50 deletions(-)
diff --git a/gnu/installer/newt/partition.scm b/gnu/installer/newt/partition.scm
index 7a9f11a15e..74e9473171 100644
--- a/gnu/installer/newt/partition.scm
+++ b/gnu/installer/newt/partition.scm
@@ -587,7 +587,6 @@ edit it."
disks))
(new-user-partitions
(remove-user-partition-by-disk user-partitions item)))
- (disk-destroy item)
`((disks . ,(cons new-disk other-disks))
(user-partitions . ,new-user-partitions)))
`((disks . ,disks)
@@ -625,7 +624,7 @@ edit it."
info-text)))
(case result
((1)
- (disk-delete-all item)
+ (disk-remove-all-partitions item)
`((disks . ,disks)
(user-partitions
. ,(remove-user-partition-by-disk user-partitions item))))
@@ -649,7 +648,7 @@ edit it."
(let ((new-user-partitions
(remove-user-partition-by-partition user-partitions
item)))
- (disk-delete-partition disk item)
+ (disk-remove-partition* disk item)
`((disks . ,disks)
(user-partitions . ,new-user-partitions))))
(else
@@ -696,9 +695,7 @@ by pressing the Exit button.~%~%")))
#f))
(check-user-partitions user-partitions))))
(if user-partitions-ok?
- (begin
- (for-each (cut disk-destroy <>) disks)
- user-partitions)
+ user-partitions
(run-disk-page disks user-partitions
#:guided? guided?)))
(let* ((result-disks (assoc-ref result 'disks))
diff --git a/gnu/installer/parted.scm b/gnu/installer/parted.scm
index 682e233d9f..3439f211e2 100644
--- a/gnu/installer/parted.scm
+++ b/gnu/installer/parted.scm
@@ -64,13 +64,7 @@
user-partition-parted-object
find-esp-partition
- data-partition?
- metadata-partition?
- freespace-partition?
small-freespace-partition?
- normal-partition?
- extended-partition?
- logical-partition?
esp-partition?
boot-partition?
default-esp-mount-point
@@ -172,24 +166,6 @@
"Find and return the ESP partition among PARTITIONS."
(find esp-partition? partitions))
-(define (data-partition? partition)
- "Return #t if PARTITION is a partition dedicated to data (by opposition to
-freespace, metadata and protected partition types), return #f otherwise."
- (let ((type (partition-type partition)))
- (not (any (lambda (flag)
- (member flag type))
- '(free-space metadata protected)))))
-
-(define (metadata-partition? partition)
- "Return #t if PARTITION is a metadata partition, #f otherwise."
- (let ((type (partition-type partition)))
- (member 'metadata type)))
-
-(define (freespace-partition? partition)
- "Return #t if PARTITION is a free-space partition, #f otherwise."
- (let ((type (partition-type partition)))
- (member 'free-space type)))
-
(define* (small-freespace-partition? device
partition
#:key (max-size MEBIBYTE-SIZE))
@@ -200,21 +176,6 @@ inferior to MAX-SIZE, #f otherwise."
(device-sector-size device))))
(< size max-sector-size)))
-(define (normal-partition? partition)
- "return #t if partition is a normal partition, #f otherwise."
- (let ((type (partition-type partition)))
- (member 'normal type)))
-
-(define (extended-partition? partition)
- "return #t if partition is an extended partition, #f otherwise."
- (let ((type (partition-type partition)))
- (member 'extended type)))
-
-(define (logical-partition? partition)
- "Return #t if PARTITION is a logical partition, #f otherwise."
- (let ((type (partition-type partition)))
- (member 'logical type)))
-
(define (partition-user-type partition)
"Return the type of PARTITION, to be stored in the TYPE field of
<user-partition> record. It can be 'normal, 'extended or 'logical."
@@ -813,7 +774,7 @@ cause them to cross."
(define (rmpart disk number)
"Remove the partition with the given NUMBER on DISK."
(let ((partition (disk-get-partition disk number)))
- (disk-remove-partition disk partition)))
+ (disk-remove-partition* disk partition)))
;;
@@ -928,12 +889,12 @@ exists."
(if has-extended?
;; msdos - remove everything.
- (disk-delete-all disk)
+ (disk-remove-all-partitions disk)
;; gpt - remove everything but esp if it exists.
(for-each
(lambda (partition)
(and (data-partition? partition)
- (disk-remove-partition disk partition)))
+ (disk-remove-partition* disk partition)))
non-boot-partitions))
(let* ((start-partition
@@ -1348,7 +1309,7 @@ USER-PARTITIONS, or return nothing."
(define (init-parted)
"Initialize libparted support."
- (probe-all-devices)
+ (probe-all-devices!)
(exception-set-handler (lambda (exception)
EXCEPTION-OPTION-UNHANDLED)))
@@ -1364,7 +1325,6 @@ the devices not to be used before returning."
;; https://mail.gnome.org/archives/commits-list/2013-March/msg18423.html.
(let ((device-file-names (map device-path devices)))
(for-each force-device-sync devices)
- (free-all-devices)
(for-each (lambda (file-name)
(let ((in-use? (with-delay-device-in-use? file-name)))
(and in-use?
--
2.23.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37497
; Package
guix-patches
.
(Tue, 24 Sep 2019 12:30:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 37497 <at> debbugs.gnu.org (full text, mbox):
Hello,
Here's a patch to update the installer to the new Guile-Parted release. It
gets rid of the "delete" functions, that are now taken care of by pointer
finalizers.
I tested it on an x64 VM without seeing any regression, but sadly its hard to
cover all cases. I'll update the Guile-Parted when this gets pushed.
Thanks,
Mathieu
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37497
; Package
guix-patches
.
(Wed, 25 Sep 2019 12:55:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 37497 <at> debbugs.gnu.org (full text, mbox):
Hi Mathieu,
Mathieu Othacehe <m.othacehe <at> gmail.com> skribis:
> Here's a patch to update the installer to the new Guile-Parted release. It
> gets rid of the "delete" functions, that are now taken care of by pointer
> finalizers.
> gnu/installer/newt/partition.scm | 9 ++----
> gnu/installer/parted.scm | 48 +++-----------------------------
> 2 files changed, 7 insertions(+), 50 deletions(-)
Nice, LGTM!
> I tested it on an x64 VM without seeing any regression, but sadly its hard to
> cover all cases. I'll update the Guile-Parted when this gets pushed.
I guess you’ll have to push the ‘guile-parted’ package update right
before this patch, right?
Thanks,
Ludo’.
Information forwarded
to
guix-patches <at> gnu.org
:
bug#37497
; Package
guix-patches
.
(Wed, 25 Sep 2019 14:06:01 GMT)
Full text and
rfc822 format available.
Message #14 received at 37497 <at> debbugs.gnu.org (full text, mbox):
Hey,
> I guess you’ll have to push the ‘guile-parted’ package update right
> before this patch, right?
Yes, done as a3246602a2 and 70c7b7c799. Thanks for the review.
Mathieu
Reply sent
to
Ricardo Wurmus <rekado <at> elephly.net>
:
You have taken responsibility.
(Fri, 27 Sep 2019 05:55:01 GMT)
Full text and
rfc822 format available.
Notification sent
to
Mathieu Othacehe <m.othacehe <at> gmail.com>
:
bug acknowledged by developer.
(Fri, 27 Sep 2019 05:55:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 37497-done <at> debbugs.gnu.org (full text, mbox):
Mathieu Othacehe <m.othacehe <at> gmail.com> writes:
>> I guess you’ll have to push the ‘guile-parted’ package update right
>> before this patch, right?
>
> Yes, done as a3246602a2 and 70c7b7c799. Thanks for the review.
Thanks. Closing.
--
Ricardo
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Fri, 25 Oct 2019 11:24:12 GMT)
Full text and
rfc822 format available.
This bug report was last modified 4 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.