Bug 92444 - bdiff requires unavailable /usr/bin/tempfile
Summary: bdiff requires unavailable /usr/bin/tempfile
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: bzip2   
(Show other bugs)
Version: 9
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jiri Ryska
QA Contact: Ben Levenson
Depends On:
TreeView+ depends on / blocked
Reported: 2003-06-06 09:57 UTC by Jens Hardings
Modified: 2007-04-18 16:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-13 14:29:17 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Jens Hardings 2003-06-06 09:57:10 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030312

Description of problem:
bdiff requires /usr/bin/tempfile, which is not in the package requirements

Just trying to diff two bzip2 compressed files gets to the point.

gzip correctly provides a dependency for mktemp and that package is available.
For bzip2, neither is the tempfile available nor is there a dependency on a
package that provides this utility.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. run 'echo 'test1' | bzip2 > test1.bz2; echo 'test2' | bzip2 > test2.bz2'
2. run 'bzdiff file1.bz2 file2.gz2'

Actual Results:  output:
/usr/bin/bzdiff: line 1: tempfile: command not found
cannot create a temporary file

Expected Results:  output:
< test1
> test2

Additional info:

Changing the line in /usr/bin/bzdiff in which tempfile appears to the following

tmp=`mktemp /tmp/bz$$.XXXXXX` || {

But it should be added to the rpm information that this package depends on mktemp.

Comment 1 Miloslav Trmac 2004-02-05 08:06:41 UTC
bzcomp has the same problem.

Comment 2 Jesse Brandeburg 2004-03-19 18:12:50 UTC
bzdiff as well, and this same problem is in fedora core too.

Comment 3 Jesse Brandeburg 2004-03-19 18:23:14 UTC
sorry for the double follow up, but it seems another good solution 
(and more portable) might just be to use

tmp=`mktemp -t bz$$.XXXXXX` || {

as this automatically uses the right temp directory if its set in the 
environment, otherwise falls back to /tmp

Note You need to log in before you can comment on or make changes to this bug.