Merge lp:~matteo-mattei/project-rootstock/main into lp:project-rootstock

Proposed by Matteo Mattei
Status: Needs review
Proposed branch: lp:~matteo-mattei/project-rootstock/main
Merge into: lp:project-rootstock
Diff against target: 74 lines (+20/-6)
1 file modified
rootstock (+20/-6)
To merge this branch: bzr merge lp:~matteo-mattei/project-rootstock/main
Reviewer Review Type Date Requested Status
Ricardo Salveti Pending
Review via email: mp+53477@code.launchpad.net

Description of the change

I've added the possibility to create tar.bz2 archive instead of only tar.gz and I've also added a filter that allow comments (with #) into manifest file.

To post a comment you must log in.

Unmerged revisions

130. By Matteo Mattei <email address hidden>

Add support for tar.bz2 archive and add filter for comments in manifest file

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'rootstock'
--- rootstock 2011-02-28 06:06:33 +0000
+++ rootstock 2011-03-15 16:50:50 +0000
@@ -188,6 +188,9 @@
188188
189-q --quiet189-q --quiet
190 Quiet operation, only write to log190 Quiet operation, only write to log
191-a --archive <option>
192 Select archive type (tgz or tar.bz2)
193 (default: tgz)
191194
192Advanced:195Advanced:
193196
@@ -652,10 +655,10 @@
652 mount_image655 mount_image
653656
654 cd $MOUNTPOINT >>$LOG 2>&1657 cd $MOUNTPOINT >>$LOG 2>&1
655 LANG=C tar czvf ../armel-rootfs-$STAMP.tgz . >>$LOG 2>&1658 LANG=C tar c${ARCHIVE_FLAG}vf ../armel-rootfs-$STAMP.$ARCHIVE . >>$LOG 2>&1
656 mv ../armel-rootfs-$STAMP.tgz $DIR >>$LOG 2>&1659 mv ../armel-rootfs-$STAMP.$ARCHIVE $DIR >>$LOG 2>&1
657660
658 echo "I: ARM rootfs created as $DIR/armel-rootfs-$STAMP.tgz"661 echo "I: ARM rootfs created as $DIR/armel-rootfs-$STAMP.$ARCHIVE"
659662
660 cd - >/dev/null 2>&1663 cd - >/dev/null 2>&1
661664
@@ -724,6 +727,8 @@
724DIR="$(pwd)"727DIR="$(pwd)"
725NOSWAP=1728NOSWAP=1
726SWAPSIZE=256729SWAPSIZE=256
730ARCHIVE="tgz"
731ARCHIVE_FLAG="z"
727732
728# general defaults733# general defaults
729LOG="$BUILDDIR/${PROGRAM}-$STAMP.log"734LOG="$BUILDDIR/${PROGRAM}-$STAMP.log"
@@ -736,10 +741,10 @@
736CHROOT="eval TMPDIR=/tmp chroot"741CHROOT="eval TMPDIR=/tmp chroot"
737742
738# parse commandline options743# parse commandline options
739GETOPT=`getopt -o hf:l:p:n:s:i:g:m:c:t:x:d:q --long help,fqdn:,login:,\744GETOPT=`getopt -o h:f:l:p:n:s:i:g:m:c:t:x:d:q:a --long help:,fqdn:,login:,\
740password:,fullname:,seed:,imagesize:,manifest:,mirror:,components:,timezone:,\745password:,fullname:,seed:,imagesize:,manifest:,mirror:,components:,timezone:,\
741kblayout:,kbmodel:,kbvariant:,kboptions:,locale:,keepimage,notarball,script:,\746kblayout:,kbmodel:,kbvariant:,kboptions:,locale:,keepimage,notarball,script:,\
742serial:,doswap,swapsize:,dist:,quiet,kernel-image:,copy-package-cache,\747serial:,doswap,swapsize:,dist:,quiet,archive:,kernel-image:,copy-package-cache,\
743restore-package-cache,clean-package-cache,extra-mirror:,no-root,version \748restore-package-cache,clean-package-cache,extra-mirror:,no-root,version \
744-n "$PROGRAM" -- "$@"`749-n "$PROGRAM" -- "$@"`
745if [ $? != 0 ]; then usage; exit 1; fi750if [ $? != 0 ]; then usage; exit 1; fi
@@ -782,7 +787,7 @@
782 shift 2787 shift 2
783 ;;788 ;;
784 -g|--manifest)789 -g|--manifest)
785 SELECTION="$(cat "${2}" | sed ':a;N;$!ba;s/\n/ /g')"790 SELECTION="$(cat "${2}" | sed "{s/#.*//g}" | grep "^[^ ]" | sed ':a;N;$!ba;s/\n/ /g')"
786 shift 2791 shift 2
787 ;;792 ;;
788 -m|--mirror)793 -m|--mirror)
@@ -859,6 +864,15 @@
859 QUIET=1864 QUIET=1
860 shift865 shift
861 ;;866 ;;
867 -a|--archive)
868 ARCHIVE="$2"
869 if [ "${ARCHIVE}" = "tar.bz2" ];then
870 ARCHIVE_FLAG="j"
871 else
872 ARCHIVE_FLAG="z"
873 fi
874 shift 2
875 ;;
862 --kernel-image)876 --kernel-image)
863 KERNEL_IMAGE=1877 KERNEL_IMAGE=1
864 KERNEL_URL="$2"878 KERNEL_URL="$2"

Subscribers

People subscribed via source and target branches