Browse Source

updated vbootstrap: supported versions format: <version>_<arch>; updated vbuilder.sh.in: sync the above change for vbootstrap

git-svn-id: http://trac.vinelinux.org/repos/projects/vbootstrap/trunk@3676 ec354946-7b23-47d6-9f5a-488ba84defc7
munepi 11 years ago
parent
commit
7f41e9839f

+ 1 - 41
libvbuilder.sh.in

@@ -64,6 +64,7 @@ setup-vbootstrap(){
 
 	## check debug mode
 	[ ${with_debug} -eq 1 ] && \
+	    cat $VBUILDER_CONF && \
 	    set && set -x
 
 	## check some directories
@@ -204,7 +205,6 @@ setup-vbootstrap(){
     UNIONFS_ROOT=${UNIONFS_DIR}/${VERSION}
     ARCHIVES_DIR=${BUILD_ROOT}/var/cache/apt/archives
     EXTERNAL_ARCHIVES_DIR=${CACHE_DIR}/${VERSION}/apt/archives
-    VBUILDER_LOG=${BUILD_ROOT}/var/log/vbuilder.log
 
     __chroot_sh="/usr/sbin/chroot ${BUILD_ROOT} /bin/sh -c -l"
 
@@ -375,44 +375,4 @@ mount-chroot-mount(){
     return 0
 }
 
-write-vbuilder-log(){
-    HRULE="======================================================================"
-
-    [ -d ${BUILD_ROOT} ] || return 1
-
-    if [ ! -f $VBUILDER_LOG ]; then
-	cat<<EOF > $VBUILDER_LOG
-${HRULE}
-VBUILDER REPORT
-DATE:		$(LANG=C date)
-HOSTNAME:	$(hostname)
-OS:		$(echo $($__chroot_sh "cat /etc/vine-release"))
-%_arch:		$(echo $($__chroot_sh "rpm --eval %_arch"))
-
---version: ${VERSION}
-$(echo $([ -z "${VARCH}" ] || echo "--arch: ${VARCH}"))
-$(echo $([ -z "${CATEGORIES}" ] || echo "--category: ${CATEGORIES}"))
-$(echo $([ $with_dist_upgrade -eq 1 ] && echo "--dist-upgrade"))
-$(echo $([ $with_unionfs -eq 1 ] && echo "--unionfs"))
-$(echo $([ -z "${TARGET}" ] || echo "--target: ${TARGET}"))
---bootstrap-dir: ${VBOOTSTRAP_DIR}
---unionfs-dir: ${UNIONFS_DIR}
---cache-dir: ${CACHE_DIR}
---built-rpms-dir: ${BUILT_RPMS_DIR}
-${HRULE}
-
-[$VBUILDER_CONF]
-$(cat $VBUILDER_CONF)
-
-[History]
-EOF
-    else
-	cat<<EOF >> $VBUILDER_LOG
-$*
-EOF
-    fi
-
-    return 0
-}
-
 ### end of file

+ 7 - 3
po/POTFILES.in

@@ -1,9 +1,13 @@
 # List of source files containing translatable strings.
 vbootstrap.sh.in
 vbuilder.sh.in
-vbootstrap/scripts/4.2.sh
 vbootstrap/scripts/4.2_i386.sh
-vbootstrap/scripts/5.2.sh
+vbootstrap/scripts/4.2_ppc.sh
 vbootstrap/scripts/5.2_i386.sh
-vbootstrap/scripts/VineSeed.sh
+vbootstrap/scripts/5.2_x86_64.sh
+vbootstrap/scripts/5.2_ppc.sh
+vbootstrap/scripts/5.2_arm.sh
 vbootstrap/scripts/VineSeed_i386.sh
+vbootstrap/scripts/VineSeed_x86_64.sh
+vbootstrap/scripts/VineSeed_ppc.sh
+vbootstrap/scripts/VineSeed_arm.sh

+ 84 - 55
po/ja.po

@@ -5,10 +5,10 @@
 #
 msgid ""
 msgstr ""
-"Project-Id-Version: 0.0.41\n"
+"Project-Id-Version: 0.0.43\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-09 23:09+0900\n"
-"PO-Revision-Date: 2011-04-09 23:11+0900\n"
+"POT-Creation-Date: 2011-04-23 21:05+0900\n"
+"PO-Revision-Date: 2011-04-23 21:10+0900\n"
 "Last-Translator: Munehiro Yamamoto <munepi@vinelinux.org>\n"
 "Language-Team: Vine Linux <Vine@vinelinux.org>\n"
 "Language: \n"
@@ -38,38 +38,44 @@ msgstr "ベースシステムをインストールしています。"
 msgid "vboostrap done."
 msgstr "vbootstrap が完了しました。"
 
-#: vbuilder.sh.in:77 vbuilder.sh.in:84
+#: vbuilder.sh.in:70 vbuilder.sh.in:77
 msgid "E: You can give no more options after actions"
 msgstr "E: 動作の以後にオプションを与えられません"
 
-#: vbuilder.sh.in:96 vbuilder.sh.in:110 vbuilder.sh.in:113
+#: vbuilder.sh.in:89 vbuilder.sh.in:103 vbuilder.sh.in:106
 msgid "E: Missing some parameters after $1"
 msgstr "E: $1 以後のいくつかの引数に間違いがあります"
 
-#: vbuilder.sh.in:104
+#: vbuilder.sh.in:97
 msgid "E: You must give at least one action"
 msgstr "E: 少なくとも1つの動作を与えなければなりません"
 
-#: vbuilder.sh.in:124
+#: vbuilder.sh.in:117
 #, sh-format
 msgid "W: \\$SUDO_USER and \\$USERHELPER_UID are empty"
 msgstr "W: \\$SUDO_USER と \\$USERHELPER_UID は空です"
 
-#: vbuilder.sh.in:209 vbuilder.sh.in:213
-msgid "E: arch ${VARCH} is NOT supported on $(uname -i)"
-msgstr "E: ${VARCH} アーキテクチャは $(uname -i) 上で非サポートです"
+#: vbuilder.sh.in:196
+#, sh-format
+msgid "E: ${VERSION} is NOT supported"
+msgstr "E: バージョン ${VERSION} は非サポートです"
 
-#: vbuilder.sh.in:217
+#: vbuilder.sh.in:214 vbuilder.sh.in:218 vbuilder.sh.in:222
 #, sh-format
 msgid "E: arch ${VARCH} is NOT supported on ${UARCH}"
 msgstr "E: ${VARCH} アーキテクチャは ${UARCH} 上で非サポートです"
 
-#: vbuilder.sh.in:224 vbuilder.sh.in:230 vbuilder.sh.in:245
+#: vbuilder.sh.in:230
 #, sh-format
-msgid "E: ${VERSION} is NOT supported"
-msgstr "E: バージョン ${VERSION} は非サポートです"
+msgid "E: ${VERSION}_${VARCH} is NOT supported"
+msgstr "E: ${VERSION}_${ARCH} は非サポートです"
 
-#: vbuilder.sh.in:252
+#: vbuilder.sh.in:240
+#, sh-format
+msgid "E: ${PROFILE} is NOT supported"
+msgstr "E: ${PROFILE} は非サポートです"
+
+#: vbuilder.sh.in:247
 #, sh-format
 msgid "E: version ${VERSION} does not support --dist-upgrade option"
 msgstr ""
@@ -79,120 +85,143 @@ msgstr ""
 #. # "test" category only exists in VineSeed
 #. #!! "proposed-updates" category does not exist in 4.2
 #. # "security" category does not exist in VineSeed
-#: vbuilder.sh.in:277 vbuilder.sh.in:283 vbuilder.sh.in:290 vbuilder.sh.in:294
+#: vbuilder.sh.in:273 vbuilder.sh.in:279 vbuilder.sh.in:286 vbuilder.sh.in:290
 #, sh-format
 msgid "E: No such category exists: $cat"
 msgstr "E: そのようなカテゴリは存在しません: $cat"
 
-#: vbuilder.sh.in:303
+#: vbuilder.sh.in:299
 #, sh-format
 msgid "E: rpm build target ${TARGET} is NOT supported"
 msgstr "E: rpm ビルドターゲット ${TARGET} はサポートされていません"
 
-#: vbuilder.sh.in:356
+#: vbuilder.sh.in:351
 msgid "apt-get update on host ... "
 msgstr "ホスト上で apt-get update を実行しています ... "
 
-#: vbuilder.sh.in:358 vbuilder.sh.in:363 vbuilder.sh.in:399 vbuilder.sh.in:419
-#: vbuilder.sh.in:555 vbuilder.sh.in:562 vbuilder.sh.in:777
+#: vbuilder.sh.in:353 vbuilder.sh.in:358 vbuilder.sh.in:394 vbuilder.sh.in:414
+#: vbuilder.sh.in:511 vbuilder.sh.in:518 vbuilder.sh.in:715
 msgid "done."
 msgstr "完了"
 
-#: vbuilder.sh.in:361
+#: vbuilder.sh.in:356
 msgid "apt-get update on chroot ... "
 msgstr "chroot 上で apt-get update を実行しています ... "
 
-#: vbuilder.sh.in:397
+#: vbuilder.sh.in:392
 #, sh-format
 msgid "Retry lazy unmount ${BUILD_ROOT}${fs} ... "
 msgstr "lazy で ${BUILD_ROOT}${fs} を再度アンマウントしています ... "
 
-#: vbuilder.sh.in:417
+#: vbuilder.sh.in:412
 #, sh-format
 msgid "Retry lazy unmount ${BUILD_ROOT} ... "
 msgstr "lazy で ${BUILD_ROOT} を再度アンマウントしています ... "
 
-#: vbuilder.sh.in:552
+#: vbuilder.sh.in:508
 #, sh-format
 msgid "Cleaning build root ${UNIONFS_ROOT} via unionfs ... "
 msgstr "unionfs 経由でビルドルート ${UNIONFS_ROOT} をクリーニング中 ... "
 
-#: vbuilder.sh.in:559
+#: vbuilder.sh.in:515
 #, sh-format
 msgid "Cleaning build root ${BUILD_ROOT} ... "
 msgstr "ビルドルート ${BUILD_ROOT} をクリーニング中 ... "
 
-#: vbuilder.sh.in:566
+#: vbuilder.sh.in:522
 #, sh-format
-msgid "Cleanup a build farm for ${VERSION} done."
-msgstr "${VERSION} のビルドファームをクリーンアップしました。"
+msgid "Cleanup a build farm for ${PROFILE} done."
+msgstr "${PROFILE} のビルドファームをクリーンアップしました。"
 
-#: vbuilder.sh.in:662
+#: vbuilder.sh.in:614
 #, sh-format
-msgid "Making a build farm for ${VERSION} done."
-msgstr "${VERSION} のビルドファームを構築しました。"
+msgid "Making a build farm for ${PROFILE} done."
+msgstr "${PROFILE} のビルドファームを構築しました。"
 
-#: vbuilder.sh.in:684
+#: vbuilder.sh.in:628
 #, sh-format
 msgid "E: $RPM_PKG is not a package name"
 msgstr "E: $RPM_PKG はパッケージ名でありません"
 
-#: vbuilder.sh.in:733
+#: vbuilder.sh.in:673
 #, sh-format
 msgid "E: $RPM_PKG is not a source RPM package"
 msgstr "E: $RPM_PKG はソース RPM パッケージでありません"
 
 #. # copy built rpms to ${HOME}/rpm/ for each archtectures
-#: vbuilder.sh.in:756
+#: vbuilder.sh.in:696
 #, sh-format
 msgid "Copying built rpms to ${BUILT_RPMS_DIR} for each archtectures ... "
 msgstr ""
 "各アーキテクチャに対して、ビルドされた rpm ファイルを ${BUILT_RPMS_DIR} にコ"
 "ピーしています ... "
 
-#: vbuilder.sh.in:790
+#: vbuilder.sh.in:728
 #, sh-format
 msgid "Signing built rpms using ${RPM_SIGN_USER}'s key: "
 msgstr "${RPM_SIGN_USER} の鍵を用いてビルドされた rpm ファイルを署名します: "
 
-#: vbootstrap/scripts/4.2.sh:9 vbootstrap/scripts/4.2_i386.sh:9
-#: vbootstrap/scripts/5.2.sh:9 vbootstrap/scripts/5.2_i386.sh:9
-#: vbootstrap/scripts/VineSeed.sh:9 vbootstrap/scripts/VineSeed_i386.sh:9
+#: vbootstrap/scripts/4.2_i386.sh:9 vbootstrap/scripts/4.2_ppc.sh:9
+#: vbootstrap/scripts/5.2_i386.sh:9 vbootstrap/scripts/5.2_x86_64.sh:9
+#: vbootstrap/scripts/5.2_ppc.sh:9 vbootstrap/scripts/5.2_arm.sh:9
+#: vbootstrap/scripts/VineSeed_i386.sh:9
+#: vbootstrap/scripts/VineSeed_x86_64.sh:9
+#: vbootstrap/scripts/VineSeed_ppc.sh:9 vbootstrap/scripts/VineSeed_arm.sh:9
 #, sh-format
 msgid "running vbootstrap post install scripts for $INSTVER on $INSTDIR"
 msgstr ""
 "$INSTDIR において $INSTVER に対する vbootstrap の後処理を実行しています。"
 
-#: vbootstrap/scripts/4.2.sh:12 vbootstrap/scripts/4.2_i386.sh:12
-#: vbootstrap/scripts/5.2.sh:12 vbootstrap/scripts/5.2_i386.sh:12
-#: vbootstrap/scripts/VineSeed.sh:12 vbootstrap/scripts/VineSeed_i386.sh:12
+#: vbootstrap/scripts/4.2_i386.sh:12 vbootstrap/scripts/4.2_ppc.sh:12
+#: vbootstrap/scripts/5.2_i386.sh:12 vbootstrap/scripts/5.2_x86_64.sh:12
+#: vbootstrap/scripts/5.2_ppc.sh:12 vbootstrap/scripts/5.2_arm.sh:12
+#: vbootstrap/scripts/VineSeed_i386.sh:12
+#: vbootstrap/scripts/VineSeed_x86_64.sh:12
+#: vbootstrap/scripts/VineSeed_ppc.sh:12 vbootstrap/scripts/VineSeed_arm.sh:12
 msgid " reinitializing rpm database... "
 msgstr " RPM データベースを再初期化しています。"
 
-#: vbootstrap/scripts/4.2.sh:14 vbootstrap/scripts/4.2.sh:17
-#: vbootstrap/scripts/4.2.sh:20 vbootstrap/scripts/4.2_i386.sh:14
-#: vbootstrap/scripts/4.2_i386.sh:17 vbootstrap/scripts/4.2_i386.sh:20
-#: vbootstrap/scripts/5.2.sh:14 vbootstrap/scripts/5.2.sh:17
-#: vbootstrap/scripts/5.2.sh:20 vbootstrap/scripts/5.2_i386.sh:14
-#: vbootstrap/scripts/5.2_i386.sh:17 vbootstrap/scripts/5.2_i386.sh:20
-#: vbootstrap/scripts/VineSeed.sh:14 vbootstrap/scripts/VineSeed.sh:17
-#: vbootstrap/scripts/VineSeed.sh:20 vbootstrap/scripts/VineSeed_i386.sh:14
+#: vbootstrap/scripts/4.2_i386.sh:14 vbootstrap/scripts/4.2_i386.sh:17
+#: vbootstrap/scripts/4.2_i386.sh:20 vbootstrap/scripts/4.2_ppc.sh:14
+#: vbootstrap/scripts/4.2_ppc.sh:17 vbootstrap/scripts/4.2_ppc.sh:20
+#: vbootstrap/scripts/5.2_i386.sh:14 vbootstrap/scripts/5.2_i386.sh:17
+#: vbootstrap/scripts/5.2_i386.sh:20 vbootstrap/scripts/5.2_x86_64.sh:14
+#: vbootstrap/scripts/5.2_x86_64.sh:17 vbootstrap/scripts/5.2_x86_64.sh:20
+#: vbootstrap/scripts/5.2_ppc.sh:14 vbootstrap/scripts/5.2_ppc.sh:17
+#: vbootstrap/scripts/5.2_ppc.sh:20 vbootstrap/scripts/5.2_arm.sh:14
+#: vbootstrap/scripts/5.2_arm.sh:17 vbootstrap/scripts/5.2_arm.sh:20
+#: vbootstrap/scripts/VineSeed_i386.sh:14
 #: vbootstrap/scripts/VineSeed_i386.sh:17
 #: vbootstrap/scripts/VineSeed_i386.sh:20
+#: vbootstrap/scripts/VineSeed_x86_64.sh:14
+#: vbootstrap/scripts/VineSeed_x86_64.sh:17
+#: vbootstrap/scripts/VineSeed_x86_64.sh:20
+#: vbootstrap/scripts/VineSeed_ppc.sh:14 vbootstrap/scripts/VineSeed_ppc.sh:17
+#: vbootstrap/scripts/VineSeed_ppc.sh:20 vbootstrap/scripts/VineSeed_arm.sh:14
+#: vbootstrap/scripts/VineSeed_arm.sh:17 vbootstrap/scripts/VineSeed_arm.sh:20
 msgid "DONE."
 msgstr "完了"
 
-#: vbootstrap/scripts/4.2.sh:15 vbootstrap/scripts/4.2_i386.sh:15
-#: vbootstrap/scripts/5.2.sh:15 vbootstrap/scripts/5.2_i386.sh:15
-#: vbootstrap/scripts/VineSeed.sh:15 vbootstrap/scripts/VineSeed_i386.sh:15
+#: vbootstrap/scripts/4.2_i386.sh:15 vbootstrap/scripts/4.2_ppc.sh:15
+#: vbootstrap/scripts/5.2_i386.sh:15 vbootstrap/scripts/5.2_x86_64.sh:15
+#: vbootstrap/scripts/5.2_ppc.sh:15 vbootstrap/scripts/5.2_arm.sh:15
+#: vbootstrap/scripts/VineSeed_i386.sh:15
+#: vbootstrap/scripts/VineSeed_x86_64.sh:15
+#: vbootstrap/scripts/VineSeed_ppc.sh:15 vbootstrap/scripts/VineSeed_arm.sh:15
 msgid " updating apt database... "
 msgstr " apt データベースを更新しています ... "
 
-#: vbootstrap/scripts/4.2.sh:18 vbootstrap/scripts/4.2_i386.sh:18
-#: vbootstrap/scripts/5.2.sh:18 vbootstrap/scripts/5.2_i386.sh:18
-#: vbootstrap/scripts/VineSeed.sh:18 vbootstrap/scripts/VineSeed_i386.sh:18
+#: vbootstrap/scripts/4.2_i386.sh:18 vbootstrap/scripts/4.2_ppc.sh:18
+#: vbootstrap/scripts/5.2_i386.sh:18 vbootstrap/scripts/5.2_x86_64.sh:18
+#: vbootstrap/scripts/5.2_ppc.sh:18 vbootstrap/scripts/5.2_arm.sh:18
+#: vbootstrap/scripts/VineSeed_i386.sh:18
+#: vbootstrap/scripts/VineSeed_x86_64.sh:18
+#: vbootstrap/scripts/VineSeed_ppc.sh:18 vbootstrap/scripts/VineSeed_arm.sh:18
 msgid " rebuilding rpm database with chroot rpm... "
 msgstr " chroot 上の rpm で RPM データベースを再構築しています ... "
 
+#~ msgid "E: arch ${VARCH} is NOT supported on $(uname -i)"
+#~ msgstr "E: ${VARCH} アーキテクチャは $(uname -i) 上で非サポートです"
+
 #~ msgid "The root privilege is required."
 #~ msgstr "root 権限が要求されます"

+ 75 - 49
po/vbootstrap.pot

@@ -8,7 +8,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
 "Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2011-04-09 23:09+0900\n"
+"POT-Creation-Date: 2011-04-23 21:05+0900\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -38,38 +38,44 @@ msgstr ""
 msgid "vboostrap done."
 msgstr ""
 
-#: vbuilder.sh.in:77 vbuilder.sh.in:84
+#: vbuilder.sh.in:70 vbuilder.sh.in:77
 msgid "E: You can give no more options after actions"
 msgstr ""
 
-#: vbuilder.sh.in:96 vbuilder.sh.in:110 vbuilder.sh.in:113
+#: vbuilder.sh.in:89 vbuilder.sh.in:103 vbuilder.sh.in:106
 msgid "E: Missing some parameters after $1"
 msgstr ""
 
-#: vbuilder.sh.in:104
+#: vbuilder.sh.in:97
 msgid "E: You must give at least one action"
 msgstr ""
 
-#: vbuilder.sh.in:124
+#: vbuilder.sh.in:117
 #, sh-format
 msgid "W: \\$SUDO_USER and \\$USERHELPER_UID are empty"
 msgstr ""
 
-#: vbuilder.sh.in:209 vbuilder.sh.in:213
-msgid "E: arch ${VARCH} is NOT supported on $(uname -i)"
+#: vbuilder.sh.in:196
+#, sh-format
+msgid "E: ${VERSION} is NOT supported"
 msgstr ""
 
-#: vbuilder.sh.in:217
+#: vbuilder.sh.in:214 vbuilder.sh.in:218 vbuilder.sh.in:222
 #, sh-format
 msgid "E: arch ${VARCH} is NOT supported on ${UARCH}"
 msgstr ""
 
-#: vbuilder.sh.in:224 vbuilder.sh.in:230 vbuilder.sh.in:245
+#: vbuilder.sh.in:230
 #, sh-format
-msgid "E: ${VERSION} is NOT supported"
+msgid "E: ${VERSION}_${VARCH} is NOT supported"
+msgstr ""
+
+#: vbuilder.sh.in:240
+#, sh-format
+msgid "E: ${PROFILE} is NOT supported"
 msgstr ""
 
-#: vbuilder.sh.in:252
+#: vbuilder.sh.in:247
 #, sh-format
 msgid "E: version ${VERSION} does not support --dist-upgrade option"
 msgstr ""
@@ -77,114 +83,134 @@ msgstr ""
 #. # "test" category only exists in VineSeed
 #. #!! "proposed-updates" category does not exist in 4.2
 #. # "security" category does not exist in VineSeed
-#: vbuilder.sh.in:277 vbuilder.sh.in:283 vbuilder.sh.in:290 vbuilder.sh.in:294
+#: vbuilder.sh.in:273 vbuilder.sh.in:279 vbuilder.sh.in:286 vbuilder.sh.in:290
 #, sh-format
 msgid "E: No such category exists: $cat"
 msgstr ""
 
-#: vbuilder.sh.in:303
+#: vbuilder.sh.in:299
 #, sh-format
 msgid "E: rpm build target ${TARGET} is NOT supported"
 msgstr ""
 
-#: vbuilder.sh.in:356
+#: vbuilder.sh.in:351
 msgid "apt-get update on host ... "
 msgstr ""
 
-#: vbuilder.sh.in:358 vbuilder.sh.in:363 vbuilder.sh.in:399 vbuilder.sh.in:419
-#: vbuilder.sh.in:555 vbuilder.sh.in:562 vbuilder.sh.in:777
+#: vbuilder.sh.in:353 vbuilder.sh.in:358 vbuilder.sh.in:394 vbuilder.sh.in:414
+#: vbuilder.sh.in:511 vbuilder.sh.in:518 vbuilder.sh.in:715
 msgid "done."
 msgstr ""
 
-#: vbuilder.sh.in:361
+#: vbuilder.sh.in:356
 msgid "apt-get update on chroot ... "
 msgstr ""
 
-#: vbuilder.sh.in:397
+#: vbuilder.sh.in:392
 #, sh-format
 msgid "Retry lazy unmount ${BUILD_ROOT}${fs} ... "
 msgstr ""
 
-#: vbuilder.sh.in:417
+#: vbuilder.sh.in:412
 #, sh-format
 msgid "Retry lazy unmount ${BUILD_ROOT} ... "
 msgstr ""
 
-#: vbuilder.sh.in:552
+#: vbuilder.sh.in:508
 #, sh-format
 msgid "Cleaning build root ${UNIONFS_ROOT} via unionfs ... "
 msgstr ""
 
-#: vbuilder.sh.in:559
+#: vbuilder.sh.in:515
 #, sh-format
 msgid "Cleaning build root ${BUILD_ROOT} ... "
 msgstr ""
 
-#: vbuilder.sh.in:566
+#: vbuilder.sh.in:522
 #, sh-format
-msgid "Cleanup a build farm for ${VERSION} done."
+msgid "Cleanup a build farm for ${PROFILE} done."
 msgstr ""
 
-#: vbuilder.sh.in:662
+#: vbuilder.sh.in:614
 #, sh-format
-msgid "Making a build farm for ${VERSION} done."
+msgid "Making a build farm for ${PROFILE} done."
 msgstr ""
 
-#: vbuilder.sh.in:684
+#: vbuilder.sh.in:628
 #, sh-format
 msgid "E: $RPM_PKG is not a package name"
 msgstr ""
 
-#: vbuilder.sh.in:733
+#: vbuilder.sh.in:673
 #, sh-format
 msgid "E: $RPM_PKG is not a source RPM package"
 msgstr ""
 
 #. # copy built rpms to ${HOME}/rpm/ for each archtectures
-#: vbuilder.sh.in:756
+#: vbuilder.sh.in:696
 #, sh-format
 msgid "Copying built rpms to ${BUILT_RPMS_DIR} for each archtectures ... "
 msgstr ""
 
-#: vbuilder.sh.in:790
+#: vbuilder.sh.in:728
 #, sh-format
 msgid "Signing built rpms using ${RPM_SIGN_USER}'s key: "
 msgstr ""
 
-#: vbootstrap/scripts/4.2.sh:9 vbootstrap/scripts/4.2_i386.sh:9
-#: vbootstrap/scripts/5.2.sh:9 vbootstrap/scripts/5.2_i386.sh:9
-#: vbootstrap/scripts/VineSeed.sh:9 vbootstrap/scripts/VineSeed_i386.sh:9
+#: vbootstrap/scripts/4.2_i386.sh:9 vbootstrap/scripts/4.2_ppc.sh:9
+#: vbootstrap/scripts/5.2_i386.sh:9 vbootstrap/scripts/5.2_x86_64.sh:9
+#: vbootstrap/scripts/5.2_ppc.sh:9 vbootstrap/scripts/5.2_arm.sh:9
+#: vbootstrap/scripts/VineSeed_i386.sh:9
+#: vbootstrap/scripts/VineSeed_x86_64.sh:9
+#: vbootstrap/scripts/VineSeed_ppc.sh:9 vbootstrap/scripts/VineSeed_arm.sh:9
 #, sh-format
 msgid "running vbootstrap post install scripts for $INSTVER on $INSTDIR"
 msgstr ""
 
-#: vbootstrap/scripts/4.2.sh:12 vbootstrap/scripts/4.2_i386.sh:12
-#: vbootstrap/scripts/5.2.sh:12 vbootstrap/scripts/5.2_i386.sh:12
-#: vbootstrap/scripts/VineSeed.sh:12 vbootstrap/scripts/VineSeed_i386.sh:12
+#: vbootstrap/scripts/4.2_i386.sh:12 vbootstrap/scripts/4.2_ppc.sh:12
+#: vbootstrap/scripts/5.2_i386.sh:12 vbootstrap/scripts/5.2_x86_64.sh:12
+#: vbootstrap/scripts/5.2_ppc.sh:12 vbootstrap/scripts/5.2_arm.sh:12
+#: vbootstrap/scripts/VineSeed_i386.sh:12
+#: vbootstrap/scripts/VineSeed_x86_64.sh:12
+#: vbootstrap/scripts/VineSeed_ppc.sh:12 vbootstrap/scripts/VineSeed_arm.sh:12
 msgid " reinitializing rpm database... "
 msgstr ""
 
-#: vbootstrap/scripts/4.2.sh:14 vbootstrap/scripts/4.2.sh:17
-#: vbootstrap/scripts/4.2.sh:20 vbootstrap/scripts/4.2_i386.sh:14
-#: vbootstrap/scripts/4.2_i386.sh:17 vbootstrap/scripts/4.2_i386.sh:20
-#: vbootstrap/scripts/5.2.sh:14 vbootstrap/scripts/5.2.sh:17
-#: vbootstrap/scripts/5.2.sh:20 vbootstrap/scripts/5.2_i386.sh:14
-#: vbootstrap/scripts/5.2_i386.sh:17 vbootstrap/scripts/5.2_i386.sh:20
-#: vbootstrap/scripts/VineSeed.sh:14 vbootstrap/scripts/VineSeed.sh:17
-#: vbootstrap/scripts/VineSeed.sh:20 vbootstrap/scripts/VineSeed_i386.sh:14
+#: vbootstrap/scripts/4.2_i386.sh:14 vbootstrap/scripts/4.2_i386.sh:17
+#: vbootstrap/scripts/4.2_i386.sh:20 vbootstrap/scripts/4.2_ppc.sh:14
+#: vbootstrap/scripts/4.2_ppc.sh:17 vbootstrap/scripts/4.2_ppc.sh:20
+#: vbootstrap/scripts/5.2_i386.sh:14 vbootstrap/scripts/5.2_i386.sh:17
+#: vbootstrap/scripts/5.2_i386.sh:20 vbootstrap/scripts/5.2_x86_64.sh:14
+#: vbootstrap/scripts/5.2_x86_64.sh:17 vbootstrap/scripts/5.2_x86_64.sh:20
+#: vbootstrap/scripts/5.2_ppc.sh:14 vbootstrap/scripts/5.2_ppc.sh:17
+#: vbootstrap/scripts/5.2_ppc.sh:20 vbootstrap/scripts/5.2_arm.sh:14
+#: vbootstrap/scripts/5.2_arm.sh:17 vbootstrap/scripts/5.2_arm.sh:20
+#: vbootstrap/scripts/VineSeed_i386.sh:14
 #: vbootstrap/scripts/VineSeed_i386.sh:17
 #: vbootstrap/scripts/VineSeed_i386.sh:20
+#: vbootstrap/scripts/VineSeed_x86_64.sh:14
+#: vbootstrap/scripts/VineSeed_x86_64.sh:17
+#: vbootstrap/scripts/VineSeed_x86_64.sh:20
+#: vbootstrap/scripts/VineSeed_ppc.sh:14 vbootstrap/scripts/VineSeed_ppc.sh:17
+#: vbootstrap/scripts/VineSeed_ppc.sh:20 vbootstrap/scripts/VineSeed_arm.sh:14
+#: vbootstrap/scripts/VineSeed_arm.sh:17 vbootstrap/scripts/VineSeed_arm.sh:20
 msgid "DONE."
 msgstr ""
 
-#: vbootstrap/scripts/4.2.sh:15 vbootstrap/scripts/4.2_i386.sh:15
-#: vbootstrap/scripts/5.2.sh:15 vbootstrap/scripts/5.2_i386.sh:15
-#: vbootstrap/scripts/VineSeed.sh:15 vbootstrap/scripts/VineSeed_i386.sh:15
+#: vbootstrap/scripts/4.2_i386.sh:15 vbootstrap/scripts/4.2_ppc.sh:15
+#: vbootstrap/scripts/5.2_i386.sh:15 vbootstrap/scripts/5.2_x86_64.sh:15
+#: vbootstrap/scripts/5.2_ppc.sh:15 vbootstrap/scripts/5.2_arm.sh:15
+#: vbootstrap/scripts/VineSeed_i386.sh:15
+#: vbootstrap/scripts/VineSeed_x86_64.sh:15
+#: vbootstrap/scripts/VineSeed_ppc.sh:15 vbootstrap/scripts/VineSeed_arm.sh:15
 msgid " updating apt database... "
 msgstr ""
 
-#: vbootstrap/scripts/4.2.sh:18 vbootstrap/scripts/4.2_i386.sh:18
-#: vbootstrap/scripts/5.2.sh:18 vbootstrap/scripts/5.2_i386.sh:18
-#: vbootstrap/scripts/VineSeed.sh:18 vbootstrap/scripts/VineSeed_i386.sh:18
+#: vbootstrap/scripts/4.2_i386.sh:18 vbootstrap/scripts/4.2_ppc.sh:18
+#: vbootstrap/scripts/5.2_i386.sh:18 vbootstrap/scripts/5.2_x86_64.sh:18
+#: vbootstrap/scripts/5.2_ppc.sh:18 vbootstrap/scripts/5.2_arm.sh:18
+#: vbootstrap/scripts/VineSeed_i386.sh:18
+#: vbootstrap/scripts/VineSeed_x86_64.sh:18
+#: vbootstrap/scripts/VineSeed_ppc.sh:18 vbootstrap/scripts/VineSeed_arm.sh:18
 msgid " rebuilding rpm database with chroot rpm... "
 msgstr ""

+ 3 - 0
vbootstrap-vl.spec

@@ -81,8 +81,11 @@ vbuilder は vbootstrap を利用して chroot 環境の構築し、
 
 %changelog
 * Sat Apr 23 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.43-1
+- updated vbootstrap
+  - supported versions format: <version>_<arch>
 - updated vbuilder.sh.in
   - dropped the action "show-info"
+  - sync the above change for vbootstrap
 
 * Sat Apr 16 2011 Munehiro Yamamoto <munepi@vinelinux.org> 0.0.42-1
 - fixed RPM_Sign(), Login_Chroot() in vbuilder.sh.in

+ 2 - 2
vbootstrap.sh.in

@@ -14,8 +14,8 @@ SUPPORTED_VERSION="$(ls $VBOOTSTRAPDIR/scripts/)"
 
 usage()
 {
-  echo "Usage: vbootstrap <version> <targetdir>"
-  echo "  supported version:"
+  echo "Usage: vbootstrap <version>_<arch> <targetdir>"
+  echo "  supported <version>_<arch>:"
   for ver in $SUPPORTED_VERSION
   do
     echo "    $ver"

+ 2 - 2
vbootstrap/scripts/4.2.sh → vbootstrap/scripts/4.2_ppc.sh

@@ -1,6 +1,6 @@
-# Vine Linux 4.2
+# Vine Linux 4.2_ppc
 
-INSTVER="4.2"
+INSTVER="4.2_ppc"
 BASE_PKGS="setup glibc coreutils bash apt rootfiles vine-release"
 APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
 

+ 2 - 2
vbootstrap/scripts/5.2.sh → vbootstrap/scripts/5.2_ppc.sh

@@ -1,6 +1,6 @@
-# 5.2
+# 5.2_ppc
 
-INSTVER="5.2"
+INSTVER="5.2_ppc"
 BASE_PKGS="setup glibc coreutils bash apt rootfiles vine-release libstdc++34"
 APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
 

+ 24 - 0
vbootstrap/scripts/5.2_x86_64.sh

@@ -0,0 +1,24 @@
+# 5.2_x86_64
+
+INSTVER="5.2_x86_64"
+BASE_PKGS="setup glibc coreutils bash apt rootfiles vine-release libstdc++34"
+APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
+
+vbootstrap_post()
+{
+echo $"running vbootstrap post install scripts for $INSTVER on $INSTDIR"
+cp -a /etc/resolv.conf $INSTDIR/etc/
+rm -f $INSTDIR/var/lib/rpm/*
+echo -n $" reinitializing rpm database... "
+chroot $INSTDIR rpm --initdb
+echo $"DONE."
+echo -n $" updating apt database... "
+chroot $INSTDIR apt-get -qq update
+echo $"DONE."
+echo -n $" rebuilding rpm database with chroot rpm... "
+chroot $INSTDIR apt-get -qq -y install ${BASE_PKGS} -o RPM::Options::=--justdb
+echo $"DONE."
+#echo $" installing vine-keyring... "
+#chroot $INSTDIR apt-get -qq -y --reinstall install vine-keyring
+#echo $"DONE."
+}

+ 2 - 2
vbootstrap/scripts/VineSeed.sh → vbootstrap/scripts/VineSeed_ppc.sh

@@ -1,6 +1,6 @@
-# VineSeed
+# VineSeed_ppc
 
-INSTVER="VineSeed"
+INSTVER="VineSeed_ppc"
 BASE_PKGS="setup glibc coreutils bash apt rootfiles vine-release libstdc++34"
 APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
 

+ 24 - 0
vbootstrap/scripts/VineSeed_x86_64.sh

@@ -0,0 +1,24 @@
+# VineSeed_x86_64
+
+INSTVER="VineSeed_x86_64"
+BASE_PKGS="setup glibc coreutils bash apt rootfiles vine-release libstdc++34"
+APT_LINE="-o Dir::Etc::sourcelist=$VBOOTSTRAPDIR/sources.list.d/$INSTVER"
+
+vbootstrap_post()
+{
+echo $"running vbootstrap post install scripts for $INSTVER on $INSTDIR"
+cp -a /etc/resolv.conf $INSTDIR/etc/
+rm -f $INSTDIR/var/lib/rpm/__db.*
+echo -n $" reinitializing rpm database... "
+chroot $INSTDIR rpm --initdb
+echo $"DONE."
+echo -n $" updating apt database... "
+chroot $INSTDIR apt-get -qq update
+echo $"DONE."
+echo -n $" rebuilding rpm database with chroot rpm... "
+chroot $INSTDIR apt-get -qq -y install ${BASE_PKGS} -o RPM::Options::=--justdb
+echo $"DONE."
+#echo $" installing vine-keyring... "
+#chroot $INSTDIR apt-get -qq -y --reinstall install vine-keyring
+#echo $"DONE."
+}

+ 0 - 1
vbootstrap/sources.list.d/4.2

@@ -1 +0,0 @@
-rpm http://updates.vinelinux.org/apt 4.2/$(ARCH) main plus updates

+ 1 - 0
vbootstrap/sources.list.d/4.2_ppc

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt 4.2/ppc main plus updates

+ 0 - 1
vbootstrap/sources.list.d/5.2

@@ -1 +0,0 @@
-rpm http://updates.vinelinux.org/apt 5.2/$(ARCH) main plus nonfree

+ 1 - 0
vbootstrap/sources.list.d/5.2_ppc

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt 5.2/ppc main plus nonfree

+ 1 - 0
vbootstrap/sources.list.d/5.2_x86_64

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt 5.2/x86_64 main plus nonfree

+ 0 - 1
vbootstrap/sources.list.d/VineSeed

@@ -1 +0,0 @@
-rpm http://updates.vinelinux.org/apt VineSeed/$(ARCH) main plus nonfree

+ 1 - 0
vbootstrap/sources.list.d/VineSeed_ppc

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt VineSeed/ppc main plus nonfree

+ 1 - 0
vbootstrap/sources.list.d/VineSeed_x86_64

@@ -0,0 +1 @@
+rpm http://updates.vinelinux.org/apt VineSeed/x86_64 main plus nonfree

+ 3 - 7
vbuilder-bash-completion.sh

@@ -31,11 +31,7 @@ _vbuilder()
     ## Complete the arguments to some of the basic commands.
     case "${prev}" in
 	--version)
-	    if [ "$_arch" = "x86_64" ]; then
-		local running="VineSeed VineSeed_i386 5.2 5.2_i386 4.2_i386"
-	    else
-		local running="VineSeed 5.2 4.2"
-	    fi
+	    local running="VineSeed 5.2 4.2"
 	    COMPREPLY=( $(compgen -W "${running}" -- "${cur}") )
 	    ;;
 
@@ -60,13 +56,13 @@ _vbuilder()
 	    fi
 	    ;;
 
-	--build-rpm|build-rpm)
+	build-rpm)
 	    if [ $COMP_CWORD -eq 1 -o "${COMPREPLY+set}" != "set" ]; then
 		_filedir 'src.rpm'
 	    fi
 	    ;;
 
-	--install-rpm|install-rpm|--remove-rpm|remove-rpm)
+	install-rpm|remove-rpm)
 	    if [ $COMP_CWORD -eq 1 -o "${COMPREPLY+set}" != "set" ]; then
 		_filedir 'rpm'
 	    fi

+ 54 - 59
vbuilder.sh.in

@@ -5,13 +5,6 @@ TEXTDOMAIN=vbootstrap
 TEXTDOMAINDIR=/usr/share/locale
 
 Usage(){
-    UARCH=$(uname -i)
-    case "${UARCH}" in
-	arm*)
-	    UARCH="arm"
-	    ;;
-    esac
-
     cat<<EOF
 $(basename $0) @@VBUILDER_VERSION@@ $(echo $([ -z "@@VBUILDER_REVISION@@" ] || echo "(r@@VBUILDER_REVISION@@)"))
 Usage:	$(basename $0) {--version [version]} {--arch [arch]} {--category [categories]} {--dist-upgrade} {--target [target]} {--with-compat32} {--rpmbuild-define [macro_expr]} {--rpmbuild-with [bcond_with]} {--rpmbuild-without [bcond_with]} {--sign} {--no-install} {--debug} {--help} {--bootstrap-dir [directory]} {--unionfs-dir [directory]} {--cache-dir [directory]} {--built-rpms-dir [directory]} {clean|build|build-rpm [src.rpm]|install-rpm [arch.rpm|package]|remove-rpm [package]}
@@ -49,8 +42,8 @@ For example,
 $(basename $0) clean build
 * build rpms from the specified source rpm:
 $(basename $0) build-rpm [src.rpm]
-* make a plain build environment for Vine Linux 4.2:
-$(basename $0) --version 4.2 clean build
+* make a plain build environment for Vine Linux 5.2:
+$(basename $0) --version 5.2 clean build
 * make a i386 chroot on x86_64:
 $(basename $0) --arch i386 clean build
 * build a kernel package with target i686:
@@ -153,6 +146,14 @@ setup-vbuilder(){
     ## set current stable relase version
     STABLE_VERSION=@@VBUILDER_STABLE_VERSION@@
 
+    ## set default chroot archtecture
+    UARCH=$(uname -i)
+    case "${UARCH}" in
+	arm*)
+	    UARCH="arm"
+	    ;;
+    esac
+
     ## set boolian variables
     with_setup_vbootstrap=0
     with_dist_upgrade=0
@@ -187,10 +188,13 @@ setup-vbootstrap(){
 	[ -d $VBOOTSTRAP_DIR ] || mkdir -p $VBOOTSTRAP_DIR
 	[ -d $CACHE_DIR ] || mkdir -p $CACHE_DIR
 
-	UARCH=$(uname -i)
-	case "${UARCH}" in
-	    arm*)
-		UARCH="arm"
+	## check chroot version
+	case ${VERSION} in
+	    4.2|5.2|VineSeed)
+		;;
+	    *)
+		echo $"E: ${VERSION} is NOT supported"
+		return 1
 		;;
 	esac
 
@@ -205,58 +209,49 @@ setup-vbootstrap(){
 	    VARCH=${UARCH}
 	else
 	    case "${VARCH}" in
-		i386|i686|x86_64)
-		    [ "$(uname -i)" = "ppc" -o "${UARCH}" = "arm" ] && \
-			echo $"E: arch ${VARCH} is NOT supported on $(uname -i)" && return 1
+		i386|x86_64)
+		    [ "${UARCH}" = "ppc" -o "${UARCH}" = "arm" ] && \
+			echo $"E: arch ${VARCH} is NOT supported on ${UARCH}" && return 1
 		    ;;
 		ppc)
-		    [ "$(uname -i)" = "i386" -o "$(uname -i)" = "i686" -o "$(uname -i)" = "x86_64" -o "${UARCH}" = "arm" ] && \
-			echo $"E: arch ${VARCH} is NOT supported on $(uname -i)" && return 1
+		    [ "${UARCH}" = "i386" -o "${UARCH}" = "x86_64" -o "${UARCH}" = "arm" ] && \
+			echo $"E: arch ${VARCH} is NOT supported on ${UARCH}" && return 1
 		    ;;
 		arm)
-		    [ "${UARCH}" = "i386" -o "${UARCH}" = "i686" -o "${UARCH}" = "x86_64" -o "${UARCH}" = "ppc" ] && \
+		    [ "${UARCH}" = "i386" -o "${UARCH}" = "x86_64" -o "${UARCH}" = "ppc" ] && \
 			echo $"E: arch ${VARCH} is NOT supported on ${UARCH}" && return 1
 		    ;;
 	    esac
 	fi
 
-        ##!! 4.2 is NO support on VARCH=x86_64
-	if [ "${VERSION}" = "4.2" -a "${VARCH}" = "x86_64" ]; then
-	    echo $"E: ${VERSION} is NOT supported"
-	    return 1
-	fi
-
-        ##!! 4.2 is NO support on VARCH=arm
-	if [ "${VERSION}" = "4.2" -a "${VARCH}" = "arm" ]; then
-	    echo $"E: ${VERSION} is NOT supported"
-	    return 1
+        ##!! 4.2 is NO support on VARCH=x86_64 or VARCH=arch
+	if [ "${VERSION}" = "4.2" ]; then
+	    if [ "${VARCH}" = "x86_64" -o "${VARCH}" = "arm" ]; then
+		echo $"E: ${VERSION}_${VARCH} is NOT supported"
+		return 1
+	    fi
 	fi
 
-	## support i386 chroot on x86_64 below: 
-	[ "${VARCH}" != "${UARCH}" ] && \
-	    VERSION=${VERSION}_${VARCH} && \
-	    with_ix86_on_x86_64=1
+	## set the profile <version>_<arch>
+	PROFILE=${VERSION}_${VARCH}
 
-	## hack arm repository to local
-	[ "${VARCH}" = "arm" ] && \
-	    VERSION=${VERSION}_${VARCH}
-
-        ## check support ${VERSION}
-	if [ -z "$(/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*// | grep -m 1 ${VERSION})" ]; then
-	    echo $"E: ${VERSION} is NOT supported"
+        ## check support ${PROFILE}
+	if [ -z "$(/usr/sbin/vbootstrap | sed -e s/^Usage:.*// -e s/^E:.*// | grep -m 1 ${PROFILE})" ]; then
+	    echo $"E: ${PROFILE} is NOT supported"
 	    return 1
 	fi
 
 	## check ${VERSION} equals VineSeed*, when with_dist_upgrade=1
 	if [ $with_dist_upgrade -eq 1 ]; then
-	    if [ "$(echo ${VERSION} | sed -e "s/\(VineSeed\).*/\1/")" != "VineSeed" ]; then 
+	    if [ "${VERSION}" != "VineSeed" ]; then 
 		echo $"E: version ${VERSION} does not support --dist-upgrade option"
 		return 1
 	    fi
 	fi
 
-	## set ${MAJOR_VERSION}
-	MAJOR_VERSION=$(echo ${VERSION} | sed -e "s/_i[0-9]86//")
+	## support i386 chroot on x86_64 below: 
+	[ "${UARCH}" = "x86_64" -a "${VARCH}" = "i386" ] && \
+	    with_ix86_on_x86_64=1
 
 	## check apt categories
 	## "main" category is unconditionally permited
@@ -274,20 +269,20 @@ setup-vbootstrap(){
 		    ;;
 		test)
                     ## "test" category only exists in VineSeed
-		    [ "${MAJOR_VERSION}" = "VineSeed" ] || \
+		    [ "${VERSION}" = "VineSeed" ] || \
 			echo $"E: No such category exists: $cat" && return 1
 		    with_category_test=1
 		    ;;
 		proposed-updates)
                     ##!! "proposed-updates" category does not exist in 4.2
-		    [ "${MAJOR_VERSION}" = "4.2" ] && \
+		    [ "${VERSION}" = "4.2" ] && \
 			echo $"E: No such category exists: $cat" && return 1
 
 		    with_category_proposed_updates=1
 		    ;;
 		security)
                     ## "security" category does not exist in VineSeed
-		    [ "${MAJOR_VERSION}" = "VineSeed" ] && \
+		    [ "${VERSION}" = "VineSeed" ] && \
 			echo $"E: No such category exists: $cat" && return 1
 		    with_category_security=1
 		    ;;
@@ -314,12 +309,12 @@ setup-vbootstrap(){
     fi
 
     ## set global variables
-    BUILD_ROOT=${VBOOTSTRAP_DIR}/${VERSION}
+    BUILD_ROOT=${VBOOTSTRAP_DIR}/${PROFILE}
     BUILD_USER=vbuilder
     BUILD_DIR=/home/${BUILD_USER}/rpm
-    UNIONFS_ROOT=${UNIONFS_DIR}/${VERSION}
+    UNIONFS_ROOT=${UNIONFS_DIR}/${PROFILE}
     ARCHIVES_DIR=${BUILD_ROOT}/var/cache/apt/archives
-    EXTERNAL_ARCHIVES_DIR=${CACHE_DIR}/${VERSION}/apt/archives
+    EXTERNAL_ARCHIVES_DIR=${CACHE_DIR}/${PROFILE}/apt/archives
 
     __chroot_sh="/usr/sbin/chroot ${BUILD_ROOT} /bin/sh -c -l"
 
@@ -524,7 +519,7 @@ Clean(){
 	fi
     fi
 
-    echo $"Cleanup a build farm for ${VERSION} done."
+    echo $"Cleanup a build farm for ${PROFILE} done."
     return 0
 }
 
@@ -534,14 +529,14 @@ Build(){
     if [ $with_dist_upgrade -eq 1 ]; then
 	## make bootstrap of ${STABLE_VERSION}
 	/usr/sbin/vbootstrap \
-	    $(echo ${VERSION} | sed -e "s/VineSeed/${STABLE_VERSION}/") \
+	    $(echo ${PROFILE} | sed -e "s/VineSeed/${STABLE_VERSION}/") \
 	    ${BUILD_ROOT}
 
 	## aim apt-line to VineSeed
 	sed -i "s/apt ${STABLE_VERSION}/apt VineSeed/g" \
 	    ${BUILD_ROOT}/etc/apt/sources.list.d/main.list
     else
-	/usr/sbin/vbootstrap ${VERSION} ${BUILD_ROOT}
+	/usr/sbin/vbootstrap ${PROFILE} ${BUILD_ROOT}
     fi
 
     mount-chroot /proc
@@ -554,7 +549,7 @@ Build(){
     $__chroot_sh 'apt-get -qq update && apt-get -qq -y dist-upgrade'
 
     ##!! 4.2 has no apt-sourceslist-{plus,nonfree,proposed-updates} packages
-    case ${MAJOR_VERSION} in
+    case ${VERSION} in
 	4.2)
 	    $__chroot_sh "sed -i -e 's/main plus updates nonfree *$/$(echo ${CATEGORIES} | sed -e "s/,/ /"g) updates/g' /etc/apt/sources.list"
 	    # [ $with_category_security -eq 1 ] && \
@@ -604,7 +599,7 @@ Build(){
 
     ##!! for rpm-4.8.0 or higher
     ##!! (See http://trac.vinelinux.org/wiki/Vine6/AboutUpdateToolchain)
-    if [ "$(echo ${VERSION} | sed -e "s/\(VineSeed\).*/\1/")" = "VineSeed" ]; then
+    if [ "${VERSION}" = "VineSeed" ]; then
 	$__chroot_sh "sed -i -e 's/^%_topdir/#%_topdir/' /home/${BUILD_USER}/.rpmmacros"
     fi
 
@@ -616,7 +611,7 @@ Build(){
     mount-chroot --umount /proc
     apt-get-update --host
 
-    echo $"Making a build farm for ${VERSION} done."
+    echo $"Making a build farm for ${PROFILE} done."
     return 0
 }
 
@@ -701,12 +696,12 @@ RPM_Build(){
     echo $"Copying built rpms to ${BUILT_RPMS_DIR} for each archtectures ... "
     for i in $RPM_PKG_ARCH_LIST; do \
 	if [ -d $BUILD_ROOT${BUILD_DIR}/${i} ]; then
-	    if [ ! -d ${BUILT_RPMS_DIR}/${MAJOR_VERSION}/${i} ]; then
-		$__install -d ${BUILT_RPMS_DIR}/${MAJOR_VERSION}/${i}/
+	    if [ ! -d ${BUILT_RPMS_DIR}/${VERSION}/${i} ]; then
+		$__install -d ${BUILT_RPMS_DIR}/${VERSION}/${i}/
 		chown -R ${RPM_PKG_USER}:${RPM_PKG_GROUP} ${BUILT_RPMS_DIR}
 	    fi
 	    find $BUILD_ROOT${BUILD_DIR}/${i} -type f -regex '.*\.rpm' \
-		-exec $__install -m0644 {} ${BUILT_RPMS_DIR}/${MAJOR_VERSION}/${i}/ \;
+		-exec $__install -m0644 {} ${BUILT_RPMS_DIR}/${VERSION}/${i}/ \;
 	fi
     done
 
@@ -731,7 +726,7 @@ RPM_Sign(){
     mount-chroot unionfs_dir
 
     echo $"Signing built rpms using ${RPM_SIGN_USER}'s key: "
-    su $RPM_SIGN_USER -c "rpm --addsign $(for i in $RPM_PKG_ARCH_LIST; do find $BUILD_ROOT${BUILD_DIR}/${i} -type f -regex '.*\.rpm' 2>/dev/null; done | sed -e s,$BUILD_ROOT${BUILD_DIR},${BUILT_RPMS_DIR}/${MAJOR_VERSION},g -e 's/$/ \\/g')"
+    su $RPM_SIGN_USER -c "rpm --addsign $(for i in $RPM_PKG_ARCH_LIST; do find $BUILD_ROOT${BUILD_DIR}/${i} -type f -regex '.*\.rpm' 2>/dev/null; done | sed -e s,$BUILD_ROOT${BUILD_DIR},${BUILT_RPMS_DIR}/${VERSION},g -e 's/$/ \\/g')"
 
     mount-chroot --umount unionfs_dir