Fri Apr 12 13:53:57 2013 UTC ()
Allow running on systems where pkg_admin is not in PATH


(joerg)
diff -r1.19 -r1.20 pkgsrc/mk/misc/developer.mk
diff -r1.2 -r1.3 pkgsrc/mk/scripts/remove_todo

cvs diff -r1.19 -r1.20 pkgsrc/mk/misc/developer.mk (expand / switch to unified diff)

--- pkgsrc/mk/misc/developer.mk 2011/09/15 21:45:52 1.19
+++ pkgsrc/mk/misc/developer.mk 2013/04/12 13:53:57 1.20
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: developer.mk,v 1.19 2011/09/15 21:45:52 wiz Exp $ 1# $NetBSD: developer.mk,v 1.20 2013/04/12 13:53:57 joerg Exp $
2# 2#
3# Public targets for developers: 3# Public targets for developers:
4# 4#
5# changes-entry-noupdate: 5# changes-entry-noupdate:
6# Appends a correctly-formatted entry to the pkgsrc CHANGES file, 6# Appends a correctly-formatted entry to the pkgsrc CHANGES file,
7# and removes any TODO entries that were completed with this 7# and removes any TODO entries that were completed with this
8# update from the TODO file. 8# update from the TODO file.
9# The CHANGES and TODO files are presumed to be up to date and writable. 9# The CHANGES and TODO files are presumed to be up to date and writable.
10# Note that the first assumption is often wrong and that the 10# Note that the first assumption is often wrong and that the
11# second is wrong for those that set CVSREAD. 11# second is wrong for those that set CVSREAD.
12# 12#
13# Command-line variables: 13# Command-line variables:
14# 14#
@@ -107,27 +107,27 @@ _CE_MSG= ${_CE_MSG1} ${_CE_MSG2} @@ -107,27 +107,27 @@ _CE_MSG= ${_CE_MSG1} ${_CE_MSG2}
107 107
108# Targets for the update, add, commit elementary operations. 108# Targets for the update, add, commit elementary operations.
109changes-entry-update: .PHONY ce-error-check 109changes-entry-update: .PHONY ce-error-check
110 @${STEP_MSG} "Updating ${PKGSRC_CHANGES:T} and ${PKGSRC_TODO:T}" 110 @${STEP_MSG} "Updating ${PKGSRC_CHANGES:T} and ${PKGSRC_TODO:T}"
111 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} update ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} 111 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} update ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T}
112 ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_CHANGES:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_CHANGES:T} 112 ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_CHANGES:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_CHANGES:T}
113 ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_TODO:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_TODO:T} 113 ${RUN} cd ${PKGSRC_CHANGES_DIR} && test -w ${PKGSRC_TODO:T} || cvs ${_NB_CVSROOT} edit ${PKGSRC_TODO:T}
114 114
115changes-entry-add: .PHONY ce-error-check 115changes-entry-add: .PHONY ce-error-check
116 @${STEP_MSG} "Adding the change" 116 @${STEP_MSG} "Adding the change"
117 ${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${PKGSRC_CHANGES} 117 ${RUN} ${ECHO} " "${_CE_MSG:Q} >> ${PKGSRC_CHANGES}
118 118
119todo-entry-remove: 119todo-entry-remove:
120 ${RUN} ${SH} ${PKGSRCDIR}/mk/scripts/remove_todo ${PKGSRC_TODO} ${PKGBASE} ${PKGVERSION} 120 ${RUN} PKG_ADMIN=${PKG_ADMIN_CMD:Q} ${SH} ${PKGSRCDIR}/mk/scripts/remove_todo ${PKGSRC_TODO} ${PKGBASE} ${PKGVERSION}
121 121
122changes-entry-commit: .PHONY ce-error-check 122changes-entry-commit: .PHONY ce-error-check
123 @${STEP_MSG} "Committing the change" 123 @${STEP_MSG} "Committing the change"
124 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} commit -m ${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T} 124 ${RUN} cd ${PKGSRC_CHANGES_DIR} && cvs ${_NB_CVSROOT} commit -m ${_CE_MSG1:Q} ${PKGSRC_CHANGES:T} ${PKGSRC_TODO:T}
125 125
126ce-error-check: .PHONY 126ce-error-check: .PHONY
127.if defined(_CE_ERRORS) && !empty(_CE_ERRORS:M*) 127.if defined(_CE_ERRORS) && !empty(_CE_ERRORS:M*)
128 ${RUN} for msg in ${_CE_ERRORS}; do ${ERROR_MSG} "$$msg"; done; exit 1 128 ${RUN} for msg in ${_CE_ERRORS}; do ${ERROR_MSG} "$$msg"; done; exit 1
129.else 129.else
130 @${DO_NADA} 130 @${DO_NADA}
131.endif 131.endif
132 132
133# Public targets 133# Public targets

