[PATCH] rpm2cpio: allow building with rpm disabled
Denys Vlasenko
vda.linux at googlemail.com
Tue Aug 22 13:34:46 UTC 2017
On Tue, Aug 22, 2017 at 11:57 AM, Ron Yorston <rmy at pobox.com> 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 <rmy at pobox.com>
> ---
> 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.
More information about the busybox
mailing list