diff mbox

[1/2] fs/iso9660: fix hybrid image support

Message ID 1438267651-16818-1-git-send-email-nrubinstein@aldebaran.com
State Changes Requested
Headers show

Commit Message

=?UTF-8?q?No=C3=A9=20Rubinstein?= July 30, 2015, 2:47 p.m. UTC
*_POST_GEN_HOOKS was never merged.

Suggested by Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Signed-off-by: Noé Rubinstein <nrubinstein@aldebaran.com>
---
 fs/iso9660/iso9660.mk | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Comments

Thomas Petazzoni July 30, 2015, 2:50 p.m. UTC | #1
Hello,

On Thu, 30 Jul 2015 16:47:30 +0200, Noé Rubinstein wrote:

> diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
> index d836194..9100547 100644
> --- a/fs/iso9660/iso9660.mk
> +++ b/fs/iso9660/iso9660.mk
> @@ -146,15 +146,14 @@ endif # ROOTFS_ISO9660_USE_INITRD
>  define ROOTFS_ISO9660_CMD
>  	$(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
>  		-no-emul-boot -boot-load-size 4 -boot-info-table \
> -		-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
> +		-o $@ $(ROOTFS_ISO9660_TARGET_DIR) \
> +	$(if $(ROOTFS_ISO9660_GEN_HYBRID), && $(ROOTFS_ISO9660_GEN_HYBRID))

Can you resubmit with the && thing ? It is not needed: make will
abort automatically if genisoimage fails.

Thanks,

Thomas
=?UTF-8?q?No=C3=A9=20Rubinstein?= July 30, 2015, 2:56 p.m. UTC | #2
On Thu, Jul 30, 2015 at 4:50 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Can you resubmit with the && thing ? It is not needed: make will
> abort automatically if genisoimage fails.

The issue is syntactic: ROOTFS_ISO9660_CMD is used in this line in common.mk:

    echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)

Therefore it can not contain any newline. This would be fixed by using
the file function in GNU make
<https://www.gnu.org/software/make/manual/html_node/File-Function.html>
but it would not work with GNU make 3.81.
Thomas Petazzoni July 30, 2015, 3:03 p.m. UTC | #3
Dear Noé Rubinstein,

On Thu, 30 Jul 2015 16:56:34 +0200, Noé Rubinstein wrote:
> On Thu, Jul 30, 2015 at 4:50 PM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
> > Can you resubmit with the && thing ? It is not needed: make will
> > abort automatically if genisoimage fails.
> 
> The issue is syntactic: ROOTFS_ISO9660_CMD is used in this line in common.mk:
> 
>     echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
> 
> Therefore it can not contain any newline. This would be fixed by using
> the file function in GNU make
> <https://www.gnu.org/software/make/manual/html_node/File-Function.html>
> but it would not work with GNU make 3.81.

Hum then maybe in the end my _POST_GEN_HOOKS idea is better?

Thomas
=?UTF-8?q?No=C3=A9=20Rubinstein?= July 30, 2015, 4:42 p.m. UTC | #4
> Hum then maybe in the end my _POST_GEN_HOOKS idea is better?

Would you prefer something like:

>  define ROOTFS_ISO9660_CMD
>         $(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
>                 -no-emul-boot -boot-load-size 4 -boot-info-table \
> -               -o $@ $(ROOTFS_ISO9660_TARGET_DIR)
> +               -o $@ $(ROOTFS_ISO9660_TARGET_DIR) ; \
> +       $(ROOTFS_ISO9660_GEN_HYBRID)
>  endef

--
Noé Rubinstein
Yann E. MORIN July 30, 2015, 9:19 p.m. UTC | #5
Thomas, All,

On 2015-07-30 17:03 +0200, Thomas Petazzoni spake thusly:
> On Thu, 30 Jul 2015 16:56:34 +0200, Noé Rubinstein wrote:
> > On Thu, Jul 30, 2015 at 4:50 PM, Thomas Petazzoni
> > <thomas.petazzoni@free-electrons.com> wrote:
> > > Can you resubmit with the && thing ? It is not needed: make will
> > > abort automatically if genisoimage fails.
> > 
> > The issue is syntactic: ROOTFS_ISO9660_CMD is used in this line in common.mk:
> > 
> >     echo "$$(ROOTFS_$(2)_CMD)" >> $$(FAKEROOT_SCRIPT)
> > 
> > Therefore it can not contain any newline. This would be fixed by using
> > the file function in GNU make
> > <https://www.gnu.org/software/make/manual/html_node/File-Function.html>
> > but it would not work with GNU make 3.81.
> 
> Hum then maybe in the end my _POST_GEN_HOOKS idea is better?

Yes, that would make it symetrical with the existing _PRE_GEN hooks.

Noé, would you care to implement this post-gen hooks and resubmit using
that, please?

Thanks! :-)

Regards,
Yann E. MORIN.
diff mbox

Patch

diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index d836194..9100547 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -146,15 +146,14 @@  endif # ROOTFS_ISO9660_USE_INITRD
 define ROOTFS_ISO9660_CMD
 	$(HOST_DIR)/usr/bin/genisoimage -J -R -b $(ROOTFS_ISO9660_BOOT_IMAGE) \
 		-no-emul-boot -boot-load-size 4 -boot-info-table \
-		-o $@ $(ROOTFS_ISO9660_TARGET_DIR)
+		-o $@ $(ROOTFS_ISO9660_TARGET_DIR) \
+	$(if $(ROOTFS_ISO9660_GEN_HYBRID), && $(ROOTFS_ISO9660_GEN_HYBRID))
 endef
 
 ifeq ($(BR2_TARGET_ROOTFS_ISO9660_HYBRID),y)
 define ROOTFS_ISO9660_GEN_HYBRID
 	$(HOST_DIR)/usr/bin/isohybrid -t 0x96 $@
 endef
-
-ROOTFS_ISO9660_POST_GEN_HOOKS += ROOTFS_ISO9660_GEN_HYBRID
 endif
 
 $(eval $(call ROOTFS_TARGET,iso9660))