* [gentoo-commits] gentoo-x86 commit in profiles/prefix/hpux: profile.bashrc
@ 2009-07-14 14:47 Michael Haubenwallner (haubi)
0 siblings, 0 replies; 4+ messages in thread
From: Michael Haubenwallner (haubi) @ 2009-07-14 14:47 UTC (permalink / raw
To: gentoo-commits
haubi 09/07/14 14:47:31
Modified: profile.bashrc
Log:
preserve busy text files based on installed file types, not to-be-installed ones
Revision Changes Path
1.2 profiles/prefix/hpux/profile.bashrc
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?r1=1.1&r2=1.2
Index: profile.bashrc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- profile.bashrc 6 Jun 2009 03:54:51 -0000 1.1
+++ profile.bashrc 14 Jul 2009 14:47:31 -0000 1.2
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.1 2009/06/06 03:54:51 solar Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.2 2009/07/14 14:47:31 haubi Exp $
# On hpux, binary files (executables, shared libraries) in use
# cannot be replaced during merge.
@@ -10,8 +10,13 @@
# This is a workaround for portage bug#199868,
# and should be dropped once portage does sth. like this itself.
-post_pkg_preinst() {
- removedlist="${EROOT}var/lib/portage/files2bremoved"
+hpux-busytext-get-listfile() {
+ echo "${ROOT%%/}${EPREFIX}/var/lib/portage/files2bremoved"
+}
+
+hpux-busytext-cleanup() {
+ local removedlist=$(hpux-busytext-get-listfile)
+
rm -f "${removedlist}".new
if [[ -r ${removedlist} ]]; then
@@ -24,15 +29,17 @@
touch "${removedlist}"{,.new} # ensure they exist
- while read rmstem; do
+ local rmstem f
+ while read rmstem
+ do
# try to remove previously recorded files
- for f in "${ROOT}${rmstem}"*; do
+ for f in $(ls "${ROOT}${rmstem}"*); do
echo "trying to remove old busy text file ${f}"
rm -f "${f}"
done
# but keep it in list if still exists
- for f in "${ROOT}${rmstem}"*; do
- [[ -f ${f} ]] && echo "${rmstem}" >> "${removedlist}".new
+ for f in $(ls "${ROOT}${rmstem}"*); do
+ echo "${rmstem}" >> "${removedlist}".new
break
done
done < "${removedlist}"
@@ -41,30 +48,61 @@
mv "${removedlist}"{,.old}
mv "${removedlist}"{.new,}
rm "${removedlist}".old
-
+}
+
+hpux-busytext-backup() {
+ local removedlist=$(hpux-busytext-get-listfile)
+
# now go for current package
- cd "${D}"
- find ".${EPREFIX}" -type f | xargs -r /usr/bin/file | grep 'object file' | while read f t
- do
- f=${f#./} # find prints: "./path/to/file"
- f=${f%:} # file prints: "file-argument: type-of-file"
- test -r "${ROOT}${f}" || continue
- rmstem="${f}.removedbyportage"
- # keep list of old busy text files unique
- grep "^${rmstem}$" "${removedlist}" >/dev/null \
- || echo "${rmstem}" >> "${removedlist}"
- n=0
- while [[ ${n} -lt 100 && -f "${ROOT}${rmstem}${n}" ]]; do
- n=$((n=n+1))
- done
+ cd "${D}" || exit 1
+
+ /usr/bin/find ".${EPREFIX}" '!' -type d \
+ | while read f
+ do
+ f=${f#./}
+ [[ ! -f ${ROOT}${f} || -h ${ROOT}${f} ]] && continue
+ echo "${ROOT}${f}"
+ done \
+ | xargs -r /usr/bin/file \
+ | /usr/bin/grep -E '(object file|shared library|executable)' \
+ | while read f t
+ do
+ # file prints: "file-argument: type-of-file"
+ f=${f#${ROOT}}
+ f=${f%:}
+ test -r "${ROOT}${f}" || continue
+ rmstem="${f}.removedbyportage"
+ # keep list of old busy text files unique
+ /usr/bin/grep "^${rmstem/[/\\[}$" "${removedlist}" >/dev/null \
+ || echo "${rmstem}" >> "${removedlist}"
+ n=0
+ while [[ ${n} -lt 100 && -f "${ROOT}${rmstem}${n}" ]]; do
+ n=$((n=n+1))
+ done
+
+ if [[ ${n} -ge 100 ]]; then
+ echo "too many (>=100) old text files busy of '${ROOT}${f}'" >&2
+ exit 1
+ fi
+ echo "backing up text file ${ROOT}${f} (${n})"
+ /usr/bin/mv -f "${ROOT}${f}" "${ROOT}${rmstem}${n}" || exit 1
+ /usr/bin/cp -f "${ROOT}${rmstem}${n}" "${ROOT}${f}" || exit 1
+ done || exit 1
+}
+
+prefix_hpux-post_pkg_preinst() {
+ hpux-busytext-cleanup
+ hpux-busytext-backup
+}
+
+prefix_hpux-pre_pkg_postinst() {
+ hpux-busytext-cleanup
+}
+
+post_pkg_preinst() {
+ prefix_hpux-pre_pkg_postinst
+}
- if [[ ${n} -ge 100 ]]; then
- echo "too many (>=100) old text files busy of '${ROOT}${f}'" >&2
- exit 1
- fi
- echo "backing up text file ${ROOT}${f} (${n})"
- mv "${ROOT}${f}" "${ROOT}${rmstem}${n}" || exit 1
- # preserve original binary (required for bash fex)
- cp -p "${ROOT}${rmstem}${n}" "${ROOT}${f}" || exit 1
- done
+pre_pkg_postinst() {
+ prefix_hpux-pre_pkg_postinst
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in profiles/prefix/hpux: profile.bashrc
@ 2009-07-21 9:49 Michael Haubenwallner (haubi)
0 siblings, 0 replies; 4+ messages in thread
From: Michael Haubenwallner (haubi) @ 2009-07-21 9:49 UTC (permalink / raw
To: gentoo-commits
haubi 09/07/21 09:49:09
Modified: profile.bashrc
Log:
typo calling 'prefix_hpux-pre_pkg_postinst' while it should have been 'prefix_hpux-post_pkg_preinst'
Revision Changes Path
1.3 profiles/prefix/hpux/profile.bashrc
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?r1=1.2&r2=1.3
Index: profile.bashrc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- profile.bashrc 14 Jul 2009 14:47:31 -0000 1.2
+++ profile.bashrc 21 Jul 2009 09:49:09 -0000 1.3
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.2 2009/07/14 14:47:31 haubi Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.3 2009/07/21 09:49:09 haubi Exp $
# On hpux, binary files (executables, shared libraries) in use
# cannot be replaced during merge.
@@ -100,7 +100,7 @@
}
post_pkg_preinst() {
- prefix_hpux-pre_pkg_postinst
+ prefix_hpux-post_pkg_preinst
}
pre_pkg_postinst() {
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in profiles/prefix/hpux: profile.bashrc
@ 2009-07-22 16:29 Michael Haubenwallner (haubi)
0 siblings, 0 replies; 4+ messages in thread
From: Michael Haubenwallner (haubi) @ 2009-07-22 16:29 UTC (permalink / raw
To: gentoo-commits
haubi 09/07/22 16:29:51
Modified: profile.bashrc
Log:
work around missing mechanism to stack profile.bashrc hooks
Revision Changes Path
1.4 profiles/prefix/hpux/profile.bashrc
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/profiles/prefix/hpux/profile.bashrc?r1=1.3&r2=1.4
Index: profile.bashrc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- profile.bashrc 21 Jul 2009 09:49:09 -0000 1.3
+++ profile.bashrc 22 Jul 2009 16:29:51 -0000 1.4
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.3 2009/07/21 09:49:09 haubi Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.4 2009/07/22 16:29:51 haubi Exp $
# On hpux, binary files (executables, shared libraries) in use
# cannot be replaced during merge.
@@ -99,10 +99,12 @@
hpux-busytext-cleanup
}
-post_pkg_preinst() {
- prefix_hpux-post_pkg_preinst
-}
+# These are because of
+# http://archives.gentoo.org/gentoo-dev/msg_529a0806ed2cf841a467940a57e2d588.xml
+# The profile-* ones are meant to be used in etc/portage/profile.bashrc by user
+# until there is the registration mechanism.
+profile-post_pkg_preinst() { prefix_hpux-post_pkg_preinst ; }
+ post_pkg_preinst() { prefix_hpux-post_pkg_preinst ; }
-pre_pkg_postinst() {
- prefix_hpux-pre_pkg_postinst
-}
+profile-pre_pkg_postinst() { prefix_hpux-pre_pkg_postinst ; }
+ pre_pkg_postinst() { prefix_hpux-pre_pkg_postinst ; }
^ permalink raw reply [flat|nested] 4+ messages in thread
* [gentoo-commits] gentoo-x86 commit in profiles/prefix/hpux: profile.bashrc
@ 2010-12-23 15:15 Michael Haubenwallner (haubi)
0 siblings, 0 replies; 4+ messages in thread
From: Michael Haubenwallner (haubi) @ 2010-12-23 15:15 UTC (permalink / raw
To: gentoo-commits
haubi 10/12/23 15:15:34
Modified: profile.bashrc
Log:
must not use korn shell /bin/sh as CONFIG_SHELL on hpux too, but bash instead
Revision Changes Path
1.5 profiles/prefix/hpux/profile.bashrc
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/profiles/prefix/hpux/profile.bashrc?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/profiles/prefix/hpux/profile.bashrc?r1=1.4&r2=1.5
Index: profile.bashrc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- profile.bashrc 22 Jul 2009 16:29:51 -0000 1.4
+++ profile.bashrc 23 Dec 2010 15:15:34 -0000 1.5
@@ -1,6 +1,10 @@
-# Copyright 1999-2009 Gentoo Foundation
+# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.4 2009/07/22 16:29:51 haubi Exp $
+# $Header: /var/cvsroot/gentoo-x86/profiles/prefix/hpux/profile.bashrc,v 1.5 2010/12/23 15:15:34 haubi Exp $
+
+# /bin/sh is korn shell, incompatible with bash used by makefiles later.
+# This is a problem with recent libtool detecting non-bashism 'print' fex.
+export CONFIG_SHELL=${BASH}
# On hpux, binary files (executables, shared libraries) in use
# cannot be replaced during merge.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-12-23 15:15 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-22 16:29 [gentoo-commits] gentoo-x86 commit in profiles/prefix/hpux: profile.bashrc Michael Haubenwallner (haubi)
-- strict thread matches above, loose matches on Subject: below --
2010-12-23 15:15 Michael Haubenwallner (haubi)
2009-07-21 9:49 Michael Haubenwallner (haubi)
2009-07-14 14:47 Michael Haubenwallner (haubi)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox