Re: [PATCH] rpm2cpio: allow building with rpm disabled

2017-08-22 Thread Denys Vlasenko
On Tue, Aug 22, 2017 at 11:57 AM, Ron Yorston  wrote:
> With rpm disabled and rpm2cpio enabled the build fails because the
> symbol ARCHIVE_REPLACE_VIA_RENAME isn't defined.
>
> Signed-off-by: Ron Yorston 
> ---
>  archival/rpm.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/archival/rpm.c b/archival/rpm.c
> index c24cfdf41..d779f0d90 100644
> --- a/archival/rpm.c
> +++ b/archival/rpm.c
> @@ -110,7 +110,7 @@ static void extract_cpio(int fd, const char *source_rpm)
>  * try "rpm -i foo.src.rpm" few times in a row -
>  * standard rpm will not complain.
>  */
> -   | ARCHIVE_REPLACE_VIA_RENAME;
> +   IF_RPM(| ARCHIVE_REPLACE_VIA_RENAME);
> archive_handle->src_fd = fd;
> /*archive_handle->offset = 0; - init_handle() did it */
>

Much larger parts of rpm.c should not be compiled if !RPM.

Fixed in git, please try it now.
___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[PATCH] rpm2cpio: allow building with rpm disabled

2017-08-22 Thread Ron Yorston
With rpm disabled and rpm2cpio enabled the build fails because the
symbol ARCHIVE_REPLACE_VIA_RENAME isn't defined.

Signed-off-by: Ron Yorston 
---
 archival/rpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/archival/rpm.c b/archival/rpm.c
index c24cfdf41..d779f0d90 100644
--- a/archival/rpm.c
+++ b/archival/rpm.c
@@ -110,7 +110,7 @@ static void extract_cpio(int fd, const char *source_rpm)
 * try "rpm -i foo.src.rpm" few times in a row -
 * standard rpm will not complain.
 */
-   | ARCHIVE_REPLACE_VIA_RENAME;
+   IF_RPM(| ARCHIVE_REPLACE_VIA_RENAME);
archive_handle->src_fd = fd;
/*archive_handle->offset = 0; - init_handle() did it */
 
-- 
2.13.5

___
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox