pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk print-pkg-size-this target:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ab46017dfaa0
branches:  trunk
changeset: 465260:ab46017dfaa0
user:      seb <seb%pkgsrc.org@localhost>
date:      Thu Dec 25 16:18:48 2003 +0000

description:
print-pkg-size-this target:

 - properly quote any filenames in ${PLIST} before feeding them
   to xargs. This allows latest textproc/docbook-xsl package
   to be registered with its correct size because it contains a file with
   a single quote in its name.

   XXX pkg_add does not like this filename anyway.

 - fix the awk script that parse ${PLIST} so pathname containing space
   (hence awk's NF > 1) are not removed from size calculation.

Many thanks to atatat@ to remind me the proper way to quote a shell
word.

diffstat:

 mk/bsd.pkg.mk |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (24 lines):

diff -r 9646722ab440 -r ab46017dfaa0 mk/bsd.pkg.mk
--- a/mk/bsd.pkg.mk     Thu Dec 25 14:46:50 2003 +0000
+++ b/mk/bsd.pkg.mk     Thu Dec 25 16:18:48 2003 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: bsd.pkg.mk,v 1.1327 2003/12/24 15:22:00 heinz Exp $
+#      $NetBSD: bsd.pkg.mk,v 1.1328 2003/12/25 16:18:48 seb Exp $
 #
 # This file is in the public domain.
 #
@@ -4379,11 +4379,11 @@
        @${SHCOMMENT} "This pkg's files" ;                              \
        ${AWK} 'BEGIN { base = "${PREFIX}/" }                           \
                /^@cwd/ { base = $$2 "/" }                              \
-               /^@ignore/ { next }                                     \
-               NF == 1 { print base $$1 }'                             \
+               /^@/ { next }                                           \
+               { print base $$0 }'                                     \
                <${PLIST}                                               \
        | ${SORT} -u                                                    \
-       | ${SED} -e 's, ,\\ ,g'                                         \
+       | ${SED} -e "s/'/'\\\\''/g" -e "s/.*/'&'/"                      \
        | ${XARGS} ${LS} -ld                                            \
        | ${AWK} 'BEGIN { print("0 "); }                                \
                  { print($$5, " + "); }                                \



Home | Main Index | Thread Index | Old Index