[Lunar-commits] <moonbase> rpm & rpmunpack: prevent file conflict

Paul Bredbury brebs at lunar-linux.org
Fri Jan 14 09:58:37 CET 2011


commit 5d2eaaaf796eac2535b5deafca395ed8807a7e72
Author: Paul Bredbury <brebs at lunar-linux.org>
Date:   Fri Jan 14 15:58:37 2011 +0700

    rpm & rpmunpack: prevent file conflict
    
    Over /usr/bin/rpm2cpio
---
 archive/rpmunpack/BUILD |   10 ++++++++--
 zbeta/rpm/BUILD         |    7 +++----
 zbeta/rpm/POST_REMOVE   |    2 ++
 3 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/archive/rpmunpack/BUILD b/archive/rpmunpack/BUILD
index 9534f5d..7c13fc0 100644
--- a/archive/rpmunpack/BUILD
+++ b/archive/rpmunpack/BUILD
@@ -1,8 +1,14 @@
 (
+
   cp ${SOURCE_CACHE}/$SOURCE2 rpm2cpio  &&
   patch_it $SOURCE3 0 &&
   make                &&
   prepare_install     &&
-  install  -s  rpmunpack  /usr/bin  &&
-  install  rpm2cpio /usr/bin
+  install -m755 -s  rpmunpack  /usr/bin/  &&
+
+  if ! module_installed rpm ; then
+    # rpm module provides /usr/bin/rpm2cpio
+    install -m755 rpm2cpio /usr/bin/
+  fi
+
 ) > $C_FIFO 2>&1
diff --git a/zbeta/rpm/BUILD b/zbeta/rpm/BUILD
index 2518b78..7de6e5d 100644
--- a/zbeta/rpm/BUILD
+++ b/zbeta/rpm/BUILD
@@ -1,11 +1,10 @@
 (
 
-  sed -i -r 's@#if\ defined\(EOWNERDEAD\)@#if\ defined\(EOWNERDEAD\)\ \&\&\ defined\(PTHREAD_MUTEX_ROBUST_NP\)@' \
-  db/mutex/mut_pthread.c &&
+  sed -i -r 's@#if\ defined\(EOWNERDEAD\)@#if\ defined\(EOWNERDEAD\)\ \&\&\ defined\(PTHREAD_MUTEX_ROBUST_NP\)@' db/mutex/mut_pthread.c &&
 
-  LDFLAGS=$(echo $LDFLAGS | sed  s/"-z combreloc"// )
+  LDFLAGS=$(echo $LDFLAGS | sed  s/"-z combreloc"// ) &&
 
-  OPTS+=" --without-selinux"
+  OPTS+=" --without-selinux" &&
 
   default_build
 
diff --git a/zbeta/rpm/POST_REMOVE b/zbeta/rpm/POST_REMOVE
new file mode 100644
index 0000000..bb0d0fe
--- /dev/null
+++ b/zbeta/rpm/POST_REMOVE
@@ -0,0 +1,2 @@
+# Install /usr/bin/rpm2cpio
+lin -c rpmunpack


More information about the Lunar-commits mailing list