[Merge] lp:~mvo/goget-ubuntu-touch/boot-assets-dst into lp:goget-ubuntu-touch

Gustavo Niemeyer gustavo at niemeyer.net
Tue Oct 27 11:50:10 UTC 2015


To me "dst" sounds a lot like Daylight Saving Time or some other unknown three-letter acronym, and it looks like we already had a field named "target", which is a much better term. How about not obsoleting it, and instead recognizing the delta between them?  "absolute-target"?

Also, we should really be using the new terminology: gadget snap. Otherwise we'll never cross that bridge.

One more comment inline:

Diff comments:

> === modified file 'diskimage/bootloader.go'
> --- diskimage/bootloader.go	2015-06-18 20:35:51 +0000
> +++ diskimage/bootloader.go	2015-10-27 10:23:12 +0000
> @@ -28,17 +28,19 @@
>  	"launchpad.net/goget-ubuntu-touch/sysutils"
>  )
>  
> -func setupBootAssetFiles(bootPath, oemRootPath string, files []BootAssetFiles) error {
> +func setupBootAssetFiles(bootMount, bootPath, oemRootPath string, files []BootAssetFiles) error {

bootMountDir as elsewhere seems more readable.

>  	printOut("Setting up boot asset files from", oemRootPath, "...")
>  	for _, file := range files {
>  		dst := filepath.Join(bootPath, filepath.Base(file.Path))
> -		if file.Target != "" {
> +		if file.Dst != "" {
> +			dst = filepath.Join(bootMount, file.Dst)
> +		} else if file.Target != "" {
>  			dst = filepath.Join(bootPath, file.Target)
> -			dstDir := filepath.Dir(dst)
> -			if _, err := os.Stat(dstDir); os.IsNotExist(err) {
> -				if err := os.MkdirAll(dstDir, 0755); err != nil {
> -					return err
> -				}
> +		}
> +		dstDir := filepath.Dir(dst)
> +		if _, err := os.Stat(dstDir); os.IsNotExist(err) {
> +			if err := os.MkdirAll(dstDir, 0755); err != nil {
> +				return err
>  			}
>  		}
>  


-- 
https://code.launchpad.net/~mvo/goget-ubuntu-touch/boot-assets-dst/+merge/275757
Your team Ubuntu Phablet Team is subscribed to branch lp:goget-ubuntu-touch.



More information about the Ubuntu-reviews mailing list