cvs diff -r1.2 -r1.3 pkgsrc/mk/scripts/remove_todo (expand / switch to unified diff)

--- pkgsrc/mk/scripts/remove_todo 2009/09/10 15:35:50 1.2
+++ pkgsrc/mk/scripts/remove_todo 2013/04/12 13:53:57 1.3
@@ -13,30 +13,31 @@ @@ -13,30 +13,31 @@
13set -e 13set -e
14 14
15if [ "$#" != 3 ] 15if [ "$#" != 3 ]
16then 16then
17 echo incorrect number of arguments >&2 17 echo incorrect number of arguments >&2
18 echo usage: $0 TODO-FILE PKGBASE PKGVERSION >&2 18 echo usage: $0 TODO-FILE PKGBASE PKGVERSION >&2
19 exit 1 19 exit 1
20fi 20fi
21 21
22TODO=$1 22TODO=$1
23PKGBASE=$(echo $2 | sed "s/^py[0-9][0-9]-/py-/") 23PKGBASE=$(echo $2 | sed "s/^py[0-9][0-9]-/py-/")
24PKGVERSION=$3 24PKGVERSION=$3
25TMPFILE="$TODO.$$" 25TMPFILE="$TODO.$$"
 26PKG_ADMIN="${PKG_ADMIN:-pkg_admin}"
26 27
27MATCH=$(grep -n '^[ ]*o '"$PKGBASE"'-[0-9]' "$TODO" | sed 's/^\([^:]*:\)[ ]*o /\1/;s/ .*//') 28MATCH=$(grep -n '^[ ]*o '"$PKGBASE"'-[0-9]' "$TODO" | sed 's/^\([^:]*:\)[ ]*o /\1/;s/ .*//')
28 29
29if [ $(echo "$MATCH" | wc -l) != 1 ]; then 30if [ $(echo "$MATCH" | wc -l) != 1 ]; then
30 echo "$0: multiple matches" 1>&2 31 echo "$0: multiple matches" 1>&2
31 echo "$MATCH" 1>&2 32 echo "$MATCH" 1>&2
32 exit 1 33 exit 1
33fi 34fi
34 35
35LINE=$(echo "$MATCH" | sed 's/:.*//') 36LINE=$(echo "$MATCH" | sed 's/:.*//')
36FOUNDPKG=$(echo "$MATCH" | sed -e "s/^[^:]*://") 37FOUNDPKG=$(echo "$MATCH" | sed -e "s/^[^:]*://")
37 38
38if pkg_admin pmatch "$PKGBASE"\<="$PKGVERSION" "$FOUNDPKG"; then 39if ${PKG_ADMIN} pmatch "$PKGBASE"\<="$PKGVERSION" "$FOUNDPKG"; then
39 echo Removing "$FOUNDPKG" from TODO 40 echo Removing "$FOUNDPKG" from TODO
40 sed < "$TODO" "$LINE"d > "$TMPFILE" 41 sed < "$TODO" "$LINE"d > "$TMPFILE"
41 mv "$TMPFILE" "$TODO" 42 mv "$TMPFILE" "$TODO"
42fi 43fi