busybox/busybox-rpm-E.patch
Ihno Krumreich 08d47d0085 Accepting request 689870 from home:kukuk:container
- Implement rpm -E %_dbpath for kiwi (busybox-rpm-E.patch)
- Don't require /bin/sh, be self contained

- update to 1.30.1
  * many bugfixes and new features
- obsolete busybox-1.18.3-libarchive.patch 
- obsolete busybox-resource.patch
- Update busybox*.config
- Merge busybox.spec and busybox-static.spec and build the static
  binary as subpackage

OBS-URL: https://build.opensuse.org/request/show/689870
OBS-URL: https://build.opensuse.org/package/show/Base:System/busybox?expand=0&rev=49
2019-04-02 11:46:57 +00:00

31 lines
804 B
Diff

--- archival/rpm.c
+++ archival/rpm.c 2019/03/29 10:59:36
@@ -358,7 +358,7 @@
INIT_G();
G.pagesize = getpagesize();
- while ((opt = getopt(argc, argv, "iqpldc")) != -1) {
+ while ((opt = getopt(argc, argv, "iqpldcE:")) != -1) {
switch (opt) {
case 'i': /* First arg: Install mode, with q: Information */
if (!func) func = rpm_install;
@@ -382,6 +382,18 @@
func |= rpm_query_list;
func |= rpm_query_list_config;
break;
+ case 'E': /* special hack for kiwi */
+ if (strcmp (optarg, "%_dbpath") == 0)
+ {
+ if (access ("/usr/lib/sysimage/rpm", F_OK) == 0)
+ printf ("/usr/lib/sysimage/rpm\n");
+ else
+ printf ("/var/lib/rpm\n");
+ return 0;
+ }
+ else
+ bb_show_usage();
+ break;
default:
bb_show_usage();
}