Merge lp:~maxime-ripard/project-rootstock/local-file into lp:project-rootstock

Proposed by Maxime Ripard
Status: Needs review
Proposed branch: lp:~maxime-ripard/project-rootstock/local-file
Merge into: lp:project-rootstock
Diff against target: 25 lines (+7/-2)
1 file modified
rootstock (+7/-2)
To merge this branch: bzr merge lp:~maxime-ripard/project-rootstock/local-file
Reviewer Review Type Date Requested Status
Developers of the Rootstock rootfs builder tool Pending
Review via email: mp+76252@code.launchpad.net

Description of the change

This patch includes a way to fetch a local .deb for the kernel image instead of relying only on wget to do so.

To post a comment you must log in.

Unmerged revisions

130. By Maxime Ripard <email address hidden>

When you develop, the package is often present on your local machine
instead of on a HTTP server. This patch adds a way to use a local .deb
through the file:// URL scheme.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'rootstock'
2--- rootstock 2011-02-28 06:06:33 +0000
3+++ rootstock 2011-09-20 15:52:35 +0000
4@@ -191,7 +191,7 @@
5
6 Advanced:
7
8---kernel-image <http url to kernel .deb>
9+--kernel-image <http or file url to kernel .deb>
10 install board specfic kernel package from http accessible deb package inside rootfs
11 --copy-package-cache
12 save a snapshot of all packages used for a build locally to re-use them
13@@ -544,7 +544,12 @@
14 cp $CACHEDIR/kernel/$KERNEL_IMG $ROOTFS/tmp
15 else
16 KERNELDIR=$(mktemp -d)
17- wget --directory-prefix=$KERNELDIR --quiet $KERNEL_URL
18+ KERNELPROTO=${KERNEL_URL%%://*}
19+ if [ "$KERNELPROTO" = "file" ]; then
20+ cp ${KERNEL_URL##*://} $KERNELDIR
21+ else
22+ wget --directory-prefix=$KERNELDIR --quiet $KERNEL_URL
23+ fi
24 log "I: $KERNEL_IMG download complete"
25 cp $KERNELDIR/$KERNEL_IMG $ROOTFS/tmp
26

Subscribers

People subscribed via source and target branches