[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [patch] Avoid building open_transformer
From:       Paul Brook <paul () codesourcery ! com>
Date:       2006-12-26 19:14:59
Message-ID: 200612261915.01145.paul () codesourcery ! com
[Download RAW message or body]

The code in archival/libunarchive/open_transformer.c uses fork() to spawn a 
subprocess. This doesn't work (or even build!) on targets that don't have 
fork, eg. uclinux.

The attached patch tweaks the build system to only build this file when it is 
needed.

Paul

["patch" (text/x-diff)]

Index: archival/libunarchive/Kbuild
===================================================================
--- archival/libunarchive/Kbuild	(revision 17084)
+++ archival/libunarchive/Kbuild	(working copy)
@@ -26,7 +26,6 @@ lib-y:= \
 \
 	data_align.o \
 	find_list_entry.o \
-	open_transformer.o \
 	init_handle.o
 
 GUNZIP_FILES:= check_header_gzip.o decompress_unzip.o
@@ -42,18 +41,18 @@ lib-$(CONFIG_UNLZMA)			+= decompress_unl
 lib-$(CONFIG_CPIO)			+= get_header_cpio.o
 lib-$(CONFIG_DPKG)			+= $(DPKG_FILES)
 lib-$(CONFIG_DPKG_DEB)			+= $(DPKG_FILES)
-lib-$(CONFIG_FEATURE_DEB_TAR_GZ)	+= $(GUNZIP_FILES) get_header_tar_gz.o
-lib-$(CONFIG_FEATURE_DEB_TAR_BZ2)	+= decompress_bunzip2.o get_header_tar_bz2.o
-lib-$(CONFIG_FEATURE_DEB_TAR_LZMA)	+= decompress_unlzma.o get_header_tar_lzma.o
+lib-$(CONFIG_FEATURE_DEB_TAR_GZ)	+= $(GUNZIP_FILES) get_header_tar_gz.o open_transformer.o
+lib-$(CONFIG_FEATURE_DEB_TAR_BZ2)	+= decompress_bunzip2.o get_header_tar_bz2.o open_transformer.o
+lib-$(CONFIG_FEATURE_DEB_TAR_LZMA)	+= decompress_unlzma.o get_header_tar_lzma.o open_transformer.o
 lib-$(CONFIG_GUNZIP)			+= $(GUNZIP_FILES)
 lib-$(CONFIG_FEATURE_GUNZIP_UNCOMPRESS)	+= decompress_uncompress.o
 lib-$(CONFIG_RPM2CPIO)			+= $(GUNZIP_FILES) get_header_cpio.o
-lib-$(CONFIG_RPM)			+= $(GUNZIP_FILES) get_header_cpio.o
+lib-$(CONFIG_RPM)			+= $(GUNZIP_FILES) get_header_cpio.o open_transformer.o
 lib-$(CONFIG_TAR)			+= get_header_tar.o
-lib-$(CONFIG_FEATURE_TAR_BZIP2)		+= decompress_bunzip2.o get_header_tar_bz2.o
-lib-$(CONFIG_FEATURE_TAR_LZMA)		+= decompress_unlzma.o get_header_tar_lzma.o
-lib-$(CONFIG_FEATURE_TAR_GZIP)		+= $(GUNZIP_FILES) get_header_tar_gz.o
-lib-$(CONFIG_FEATURE_TAR_COMPRESS)	+= decompress_uncompress.o
+lib-$(CONFIG_FEATURE_TAR_BZIP2)		+= decompress_bunzip2.o get_header_tar_bz2.o open_transformer.o
+lib-$(CONFIG_FEATURE_TAR_LZMA)		+= decompress_unlzma.o get_header_tar_lzma.o open_transformer.o
+lib-$(CONFIG_FEATURE_TAR_GZIP)		+= $(GUNZIP_FILES) get_header_tar_gz.o open_transformer.o
+lib-$(CONFIG_FEATURE_TAR_COMPRESS)	+= decompress_uncompress.o open_transformer.o
 lib-$(CONFIG_UNCOMPRESS)		+= decompress_uncompress.o
 lib-$(CONFIG_UNZIP)			+= $(GUNZIP_FILES)
 lib-$(CONFIG_FEATURE_COMPRESS_USAGE)	+= decompress_bunzip2.o


_______________________________________________
busybox mailing list
busybox@busybox.net
http://busybox.net/cgi-bin/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic