Commit 838d53b9 authored by Anton Zinoviev's avatar Anton Zinoviev

Many changes to partman, documented in debian/changelog files.

r12635
parent cc89c75a
......@@ -11,14 +11,22 @@ open_dialog DELETE_PARTITION $id
close_dialog
partitions=''
numparts=1
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
partitions="$partitions $id"
numparts=$(($numparts + 1))
done
close_dialog
db_progress START 0 $numparts partman/text/please_wait
db_progress INFO partman-partitioning/new_state
for id in $partitions; do
update_partition $dev $id
db_progress STEP 1
done
db_progress STOP
exit 100
......@@ -17,16 +17,21 @@ hminsize=$(longint2human $minsize)
hcursize=$(longint2human $cursize)
hmaxsize=$(longint2human $maxsize)
db_set partman-partitioning/confirm_resize 'false'
db_fset partman-partitioning/confirm_resize seen false
db_input high partman-partitioning/confirm_resize || true
db_go || exit 0
db_get partman-partitioning/confirm_resize
open_dialog VIRTUAL $oldid
read_line virtual
close_dialog
[ "$RET" = 'true' ] || exit 0
if [ "$virtual" = no ]; then
db_set partman-partitioning/confirm_resize 'false'
db_fset partman-partitioning/confirm_resize seen false
db_input high partman-partitioning/confirm_resize || true
db_go || exit 0
db_get partman-partitioning/confirm_resize
[ "$RET" = 'true' ] || exit 0
fi
ask_for_size () {
local noninteractive
local noninteractive digits minmb
noninteractive=true
while true; do
newsize=''
......@@ -39,13 +44,37 @@ ask_for_size () {
noninteractive="return 1"
db_go || return 1
db_get partman-partitioning/new_size
if valid_human "$RET"; then
hnewsize="$RET"
newsize=$(human2longint "$hnewsize")
else
case "$RET" in
max)
newsize=$maxsize
;;
*%)
digits=$(expr "$RET" : '\([1-9][0-9]*\) *%$')
if [ "$digits" ]; then
minmb=$(expr 0000000"$minsize" : '0*\(..*\)......$')
newsize=$((((1 + $minmb) * (100 + $digits))/100))000000
fi
;;
*)
if valid_human "$RET"; then
newsize=$(human2longint "$RET")
fi
;;
esac
if [ -z "$newsize" ]; then
db_fset partman-partitioning/bad_new_size seen false
db_input high partman-partitioning/bad_new_size || true
db_go || true
elif ! longint_le "$newsize" "$maxsize"; then
db_fset partman-partitioning/big_new_size seen false
db_input high partman-partitioning/big_new_size || true
db_go || true
newsize=''
elif ! longint_le "$minsize" "$newsize"; then
db_fset partman-partitioning/small_new_size seen false
db_input high partman-partitioning/small_new_size || true
db_go || true
newsize=''
fi
done
if perform_resizing; then break; fi
......@@ -54,21 +83,23 @@ ask_for_size () {
}
perform_resizing () {
for s in /lib/partman/commit.d/*; do
if [ -x $s ]; then
$s || {
db_fset partman-partitioning/new_size_commit_failed seen false
db_input high partman-partitioning/new_size_commit_failed || true
db_go || true
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 100
fi
done
exit 100
}
fi
done
if [ "$virtual" = no ]; then
for s in /lib/partman/commit.d/*; do
if [ -x $s ]; then
$s || {
db_fset partman-partitioning/new_size_commit_failed seen false
db_input high partman-partitioning/new_size_commit_failed || true
db_go || true
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 100
fi
done
exit 100
}
fi
done
fi
name_progress_bar partman-partitioning/progress_resizing
open_dialog RESIZE_PARTITION $oldid $newsize
......@@ -80,11 +111,23 @@ perform_resizing () {
mkdir $newid
cp -r $oldid/* $newid/
fi
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 100
fi
done
if [ "$virtual" = no ]; then
for s in /lib/partman/init.d/*; do
if [ -x $s ]; then
$s || exit 100
fi
done
else
partitions=''
open_dialog PARTITIONS
while { read_line num part size type fs path name; [ "$part" ]; }; do
partitions="$partitions $part"
done
close_dialog
for part in $partitions; do
update_partition $dev $part
done
fi
}
ask_for_size
......
......@@ -33,13 +33,21 @@ write_line NO_MORE
close_dialog
partitions=''
numparts=1
open_dialog PARTITIONS
while { read_line num id size type fs path name; [ "$id" ]; }; do
[ "$fs" != free ] || continue
partitions="$partitions $id"
numparts=$(($numparts + 1))
done
close_dialog
db_progress START 0 $numparts partman/text/please_wait
db_progress INFO partman-partitioning/new_state
for id in $partitions; do
update_partition $dev $id
db_progress STEP 1
done
db_progress STOP
partman-partitioning (17) UNRELEASED; urgency=low
* Translators: do not modify this changelog to record changes you make to
po files. A record of your contributions will be added to the changelog
at package release time by the output-l10n-changes program.
* Anton Zinoviev
- rules: remove .svn directories from the package
- resizing:
1. do not allow sizes bigger or smaller than possible.
Thanks to Laurens Blankers, closes: #239208
2. accept "max" and "nn%" as shortcuts for the value of the new size
3. write changes to the storage device and resize the file system
in the partition only when the partition already exists in the
storage device. Thanks to Laurens Blankers and
dan_at_watson.ibm.com, closes: #239435, #239562
- new partition:
1. the default type is logical when the new partition is near
extended partition. Thanks to Joey Hess, closes: #235505.
2. better defaults for the new partition: usage method (format),
file system (ext3) and mount point (first unused from /, /home,
/usr, /tmp, /usr/local). The bootable flag is untouched
though. Thanks to Joey Hess and dan_at_watson.ibm.com,
closes: #235367, #239557.
3. in the main menu of partman the item for the new partition is
default
4. add progress bar while computing the new state (this happened
to be quiet slow...)
- active_partition/{delete,toggle_bootable}/do_option: add progress
bar while computing the new state
-- Anton Zinoviev <zinoviev@debian.org> Tue, 6 Apr 2004 00:34:21 +0300
partman-partitioning (16) unstable; urgency=low
* Updated translations:
......
......@@ -15,7 +15,7 @@ msgid ""
msgstr ""
"Project-Id-Version: partman_partman-partitioning\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-03-08 21:38-0500\n"
"POT-Creation-Date: 2004-04-01 12:13+0300\n"
"PO-Revision-Date: 2004-01-11 00:44+0300\n"
"Last-Translator: Ossama Khayat <okhayat@yahoo.com>\n"
"Language-Team: Arabic <support@arabeyes.org>\n"
......@@ -37,15 +37,22 @@ msgstr "جاري تغيير حجم التجزيء..."
msgid "Copying partition..."
msgstr "جاري نسخ التجزيء..."
#. Type: boolean
#. Type: text
#. Description
#: ../templates:11
#, fuzzy
msgid "Computing the new state of the partition table..."
msgstr "حدّد اسم التجزيء"
#. Type: boolean
#. Description
#: ../templates:15
msgid "Write the changes to the storage devices and copy the data?"
msgstr "هل أسجل التغييرات إلى أجهزة التخزين وأنسخ البيانات؟"
#. Type: boolean
#. Description
#: ../templates:11
#: ../templates:15
msgid ""
"Before the copy operation takes place, the changes have to be written to the "
"storage devices."
......@@ -53,7 +60,7 @@ msgstr "قبل أن تبدأ عملية النسخ، يجب أن تسجّل ال
#. Type: boolean
#. Description
#: ../templates:11
#: ../templates:15
msgid ""
"These changes cannot be undone. The copy operation cannot be undone also."
msgstr ""
......@@ -61,38 +68,38 @@ msgstr ""
#. Type: select
#. Description
#: ../templates:22
#: ../templates:26
msgid "Source partition:"
msgstr "التجزيء المصدر:"
#. Type: select
#. Description
#: ../templates:22
#: ../templates:26
msgid "Please choose the partition which contains the data you want to copy."
msgstr "رجاء اختر التجزيء الذي يحتوي البيانات التي تريد نسخها."
#. Type: error
#. Description
#: ../templates:27
#: ../templates:31
msgid "Copy operation failure"
msgstr "فشل في عملية النسخ"
#. Type: error
#. Description
#: ../templates:27
#: ../templates:31
msgid "The copy operation is aborted."
msgstr "أجهضت عملية النسخ."
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
#, fuzzy
msgid "Write the changes to the storage devices and resize the partition?"
msgstr "هل أسجّل التغييرات على أجهزة التخزين وأغير حجم التجزيئات؟"
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid ""
"Before the resize operation takes place, the changes have to be written to "
"the storage devices."
......@@ -101,7 +108,7 @@ msgstr ""
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid ""
"These changes cannot be undone. The resize operation cannot be undone also."
msgstr ""
......@@ -109,75 +116,97 @@ msgstr ""
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid "Please confirm whether you really want to perform these operations."
msgstr "رجاء أكّد ما إذا كنت تريد أن تقوم بهذه العمليات حقاً."
#. Type: string
#. Description
#: ../templates:45
#: ../templates:49
msgid ""
"The minimum size you can use is ${MINSIZE} and the maximum size is "
"${MAXSIZE}."
msgstr "أقل حجم يمكنك استخدامه هو ${MINSIZE} وأكبر حجم هو ${MAXSIZE}."
#. Type: string
#. Description
#: ../templates:49
#, no-c-format
msgid ""
"Hint: Use \"20%\" (or \"30%\", etc.) for 20% (resp. 30%, etc.) over the "
"minimal allowed size. Use \"max\" as a shortcut for the maximal allowed "
"size."
msgstr ""
#. Type: error
#. Description
#: ../templates:63
msgid "Too big size"
msgstr ""
#. Type: error
#. Description
#: ../templates:67
msgid "Too small size"
msgstr ""
#. Type: error
#. Description
#: ../templates:55
#: ../templates:71
msgid "Resize operation failure"
msgstr "فشل في عملية النسخ"
#. Type: error
#. Description
#: ../templates:55
#: ../templates:71
msgid "An error occurred while writing the changes to the storage devices."
msgstr "حدث خطأ خلال تسجيل التغييرات إلى أجهزة التخزين."
#. Type: error
#. Description
#: ../templates:55
#: ../templates:71
msgid "The resize operation is aborted."
msgstr "أجهضت عملية تغيير الحجم."
#. Type: string
#. Description
#: ../templates:63
#: ../templates:79
msgid "New partition size:"
msgstr "حجم التجزيء الجديد:"
#. Type: string
#. Description
#: ../templates:63
#: ../templates:79
msgid "The maximum size you can use is ${MAXSIZE}."
msgstr "الحجم الأقصى الذي يمكنك استخدامه هو ${MAXSIZE}."
#. Type: error
#. Description
#: ../templates:68
#: ../templates:84
msgid "Invalid size"
msgstr "حجم غير صالح"
#. Type: select
#. Choices
#: ../templates:72
#: ../templates:88
msgid "Beginning"
msgstr "البداية"
#. Type: select
#. Choices
#: ../templates:72
#: ../templates:88
msgid "End"
msgstr "النهاية"
#. Type: select
#. Description
#: ../templates:73
#: ../templates:89
msgid "Location for the new partition:"
msgstr "موقع التجزيء الجديد:"
#. Type: select
#. Description
#: ../templates:73
#: ../templates:89
msgid ""
"Please choose whether you want the new partition to be created at the "
"beginning or at the end of the available space."
......@@ -187,112 +216,112 @@ msgstr ""
#. Type: select
#. Description
#: ../templates:80
#: ../templates:96
msgid "File system for the new partition:"
msgstr "نظام الملفات للتجزيء الجديد:"
#. Type: select
#. Choices
#: ../templates:84
#: ../templates:100
msgid "Primary"
msgstr "أوّلي"
#. Type: select
#. Choices
#: ../templates:84
#: ../templates:100
msgid "Logical"
msgstr "منطقيّ"
#. Type: select
#. Description
#: ../templates:85
#: ../templates:101
msgid "Type for the new partition:"
msgstr "نوع التجزيء الجديد:"
#. Type: multiselect
#. Description
#: ../templates:90
#: ../templates:106
msgid "Flags for the new partition:"
msgstr "علامات التجزيء الجديد:"
#. Type: string
#. Description
#: ../templates:94
#: ../templates:110
msgid "Partition name:"
msgstr "اسم التجزيء:"
#. Type: select
#. Description
#: ../templates:99
#: ../templates:115
#, fuzzy
msgid "Partition table type:"
msgstr "اسم التجزيء:"
#. Type: select
#. Description
#: ../templates:99
#: ../templates:115
#, fuzzy
msgid "Select the type of partition table to use."
msgstr "حدّد اسم التجزيء"
#. Type: text
#. Description
#: ../templates:104
#: ../templates:120
msgid "Set the partition flags"
msgstr "حدّد علامات التجزيء"
#. Type: text
#. Description
#: ../templates:108
#: ../templates:124
msgid "Name:"
msgstr ""
#. Type: text
#. Description
#: ../templates:112
#: ../templates:128
#, fuzzy
msgid "Bootable flag:"
msgstr "بدّل علامة الإقلاع إلى on"
#. Type: text
#. Description
#: ../templates:116
#: ../templates:132
msgid "on"
msgstr ""
#. Type: text
#. Description
#: ../templates:120
#: ../templates:136
msgid "off"
msgstr ""
#. Type: text
#. Description
#: ../templates:124
#: ../templates:140
msgid "Size:"
msgstr ""
#. Type: text
#. Description
#: ../templates:128
#: ../templates:144
msgid "Copy data from another partition"
msgstr "انسخ البيانات من تجزيء آخر"
#. Type: text
#. Description
#: ../templates:132
#: ../templates:148
msgid "Delete the partition"
msgstr "احذف التجزيء"
#. Type: text
#. Description
#: ../templates:136
#: ../templates:152
msgid "Create a new partition"
msgstr "أنشئ تجزيء جديد"
#. Type: text
#. Description
#: ../templates:140
#: ../templates:156
msgid "Create a new empty partition table on this device"
msgstr "أنشئ جدول تجزئة فارغ على هذا الجهاز"
......
......@@ -14,7 +14,7 @@ msgid ""
msgstr ""
"Project-Id-Version: debian-installer\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2004-03-08 21:38-0500\n"
"POT-Creation-Date: 2004-04-01 12:13+0300\n"
"PO-Revision-Date: 2004-03-12 11:42+0200\n"
"Last-Translator: Ognyan Kulev <ogi@fmi.uni-sofia.bg>\n"
"Language-Team: Bulgarian <dict@linux.zonebg.com>\n"
......@@ -34,15 +34,22 @@ msgstr "Променя се големината на дяла..."
msgid "Copying partition..."
msgstr "Дялът се копира..."
#. Type: boolean
#. Type: text
#. Description
#: ../templates:11
#, fuzzy
msgid "Computing the new state of the partition table..."
msgstr "Изберете тип на таблицата на дялове, който да бъде използван."
#. Type: boolean
#. Description
#: ../templates:15
msgid "Write the changes to the storage devices and copy the data?"
msgstr "Да се запишат ли промените на диска, а данните да се копират?"
#. Type: boolean
#. Description
#: ../templates:11
#: ../templates:15
msgid ""
"Before the copy operation takes place, the changes have to be written to the "
"storage devices."
......@@ -51,45 +58,45 @@ msgstr ""
#. Type: boolean
#. Description
#: ../templates:11
#: ../templates:15
msgid ""
"These changes cannot be undone. The copy operation cannot be undone also."
msgstr "Тези промени не могат да бъдат отменени по-късно. Копирането също."
#. Type: select
#. Description
#: ../templates:22
#: ../templates:26
msgid "Source partition:"
msgstr "Дял-източник:"
#. Type: select
#. Description
#: ../templates:22
#: ../templates:26
msgid "Please choose the partition which contains the data you want to copy."
msgstr "Моля, изберете дяла, който съдържа данните, които искате да копирате."
#. Type: error
#. Description
#: ../templates:27
#: ../templates:31
msgid "Copy operation failure"
msgstr "Грешка при копиране"
#. Type: error
#. Description
#: ../templates:27
#: ../templates:31
msgid "The copy operation is aborted."
msgstr "Копирането е прекъснато."
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid "Write the changes to the storage devices and resize the partition?"
msgstr ""
"Да се запазят ли промените на диска, а големината на дяла да се промени?"
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid ""
"Before the resize operation takes place, the changes have to be written to "
"the storage devices."
......@@ -99,20 +106,20 @@ msgstr ""
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid ""
"These changes cannot be undone. The resize operation cannot be undone also."
msgstr "Тези промени не могат да бъдат отменени. Промяната на големината също."
#. Type: boolean
#. Description
#: ../templates:34
#: ../templates:38
msgid "Please confirm whether you really want to perform these operations."
msgstr "Моля, потвърдете дали наистина искате да извършите тези операции."
#. Type: string
#. Description
#: ../templates:45
#: ../templates:49
msgid ""
"The minimum size you can use is ${MINSIZE} and the maximum size is "
"${MAXSIZE}."
......@@ -120,63 +127,85 @@ msgstr ""
"Най-малката големина, която може да използвате, е ${MINSIZE}, а най-голямата "
"е ${MAXSIZE}."
#. Type: string
#. Description
#: ../templates:49
#, no-c-format
msgid ""
"Hint: Use \"20%\" (or \"30%\", etc.) for 20% (resp. 30%, etc.) over the "
"minimal allowed size. Use \"max\" as a shortcut for the maximal allowed "
"size."
msgstr ""
#. Type: error
#. Description
#: ../templates:63
msgid "Too big size"
msgstr ""
#. Type: error
#. Description
#: ../templates:55
#: ../templates:67
msgid "Too small size"
msgstr ""
#. Type: error
#. Description
#: ../templates:71
msgid "Resize operation failure"
msgstr "Грешка при промяна на големината"
#. Type: error
#. Description
#: ../templates:55
#: ../templates:71
msgid "An error occurred while writing the changes to the storage devices."
msgstr "Получена бе грешка при записване на промените на дисковете."
#. Type: error
#. Description
#: ../templates:55
#: ../templates:71
msgid "The resize operation is aborted."
msgstr "Промяната на големината е прекъсната."
#. Type: string
#. Description
#: ../templates:63
#: ../templates:79
msgid "New partition size:"
msgstr "Нова големина на дял:"
#. Type: string
#. Description
#: ../templates:63
#: ../templates:79
msgid "The maximum size you can use is ${MAXSIZE}."
msgstr "Максималната големина, която може да използвате, е ${MAXSIZE}."
#. Type: error
#. Description
#: ../templates:68
#: ../templates:84
msgid "Invalid size"
msgstr "Неправилна големина"
#. Type: select
#. Choices
#: ../templates:72
#: ../templates:88
msgid "Beginning"
msgstr "В началото"
#. Type: select
#. Choices
#: ../templates:72
#: ../templates:88
msgid "End"
msgstr "В края"
#. Type: select
#. Description
#: ../templates:73
#: ../templates:89
msgid "Location for the new partition:"
msgstr "Място на новия дял:"
#. Type: select
#. Description
#: ../templates:73
#: ../templates:89
msgid ""
"Please choose whether you want the new partition to be created at the "
"beginning or at the end of the available space."
......@@ -186,109 +215,109 @@ msgstr ""
#. Type: select
#. Description
#: ../templates:80
#: ../templates:96
msgid "File system for the new partition:"
msgstr "Файлова система на новия дял:"
#. Type: select
#. Choices
#: ../templates:84
#: ../templates:100
msgid "Primary"
msgstr "Главен"