Subject: gcc and dynamic PLISTs and staged installs and being able to remove
To: None <tech-pkg@NetBSD.org>
From: Jeremy C. Reed <reed@reedmedia.net>
List: tech-pkg
Date: 02/09/2005 19:54:34
I sometimes use FORCE_PKG_REGISTER with gcc because I don't want to remove
it before installing because it is my only gcc.
Today I noticed that my gcc3-c-3.3.4 included g77 and fortan and more.
This was caused by dynamic PLIST in lang/gcc3-c/Makefile.
May I commit this?
${INSTALL_DATA} ${WRKDIR}/gcc3.mk ${GCC_PREFIX}/mk/c.mk
${LN} -f ${GCC_PREFIX}/bin/gcc ${GCC_PREFIX}/bin/cc
${CP} -f ${PKGDIR}/PLIST ${PLIST_SRC}
- ${FIND} ${GCC_PREFIX} \( -type f -o -type l \) -print \
+ ${FIND} ${GCC_PREFIX} -newer ${EXTRACT_COOKIE} \
+ \( -type f -o -type l \) -print \
| ${SORT} | ${SED} -e "s,${PREFIX}/,,g" \
>> ${PLIST_SRC}
- ${FIND} ${GCC_PREFIX} -type d -print \
+ ${FIND} ${GCC_PREFIX} -newer ${EXTRACT_COOKIE} -type d -print \
| ${SORT} -r | ${SED} -e "s,${PREFIX}/,@dirrm ,g" \
>> ${PLIST_SRC}
(It appears to have worked for me.)
Maybe the -newer ${EXTRACT_COOKIE} should be used for other dynamic
PLISTs that use find also.
Also, this is a good example of where jmmv's staged installs would be
great. (I don't know if it works for gcc packages, but I assume it would.)
Then you could actually follow the suggestion to pkg_delete gcc-c before
you really install.
Can we commit jmmv's staged installs and use it optionally as needed?
Also, it sure would make it easier to deinstall and install quickly
software that is currently needed (versus doing pkg_delete and then hoping
the building and installing during the install step works correctly).
Jeremy C. Reed
BSD News, BSD tutorials, BSD links
http://www.bsdnewsletter.com/