FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 05-02-2012, 10:25 AM
Allan McRae
 
Default Fix pactest when scriptlet shell is specified

If --with-scriptlet-shell is specified, sylimk the shell to /bin/sh
in order for the "make check" to pass.

Signed-off-by: Allan McRae <allan@archlinux.org>
---

This at least works with --with-scriptlet-shell=/bin/bash...

test/pacman/Makefile.am | 9 +++++++++
test/pacman/{pmtest.py => pmtest.py.in} | 3 +++
2 files changed, 12 insertions(+)
rename test/pacman/{pmtest.py => pmtest.py.in} (98%)

diff --git a/test/pacman/Makefile.am b/test/pacman/Makefile.am
index d198ba2..b821458 100644
--- a/test/pacman/Makefile.am
+++ b/test/pacman/Makefile.am
@@ -19,4 +19,13 @@ EXTRA_DIST =
ldconfig.stub
$(check_SCRIPTS)

+CLEANFILES = pmtest.py
+
+edit = sed
+ -e 's|@SCRIPTLET_SHELL[@]|$(SCRIPTLET_SHELL)|g'
+
+pmtest.py: pmtest.py.in Makefile
+ $(AM_V_at)$(RM) $@
+ $(AM_V_GEN)test -f $(srcdir)/$@.in && $(edit) $(srcdir)/$@.in >$@
+
# vim:set ts=2 sw=2 noet:
diff --git a/test/pacman/pmtest.py b/test/pacman/pmtest.py.in
similarity index 98%
rename from test/pacman/pmtest.py
rename to test/pacman/pmtest.py.in
index 1a02686..ace532d 100644
--- a/test/pacman/pmtest.py
+++ b/test/pacman/pmtest.py.in
@@ -127,6 +127,9 @@ def generate(self):
os.makedirs(sys_dir, 0755)
# Only the dynamically linked binary is needed for fakechroot
shutil.copy("/bin/sh", bindir)
+ shell = "@SCRIPTLET_SHELL@"
+ if not shell == "/bin/sh":
+ os.symlink("/bin/sh", os.path.join(self.root, shell[1:]))
shutil.copy(os.path.join(util.SELFPATH, "ldconfig.stub"),
os.path.join(sbindir, "ldconfig"))
ld_so_conf = open(os.path.join(etcdir, "ld.so.conf"), "w")
--
1.7.10
 

Thread Tools




All times are GMT. The time now is 07:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org