Bug 60722 - java/jdk14-doc: empty PLIST
Summary: java/jdk14-doc: empty PLIST
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Ernst de Haan
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-30 09:20 UTC by toha
Modified: 2004-03-26 07:20 UTC (History)
0 users

See Also:


Attachments
file.diff (1.61 KB, patch)
2003-12-30 09:20 UTC, toha
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description toha 2003-12-30 09:20:16 UTC
	Empty PLIST in java/jdk14-doc

Fix: Simplify work with PLIST.
Comment 1 Sergey A. Osokin freebsd_committer 2003-12-30 10:38:27 UTC
Responsible Changed
From-To: freebsd-ports-bugs->znerd

Over to maintainer.
Comment 2 Ernst de Haan freebsd_committer 2004-01-02 12:25:37 UTC
State Changed
From-To: open->feedback

This update breaks the port: 

===>   Generating temporary packing list 
** Missing package files for jdk-doc-1.4.2. 
*** Error code 1
Comment 3 Ulrich Spoerlein 2004-03-25 23:43:23 UTC
Hi,

I can confirm this on 5.2.1-RELEASE. Here is the package list:

% more -- /var/db/pkg/jdk-doc-1.4.2/+CONTENTS
@comment PKG_FORMAT_REVISION:1.1
@name jdk-doc-1.4.2
@comment ORIGIN:java/jdk14-doc
@cwd /usr/local
@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info /dir; fi; fi

The attached patch results in a CONTENTS file looking like this:
@comment PKG_FORMAT_REVISION:1.1
@name jdk-doc-1.4.2
@comment ORIGIN:java/jdk14-doc
@cwd /usr/local
@cwd /usr/local/share/doc/jdk1.4
index.html
@comment MD5:dc4b36e0295d2ad4f6c0372125beb449
...
@dirrm api/index-files
@dirrm api
@cwd /
@dirrm /usr/local/share/doc/jdk1.4
@unexec if [ -f %D/info/dir ]; then if sed -e '1,/Menu:/d' %D/info/dir | grep -q '^[*] '; then true; else rm %D/info/dir; fi; fi

The @cwd's are ugly, but I can't think of a save way to do this,
without loosing the functionality of the user overriding TARGET_DIR.
It would be much easier, if the user could only set PREFIX and the
share/doc/jdk1.4 part was fixed...

Note: The post-extract should probably be moved before the do-install. I
just let it sit there, to make the diff more readable. I have tested
this on 5.2.1 only.

It looks like jdk1{1,2,3}-doc have the same problem. Do you want me to
provide patches for these too?


Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/java/jdk14-doc/Makefile,v
retrieving revision 1.30
diff -u -r1.30 Makefile
--- Makefile	10 Feb 2004 13:19:44 -0000	1.30
+++ Makefile	25 Mar 2004 23:36:49 -0000
@@ -36,12 +36,6 @@
 IGNORE=You must manually fetch ${DISTNAME}${EXTRACT_SUFX} from ${DOWNLOAD_URL}, place it in ${DISTDIR} and then run make again
 .endif
 
-pre-install:
-	@${ECHO_CMD} -n ">> Removing ${PLIST}..."
-	@${RM} -f ${PLIST}
-	@${TOUCH} ${PLIST}
-	@${ECHO_CMD} " [ DONE ]"
-
 do-install:
 	@${ECHO_CMD} -n ">> Creating directory ${TARGET_DIR}..."
 	@${MKDIR} ${TARGET_DIR}
@@ -51,11 +45,15 @@
 	@${CP} -r ${WRKSRC}/* ${TARGET_DIR}
 	@${ECHO_CMD} " [ DONE ]"
 
+post-extract:
 	@${ECHO_CMD} -n ">> Creating packing list..."
-	@${FIND} ${TARGET_DIR} -type f -print | \
-		${SED} "s,${PREFIX}/*,," >> ${PLIST}
-	@${FIND} ${TARGET_DIR} -type d -print | ${SORT} -r | \
-		${SED} -e "s,${PREFIX}/*,," -e "s,^,@dirrm ,g" >> ${PLIST}
+	@${ECHO_CMD} "@cwd ${TARGET_DIR}" > ${PLIST}
+	@${FIND} ${WRKSRC} -type f -print | \
+		${SED} -e "s,${WRKSRC}/*,," >> ${PLIST}
+	@${FIND} ${WRKSRC} -type d -print | ${SORT} -r | \
+		${SED} -e "s,${WRKSRC}/*,," -e "/^$$/d" -e "s,^,@dirrm ," >> ${PLIST}
+	@${ECHO_CMD} "@cwd /" >> ${PLIST}
+	@${ECHO_CMD} "@dirrm ${TARGET_DIR}" >> ${PLIST}
 	@${ECHO_CMD} " [ DONE ]"
 
 .include <bsd.port.post.mk>

Ulrich Spoerlein
-- 
PGP Key ID: F0DB9F44				Get it while it's hot!
PGP Fingerprint: F1CE D062 0CA9 ADE3 349B  2FE8 980A C6B5 F0DB 9F44
"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."	-- Benjamin Franklin
Comment 4 Ernst de Haan freebsd_committer 2004-03-26 07:14:17 UTC
State Changed
From-To: feedback->closed

Committed, thanks!
Comment 5 Ernst de Haan freebsd_committer 2004-03-26 07:16:29 UTC
Ulrich,


> The @cwd's are ugly, but I can't think of a save way to do this,
> without loosing the functionality of the user overriding TARGET_DIR.
> It would be much easier, if the user could only set PREFIX and the
> share/doc/jdk1.4 part was fixed...

It's not a requirement. If you provide a patch for this, I will commit it.

> Note: The post-extract should probably be moved before the do-install. I
> just let it sit there, to make the diff more readable. I have tested
> this on 5.2.1 only.
>
> It looks like jdk1{1,2,3}-doc have the same problem. Do you want me to
> provide patches for these too?

Please do! I've just committed this one. Thanks for your contributions!


Kind regards,


Ernst de Haan