NetBSD Problem Report #48647
From jbernard@knox.mines.edu Sat Mar 8 15:05:56 2014
Return-Path: <jbernard@knox.mines.edu>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id C2703A583D
for <gnats-bugs@gnats.NetBSD.org>; Sat, 8 Mar 2014 15:05:56 +0000 (UTC)
Message-Id: <201403081505.s28F5sN4017350@knox.mines.edu>
Date: Sat, 8 Mar 2014 08:05:54 -0700 (MST)
From: jbernard@mines.edu
Reply-To: jbernard@mines.edu
To: gnats-bugs@NetBSD.org
Subject: postinstall uses both DEST_DIR and DESTDIR variables for destdir
X-Send-Pr-Version: 3.95
>Number: 48647
>Category: bin
>Synopsis: postinstall uses both DEST_DIR and DESTDIR variables for destdir
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Mar 08 15:10:00 +0000 2014
>Closed-Date: Sat Mar 08 16:39:04 +0000 2014
>Last-Modified: Sat Mar 08 16:40:00 +0000 2014
>Originator: Jim Bernard
>Release: NetBSD 6.99.31
>Organization:
>Environment:
System: NetBSD 6.99.31 NetBSD #0: Sat Feb 15 18:45:02 MST 2014 i386
Architecture: i386
Machine: i386
>Description:
postinstall supports updating files rooted at a destination other
than /, which is handy for preparing an installation for later
use on the current system or another system, without altering the
running installation. This is done by supplying the arguments
"-d destdir" on the command line. Internally, the destination
directory is represented by the shell variable DEST_DIR, which
is set to the supplied "destdir". However, in revisions 1.103 and
1.106 the alternative spelling DESTDIR was introduced in 1 and 2
places, respectively. Of course, DESTDIR is never set, so the
supplied destdir is not used in those three places. The first,
from 1.103, is only in a message, so is harmless, though potentially
confusing to a reader of the message. The last two alter the
behavior of the code, potentially resulting in incorrect behavior.
>How-To-Repeat:
Inspection of the script usr.sbin/postinstall.
>Fix:
--- postinstall.orig 2014-02-15 12:42:54.000000000 -0700
+++ postinstall 2014-03-08 07:49:20.000000000 -0700
@@ -903,11 +903,11 @@
if [ "$conf_d_failed" = 1 ]; then
msg \
"Broken fontconfig configuration found; please delete these files"
msg \
- "in the ${DESTDIR}/etc/fonts/conf.d/ subdirectory:"
+ "in the ${DEST_DIR}/etc/fonts/conf.d/ subdirectory:"
msg \
" 10-autohint.conf 10-no-sub-pixel.conf 10-sub-pixel-bgr.conf"
msg \
" 10-sub-pixel-rgb.conf 10-sub-pixel-vbgr.conf"
msg \
@@ -1560,11 +1560,11 @@
_notfixed=""
if [ "${op}" = "fix" ]; then
_notfixed="${NOT_FIXED}"
fi
- if [ ! -d "${DESTDIR}${pcpath}" ]; then
+ if [ ! -d "${DEST_DIR}${pcpath}" ]; then
return 0
fi
# Delete obsolete files in the directory, and the directory
# itself. If the directory contains unexpected extra files
@@ -1576,11 +1576,11 @@
| obsolete_paths "${op}"
failed=$(( ${failed} + $? ))
# If the directory was removed above, then try to replace it with
# a file.
- if [ -d "${DESTDIR}${pcpath}" ]; then
+ if [ -d "${DEST_DIR}${pcpath}" ]; then
msg "${filemsg}${_notfixed}"
failed=$(( ${failed} + 1 ))
else
if ! find_file_in_dirlist pc "${pcpath}" \
"${pcsrcdir}" "${SRC_DIR}${pcpath%/*}"
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed
State-Changed-By: martin@NetBSD.org
State-Changed-When: Sat, 08 Mar 2014 16:39:04 +0000
State-Changed-Why:
Applied, thanks!
From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/48647 CVS commit: src/usr.sbin/postinstall
Date: Sat, 8 Mar 2014 16:36:24 +0000
Module Name: src
Committed By: martin
Date: Sat Mar 8 16:36:24 UTC 2014
Modified Files:
src/usr.sbin/postinstall: postinstall
Log Message:
Fix wrong variable name, PR bin/48647 from Jim Bernard.
To generate a diff of this commit:
cvs rdiff -u -r1.164 -r1.165 src/usr.sbin/postinstall/postinstall
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.