tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

PLIST management feature?


is there a general way of extracting lines from a PLIST based on 
${} for further processing?

While growing amd64 support for wip/tsm62, I figured I might want to 
make java gui support optional for server setups that hardly ever see a 
restore operation. The tsm binaries ship as rpm archives wrapped in a 
tarball; 'do-extract' will untar, and during 'install' rpm2pkg will 
unpack the lot into the staging area. At this point, I need to remove 
the java-related files that are marked optional in the PLIST.

For now, I have come up with the little sed(1) dance in

.if empty(PKG_OPTIONS:Mjava)
        for _fff in `${SED} -e '/^[$$]{PLIST\.java}/!d' -e 
's/^[$$]{PLIST\.java}//g' ${PLIST_SRC}`; do \
            ${RM} -f ${DESTDIR}${PREFIX}/$${_fff}; \

which does the trick, but earns me a pkglint(8) complaint for running 
sed in the install phase, and is generally a bit unsavoury. Is there a 
better way?


     The ASCII Ribbon Campaign                    Hauke Fath
()     No HTML/RTF in email            Institut für Nachrichtentechnik
/\     No Word docs in email                     TU Darmstadt
     Respect for open standards              Ruf +49-6151-16-3281

Home | Main Index | Thread Index | Old Index