summaryrefslogtreecommitdiff
path: root/python/.footprint
diff options
context:
space:
mode:
authorJuergen Daubert <jue@jue.li>2013-04-21 11:48:33 +0200
committerJuergen Daubert <jue@jue.li>2013-04-21 11:48:33 +0200
commitb514894f5da89906ff578c4de289e282d9c0757d (patch)
treef14be582feb84fe2560da4fcecb06b96e2d39e3d /python/.footprint
parent07ef81ee5dad3fa08b29b84ac9ca7c8c03da06af (diff)
downloadopt-b514894f5da89906ff578c4de289e282d9c0757d.tar.gz
opt-b514894f5da89906ff578c4de289e282d9c0757d.tar.xz
python: fix issue with man-page symlink
0) Problem: Some people have an additional link to the python man-page: is the python footprint mismatch something I can fix or am I missing anything important? NEW lrwxrwxrwx root/root usr/man/man1/python.1.gz -> python2.1.gz 1) the relevant part of Makefile.pre.in: maninstall: altmaninstall -rm -f $(DESTDIR)$(MANDIR)/man1/python2.1 (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python$(VERSION).1 python2.1) -rm -f $(DESTDIR)$(MANDIR)/man1/python.1 (cd $(DESTDIR)$(MANDIR)/man1; $(LN) -s python2.1 python.1) 2) after 'make install' we have the following chain of symlinks: lrwxrwxrwx 1 juergen users 9 Apr 21 09:13 python.1 -> python2.1 lrwxrwxrwx 1 juergen users 11 Apr 21 09:13 python2.1 -> python2.7.1 -rw-r--r-- 1 juergen users 14582 Apr 21 09:12 python2.7.1 3) the compress_manpages function of our pkgmk: compress_manpages() { local FILE DIR TARGET cd $PKG find . -type f -path "*/man/man*/*" | while read FILE; do if [ "$FILE" = "${FILE%%.gz}" ]; then gzip -9 "$FILE" fi done find . -type l -path "*/man/man*/*" | while read FILE; do TARGET=`readlink -n "$FILE"` TARGET="${TARGET##*/}" TARGET="${TARGET%%.gz}.gz" rm -f "$FILE" FILE="${FILE%%.gz}.gz" DIR=`dirname "$FILE"` if [ -e "$DIR/$TARGET" ]; then ln -sf "$TARGET" "$FILE" fi done } 4) How it works: We search for real man-pages in $PKG and compress them, breaking all symlinks to these man-pages, which we repair afterwards. Fixing is done by adding a .gz extension to all targets of the symlinks. However, we do a test if $TARGET exists before we do the actual link, which is not the case if we have chained symlink and we do not process in the right order. For a "normal" collating we have the order python.1 before python2.1, so python2.1.gz does not exits at the time we process python.1
Diffstat (limited to 'python/.footprint')
-rw-r--r--python/.footprint1
1 files changed, 1 insertions, 0 deletions
diff --git a/python/.footprint b/python/.footprint
index b70d5c30e..84fd88480 100644
--- a/python/.footprint
+++ b/python/.footprint
@@ -3854,5 +3854,6 @@ drwxr-xr-x root/root usr/lib/python2.7/xml/sax/
-rw-r--r-- root/root usr/lib/python2.7/zipfile.pyo
drwxr-xr-x root/root usr/man/
drwxr-xr-x root/root usr/man/man1/
+lrwxrwxrwx root/root usr/man/man1/python.1.gz -> python2.7.1.gz
lrwxrwxrwx root/root usr/man/man1/python2.1.gz -> python2.7.1.gz
-rw-r--r-- root/root usr/man/man1/python2.7.1.gz

Generated by cgit