diff options
| author | Ron Yorston <rmy@pobox.com> | 2026-07-02 13:11:37 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2026-07-02 13:11:37 +0100 |
| commit | 882815f8740fe0c42ff53bc7df8f9bfb750d6944 (patch) | |
| tree | 10cd652d2185a95e96bfa8755f8db3fa4a643599 /archival | |
| parent | 20495b16aaf9bc888a6fc1d10b3746c506420b04 (diff) | |
| download | busybox-w32-master.tar.gz busybox-w32-master.tar.bz2 busybox-w32-master.zip | |
Update the 'rpm' applet so it also respects the BB_SYSTEMROOT
environment variable.
Replace chdir_system_drive() with xchdir_system_drive(), which
exits on failure to change directory.
Saves 32-36 bytes.
(GitHub PR #603)
Signed-off-by: Ron Yorston <rmy@pobox.com>
Diffstat (limited to 'archival')
| -rw-r--r-- | archival/dpkg.c | 2 | ||||
| -rw-r--r-- | archival/rpm.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/archival/dpkg.c b/archival/dpkg.c index e50f94ae6..dc9db92e6 100644 --- a/archival/dpkg.c +++ b/archival/dpkg.c | |||
| @@ -1864,7 +1864,7 @@ int dpkg_main(int argc UNUSED_PARAM, char **argv) | |||
| 1864 | } | 1864 | } |
| 1865 | } | 1865 | } |
| 1866 | 1866 | ||
| 1867 | chdir_system_drive(); | 1867 | xchdir_system_drive(); |
| 1868 | 1868 | ||
| 1869 | /* initialise data store */ | 1869 | /* initialise data store */ |
| 1870 | path = xstrdup(DPKG_DIR "/info"); | 1870 | path = xstrdup(DPKG_DIR "/info"); |
diff --git a/archival/rpm.c b/archival/rpm.c index c2f0550ff..81b3248d1 100644 --- a/archival/rpm.c +++ b/archival/rpm.c | |||
| @@ -308,9 +308,10 @@ static void extract_cpio(int fd, const char *source_rpm) | |||
| 308 | if (source_rpm != NULL) { | 308 | if (source_rpm != NULL) { |
| 309 | /* Binary rpm (it was built from some SRPM), install to root */ | 309 | /* Binary rpm (it was built from some SRPM), install to root */ |
| 310 | #if ENABLE_PLATFORM_MINGW32 | 310 | #if ENABLE_PLATFORM_MINGW32 |
| 311 | if (chdir_system_drive()) | 311 | xchdir_system_drive(); |
| 312 | #endif | 312 | #else |
| 313 | xchdir("/"); | 313 | xchdir("/"); |
| 314 | #endif | ||
| 314 | } /* else: SRPM, install to current dir */ | 315 | } /* else: SRPM, install to current dir */ |
| 315 | 316 | ||
| 316 | /* Initialize */ | 317 | /* Initialize */ |
