Skip to content

Commit

Permalink
Fix for parted >= 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hakuna-m committed Mar 13, 2016
1 parent 0a58bb0 commit b91b34e
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export SHELL = sh
PACKAGE = wubi
ICON = data/images/Wubi.ico
VERSION = $(shell head -n 1 debian/changelog | sed -e "s/^$(PACKAGE) (\(.*\)).*/\1/g" | cut -d r -f 1)
VERSION = $(shell head -n 1 debian/changelog | sed -e "s/^$(PACKAGE) (\(.*\)).*/\1/g" | cut -d r -f 1)
REVISION = $(shell head -n 1 debian/changelog | sed -e "s/^$(PACKAGE) (\(.*\)).*/\1/g" | cut -d r -f 2)
COPYRIGHTYEAR = 2009
AUTHOR = Agostino Russo
Expand Down
7 changes: 0 additions & 7 deletions data/custom-installation/hooks/early-command.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,6 @@ if [ -f /custom-installation/hooks/post-installer.sh ]; then
chmod +x /root/usr/lib/ubiquity/target-config/10post-installer
fi

architecture=$(uname -m | sed s/i6/i3/)
if [ -f /custom-installation/patch/$architecture/parted_server ]; then
cp /custom-installation/patch/$architecture/parted_server /root/usr/bin/parted_server
cp /custom-installation/patch/$architecture/libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0.0.1
ln -s libparted.so.0.0.1 /root/lib/$architecture-linux-gnu/libparted.so.0
fi

if [ -f /custom-installation/patch/autopartition-loop ]; then
cp /custom-installation/patch/autopartition-loop /root/bin/autopartition-loop
fi
Expand Down
23 changes: 16 additions & 7 deletions data/custom-installation/patch/autopartition-loop
Original file line number Diff line number Diff line change
Expand Up @@ -347,18 +347,27 @@ setup_loop () {
open_dialog PARTITIONS
free_space=
while { read_line num id size type fs path name; [ "$id" ]; }; do
if [ "$fs" = free ]; then
free_space=$id
free_size=$size
fi
case $fs in
free|unknown)
free_space=$id
free_size=$size
free_fs=$fs
;;
esac
done
close_dialog

# create partition in the free space
[ "$free_space" ] || autopartitioning_failed
open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001
read_line num id size type fs path name
close_dialog
if [ "$free_fs" = unknown ]; then
# parted >= 3.2 gives us a partition automatically
id=$free_space
else
# With parted < 3.2 we must create a partition manually
open_dialog NEW_PARTITION primary $4 $free_space full ${1}000001
read_line num id size type fs path name
close_dialog
fi

shift; shift; shift; shift
setup_partition $id $*
Expand Down
Binary file not shown.
Binary file removed data/custom-installation/patch/i386/parted_server
Binary file not shown.
Binary file not shown.
Binary file removed data/custom-installation/patch/x86_64/parted_server
Binary file not shown.
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
wubi (15.10r303) wily; urgency=low

[Hakuna Matata]

* Fix Ubiquity bug (LP: #1385930)
Remove workaround from rev. 293
Add fix for parted >= 3.2 in autopartition-loop

wubi (15.10r302) wily; urgency=low

[Hakuna Matata]
Expand Down

0 comments on commit b91b34e

Please sign in to comment.