berkus / muddle

Automatically exported from code.google.com/p/muddle
0 stars 0 forks source link

Problem with a package depending upon a deployment #217

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A package is trying to use a CPIO file produced by a deployment. Current muddle 
allows that dependency, but things do not seem to be working.

This fails:

  rm -rf .muddle/tags/deployment/
  muddle deploy _all
  muddle  distrebuild mkflash{flash}

This works:

  rm -rf .muddle/tags/deployment/
  muddle  distrebuild mkflash{flash}

The relevant part of the build description is:

  def describe_mkflash(builder, role):
         base_role = 'base'

         add_package(builder, role, 'mkflash', 'base')
         pkg.do_depend(builder, 'mkflash', [ role ],
                       [ ('u-boot', base_role),
                         ('x-loader', base_role),
                         ('kernel', base_role) ] )
         pkg.do_depend_label(builder, 'mkflash', [ role ],
                             depend.Label('deployment', 'root'))

i.e., package:mkflash{flash} depends upon deployment:root/deployed

So::

  trj@broonzy:/opt/project/build2$ muddle  distrebuil
  Building: 
  package:mkflash{flash}/distclean ..
   > Building package:mkflash{flash}/distclean[T]  
  ++ pushd to /opt/project/build2/src/base/mkflash
   > make  -f Makefile.muddle distclean  
  rm -rf /opt/project/build2/obj/mkflash/flash
  Killing: package:mkflash{flash}/preconfig ..
  Clearing tags for package:mkflash{flash}/preconfig
     package:mkflash{flash}/built
     package:mkflash{flash}/clean[T]
     package:mkflash{flash}/configured
     package:mkflash{flash}/installed
     package:mkflash{flash}/postinstalled
     package:mkflash{flash}/preconfig
  Building package:mkflash{flash}/postinstalled
   > Building deployment:root/clean
   > Remove /opt/project/build2/deploy/root
   > rm -rf "/opt/project/build2/deploy/root"
   > Building package:mkflash{flash}/preconfig
   > Make directory /opt/project/build2/obj/mkflash/flash  
  ++ pushd to /opt/project/build2/src/base/mkflash
   > Building package:mkflash{flash}/configured  
  ++ pushd to /opt/project/build2/src/base/mkflash
   > make  -f Makefile.muddle config  
  mkdir -p /opt/project/build2/obj/mkflash/flash
   > Building package:mkflash{flash}/built  
  ++ pushd to /opt/project/build2/src/base/mkflash
   > make  -f Makefile.muddle  
  rm -f /opt/project/build2/obj/mkflash/flash/flashprog.bin
  dd if=/opt/project/build2/install/base/boot/u-boot-loam2.bin 
  of=/opt/project/build2/obj/mkflash/flash/flashprog.bin bs=4096 seek=0 count=80
  40+1 records in
  40+1 records out
  165380 bytes (165 kB) copied, 0.000120129 s, 1.4 GB/s
  dd if=/opt/project/build2/install/base/boot/MLO-nand 
  of=/opt/project/build2/obj/mkflash/flash/flashprog.bin bs=4096 seek=80 count=16
  3+1 records in
  3+1 records out
  15312 bytes (15 kB) copied, 1.932e-05 s, 793 MB/s
  mkdir -p /opt/project/build2/obj/mkflash/flash/rootfs
  cd /opt/project/build2/obj/mkflash/flash/rootfs && (cpio -u 
  --no-absolute-filenames -i < /opt/project/build2/deploy/root/rootfs.cpio || 
  true)
  /bin/sh: /opt/project/build2/deploy/root/rootfs.cpio: No such file or directory
  mkfs.jffs2 -n -r /opt/project/build2/obj/mkflash/flash/rootfs -p -e 128 -o 
  ../rootfs.jffs2
   > Building package:mkflash{flash}/installed  
  ++ pushd to /opt/project/build2/src/base/mkflash
   > make  -f Makefile.muddle install  
  mkdir -p /opt/project/build2/install/flash/flashprog
  install -m 0644 /opt/project/build2/obj/mkflash/flash/flashprog.bin 
  /opt/project/build2/install/flash/flashprog/flashprog.bin
  install -m 0644 /opt/project/build2/obj/mkflash/flash/rootfs.jffs2 
  /opt/project/build2/install/flash/rootfs.jffs2
  install: cannot stat `/opt/project/build2/obj/mkflash/flash/rootfs.jffs2': 
  No such file or directory
  make: *** [install] Error 1

  Can't build package:mkflash{flash}/postinstalled - Command 'make  -f 
  Makefile.muddle install' execution failed - 2
  trj@broonzy:/opt/project/build2$

Why, in particular, is it doing " > Building deployment:root/clean" instead
of doing a "distclean" on the deployment?

Original issue reported on code.google.com by t...@tibsnjoan.co.uk on 10 May 2012 at 10:35

GoogleCodeExporter commented 9 years ago
Fixed in e80161f2a9b52b17397aaae8441ff5fbaa989e6f

Original comment by t...@tibsnjoan.co.uk on 11 May 2012 at 3:31