pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/34453: pkg_chk support .tgz packages only, but not .tbz
>Number: 34453
>Category: pkg
>Synopsis: pkg_chk support .tgz packages only, but not .tbz
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 02 14:35:00 +0000 2006
>Originator: Aleksey Cheusov <cheusov%tut.by@localhost>
>Release: NetBSD 3.0_STABLE
>Organization:
Best regards, Aleksey Cheusov.
>Environment:
System: NetBSD chen.chizhovka.net 3.0_STABLE NetBSD 3.0_STABLE (GENERIC) #2:
Sun Mar 12 12:49:58 GMT 2006
cheusov@chen:/usr/src/sys/arch/i386/compile/GENERIC i386
Architecture: i386
Machine: i386
>Description:
According to pkgsrc/mk/default/mk.conf
two values for PKG_SUFS are supported: .tgz and .tbz
while pkgtools/pkg_chk supports .tgz only
Fix is in attached file
>Fix:
--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=pkg_chk__tbz.patch
Content-Description: patch for pkg_chk
? README.html
? pkg_chk__tbz.patch
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_chk/Makefile,v
retrieving revision 1.43
diff -u -r1.43 Makefile
--- Makefile 25 Aug 2006 19:49:53 -0000 1.43
+++ Makefile 2 Sep 2006 14:26:43 -0000
@@ -19,7 +19,7 @@
CONFLICTS= pkgchk-[0-9]*
-INSTALLATION_DIRS= sbin man/man8
+INSTALLATION_DIRS= sbin ${PKGMANDIR}/man8
.include "../../mk/bsd.prefs.mk"
Index: files/pkg_chk.sh
===================================================================
RCS file: /cvsroot/pkgsrc/pkgtools/pkg_chk/files/pkg_chk.sh,v
retrieving revision 1.41
diff -u -r1.41 pkg_chk.sh
--- files/pkg_chk.sh 25 Aug 2006 19:49:54 -0000 1.41
+++ files/pkg_chk.sh 2 Sep 2006 14:26:43 -0000
@@ -23,7 +23,7 @@
done
return 1;
else
- if [ -f "$PACKAGES/$1.tgz" ]; then
+ if [ -f "$PACKAGES/$1$PKG_SUFX" ]; then
return 0;
else
return 1;
@@ -175,18 +175,21 @@
cd $PKGSRCDIR/pkgtools/pkg_chk
extract_make_vars Makefile AWK GREP GZIP_CMD SED SORT TSORT PACKAGES \
PKG_ADD PKG_DELETE PKG_INFO PKG_DBDIR PKGCHK_CONF \
- PKGCHK_UPDATE_CONF PKGCHK_TAGS PKGCHK_NOTAGS
+ PKGCHK_UPDATE_CONF PKGCHK_TAGS PKGCHK_NOTAGS PKG_SUFX
if [ -z "$PACKAGES" ];then
PACKAGES=$PKGSRCDIR/packages
fi
elif [ $MAKECONF != /dev/null ] ; then
extract_make_vars $MAKECONF PACKAGES PKGCHK_CONF PKGCHK_UPDATE_CONF \
- PKGCHK_TAGS PKGCHK_NOTAGS
+ PKGCHK_TAGS PKGCHK_NOTAGS PKG_SUFX
if [ -z "$PACKAGES" ] ; then
PACKAGES=`pwd`
fi
fi
+ # .tgz/.tbz to regexp
+ PKG_SUFX_RE=`echo $PKG_SUFX | sed 's/[.]/[.]/'`
+
if [ ! -d $PKG_DBDIR ] ; then
fatal "Unable to access PKG_DBDIR ($PKG_DBDIR)"
fi
@@ -240,7 +243,7 @@
get_build_ver()
{
if [ -n "$opt_b" -a -z "$opt_s" ] ; then
- ${PKG_INFO} -. -q -b $PACKAGES/$PKGNAME.tgz | ${GREP} .
+ ${PKG_INFO} -. -q -b $PACKAGES/$PKGNAME$PKG_SUFX | ${GREP} .
return
fi
# Unfortunately pkgsrc always outputs to a file, but it does helpfully
@@ -266,7 +269,7 @@
fatal_later "$PKGNAME - binary package missing"
continue
fi
- verbose "$PKGNAME.tgz: found"
+ verbose "$PKGNAME$PKG_SUFX: found"
DEPCHECKLIST="$DEPCHECKLIST$PKGNAME ";
done
@@ -275,18 +278,18 @@
while [ "$DEPCHECKLIST" != ' ' ]; do
NEXTCHECK=' '
for pkg in $DEPCHECKLIST ; do
- DEPLIST="$(${PKG_INFO} -. -q -N $PACKAGES/$pkg.tgz | ${GREP} .. ||
true)"
+ DEPLIST="$(${PKG_INFO} -. -q -N $PACKAGES/$pkg$PKG_SUFX | ${GREP}
.. || true)"
if [ -z "$DEPLIST" ] ; then
- PAIRLIST="${PAIRLIST}$pkg.tgz $pkg.tgz\n"
+ PAIRLIST="${PAIRLIST}$pkg$PKG_SUFX $pkg$PKG_SUFX\n"
fi
for dep in $DEPLIST ; do
if is_binary_available $dep; then
:
else
- fatal_later "$dep.tgz - dependency missing for $pkg"
+ fatal_later "$dep$PKG_SUFX - dependency missing for $pkg"
break
fi
- PAIRLIST="${PAIRLIST}$dep.tgz $pkg.tgz\n"
+ PAIRLIST="${PAIRLIST}$dep$PKG_SUFX $pkg$PKG_SUFX\n"
case "$PKGLIST$DEPCHECKLIST$NEXTCHECK" in
*" $dep "*)
verbose "$pkg: Duplicate depend $dep"
@@ -474,7 +477,7 @@
if [ -n "$saved_PKG_PATH" ] ; then
export PKG_PATH=$saved_PKG_PATH
fi
- run_cmd "${PKG_ADD} $PACKAGES/$PKGNAME.tgz"
+ run_cmd "${PKG_ADD} $PACKAGES/$PKGNAME$PKG_SUFX"
if [ -n "$saved_PKG_PATH" ] ; then
unset PKG_PATH
fi
@@ -737,9 +740,9 @@
if [ -d "$PACKAGES" ] ; then
msg_progress Scan $PACKAGES
cd $PACKAGES
- for f in `ls -t | grep '\.tgz$'` ; do # Sort by time to pick up
newest first
+ for f in `ls -t | grep "$PKG_SUFX_RE"'$'` ; do # Sort by time
to pick up newest first
PKGDIR=`${PKG_INFO} -. -B $PACKAGES/$f|${AWK} -F=
'$1=="PKGPATH"{print $2}'`
- PKGNAME=`echo $f | ${SED} 's/\.tgz$//'`
+ PKGNAME=`echo $f | ${SED} "s/$PKG_SUFX"'$//'`
PKGDB="${PKGDB} $PKGDIR:$PKGNAME"
done
PKGSRCDIR=NONE
--=-=-=
--
Best regards, Aleksey Cheusov.
--=-=-=--
>Unformatted:
--=-=-=
Home |
Main Index |
Thread Index |
Old Index