support --download-only option

Bug #1295148 reported by Jani Monoses
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
goget-ubuntu-touch (Ubuntu)
Fix Released
Wishlist
Unassigned

Bug Description

It would be helpful to get tarballs for a specific channel/revision without going to the server and downloading them individually.
This would be useful for porters who would use those files along with their own device specific tarballs.
This step should work without the need for an adb connection.

Related branches

Revision history for this message
Sergio Schvezov (sergiusens) wrote :

I don't understand how this helps porting.

Wouldn't something like this in the android tree be better?

function touch-provision() {
 ROOTSTOCK_DIR=~/source/project-rootstock-ng
 ROOTFS="trusty-preinstalled-touch-armhf.tar.gz"
 if [ -z "$ANDROID_BUILD_TOP" ]; then
  echo Not in android build environment
  exit 1
 fi
 cd "$ROOTSTOCK_DIR" && bzr pull && cd -
 wget -c "http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/$ROOTFS" -O "$OUT/$ROOTFS"
 $ROOTSTOCK_DIR/rootstock-touch-install "$OUT/$ROOTFS" "$OUT/system.img"
}

With some better logic for corner cases that is

Changed in goget-ubuntu-touch (Ubuntu):
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
Jani Monoses (jani) wrote :

I no longer find this very important as I have written a tool to act as a proxy between the daily image server and ubuntu-device-flash.
However the original intention was to get the latest tar.xz images in system-image format which are harder to point at easily than the legacy cdimage tarballs, and to flash them to a device using the ubuntu-device-flash tool in order to keep testing latest Ubuntu dailies combined with whatever device tarball is built from custom trees.

So this would just download the latest mako tarballs and put them in ~/.cache/ubuntuimage and one could copy/link the ubuntu tarball to a 'server dir' with channel and index json files and in which one can run python -m SimpleHTTPServer then point the flash tool to it.

The use case is not simply flashing the device but doing so using processes as close to the ones used for Nexus devices as possible.
I agree though this is wishlist and low prio but still nice to have (say you have net connection in a location but no phone, and you have a phone but no network elsewhere so you first --download and only later flash. That's why I mentioned no need to check adb connectivity - which would also be nice for list-channels.) I agree it may not be a very common usecase.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for goget-ubuntu-touch (Ubuntu) because there has been no activity for 60 days.]

Changed in goget-ubuntu-touch (Ubuntu):
status: Incomplete → Expired
Changed in goget-ubuntu-touch (Ubuntu):
status: Expired → New
Revision history for this message
John McAleely (john.mcaleely) wrote :

This is becoming an issue again.

Most phones are made in China, which is a place with notoriously poor networks. From my experience, many hardware manufacturers in other parts of the world choose to live with similarly restrictive internal networks (!).

As such ubuntu-device-flash has recently grown the ability to flash the device tarball they produce from a local file (--device-tarball).

We have found that suggesting they stand up a server like janimo's above is tricky - they need to negotiate such things with IS departments. Until they can go public with their device, they therefore write scripts to scrape rootfs release from system-image.ubuntu.com, and then use other tools to flash these to their device.

It would be helpful if we could all use ubuntu device flash.

That needs two features:

 - the ability to --download-only a release to the local filesystem, to remove the need to write json scraping scripts that are unique to each OEM (this bug)

 - the ability for u-d-f to flash from the local cache, or documentation on how to copy files into the local cache so that u-d-f can refer to internal file resources, and not download rootfs tarballs from the network all the time. (separate bug)

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in goget-ubuntu-touch (Ubuntu):
status: New → Confirmed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package goget-ubuntu-touch - 0.3+14.10.20140807-0ubuntu1

---------------
goget-ubuntu-touch (0.3+14.10.20140807-0ubuntu1) utopic; urgency=low

  [ Paul Larson ]
  * Fix checking for free space in cache when it's mounted in a
    different location

  [ Jani Monoses ]
  * ubuntu-device-flash: Add --download-only flag. (LP: #1295148)

  [ Sergio Schvezov ]
  * Unhooking stdin from the emulator and removing -shell switch as it's
    not needed anymore (LP: #1329374)
 -- Ubuntu daily release <email address hidden> Thu, 07 Aug 2014 03:57:01 +0000

Changed in goget-ubuntu-touch (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.