aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rwxr-xr-xbuild_archive3
-rw-r--r--genhdlist_cz23
-rwxr-xr-xpackdrake8
-rw-r--r--rpmtools.spec5
5 files changed, 14 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index d59f885..c1c751b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2000-09-15 Pixel <pixel@mandrakesoft.com>
+
+ * genhdlist_cz2, packdrake, build_archive: use TMPDIR if exists
+
2000-08-11 François Pons <fpons@mandrakesoft.com>
* gendepslist2.cc, genhdlist_cz2: modified to use packdrake -c instead of bzcat.
diff --git a/build_archive b/build_archive
index ae8bcf0..6da6fae 100755
--- a/build_archive
+++ b/build_archive
@@ -49,7 +49,8 @@
#+use strict qw(subs vars refs);
#- tempory file used for building.
-my $tmpz = "/tmp/tmp.z.$$";
+my $tmpdir = $ENV{TMPDIR} || "/tmp";
+my $tmpz = "$tmpdir/tmp.z.$$";
sub toc_line {
my ($file, $data) = @_;
diff --git a/genhdlist_cz2 b/genhdlist_cz2
index 2a12858..513358c 100644
--- a/genhdlist_cz2
+++ b/genhdlist_cz2
@@ -26,7 +26,8 @@ $depslist = "$pwd/$depslist" if $depslist !~ m|^/|;
$hdlist = "$pwd/$hdlist" if $hdlist !~ m|^/|;
$dir = "$pwd/$dir" if $dir !~ m|^/|;
-$work_dir = "/tmp/.build_hdlist";
+$tmpdir = $ENV{TMPDIR} || "/tmp";
+$work_dir = "$tmpdir/.build_hdlist";
-e $work_dir && !-d $work_dir and unlink($work_dir) || die "cannot use $work_dir as a working directory";
diff --git a/packdrake b/packdrake
index 57b4acf..f801ad4 100755
--- a/packdrake
+++ b/packdrake
@@ -52,7 +52,6 @@
#- general information.
my $VERSION = "0.1";
my $default_size = 400000;
-my $default_tmpdir = "/tmp";
my $default_ratio = 6;
#- used for uncompressing archive and listing.
@@ -459,8 +458,6 @@ usage:
/bin/gzip or /usr/bin/bzip2.
--compress <cmd> - select compression command.
--uncompress <cmd> - select uncompression command.
- --tmpdir - select a specific tempory directory for operation,
- default to $default_tmpdir.
--extract <file> <dir> - extract archive <file> contents to directory <dir>,
specific file to extract are given on command line.
--uncompress <cmd> - override uncompression method in archive <file>.
@@ -471,7 +468,7 @@ usage:
}
sub main {
- my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $tmpdir, $ratio);
+ my ($file, $mode, $dir, $size, $method, $compress, $uncompress, $ratio);
my @nextargv = (\$file);
my @list = ();
@@ -487,7 +484,6 @@ sub main {
/^--method$/ and do { push @nextargv, \$method; next };
/^--compress$/ and do { push @nextargv, \$compress; next };
/^--uncompress$/ and do { push @nextargv, \$uncompress; next };
- /^--tmpdir$/ and do { push @nextargv, \$tmpdir; next };
/^-(.*)$/ and do { foreach (split //, $1) {
/[1-9]/ and do { $ratio = $_; next };
/b/ and do { $mode and die $error_mode; $mode = "build"; @nextargv = (\$file); next };
@@ -505,9 +501,9 @@ sub main {
#- examine and lauch.
$mode =~ /cat/ or $file or die "packdrake: no archive filename given, check usage with --help\n";
$size ||= 400000;
- $tmpdir ||= "/tmp";
$ratio ||= 6;
+ $tmpdir = $ENV{TMPDIR} || "/tmp";
$tmpz = "$tmpdir/packdrake-tmp.$$";
unless ($method) {
$file =~ /\.cz$/ and $method = "gzip";
diff --git a/rpmtools.spec b/rpmtools.spec
index 4ce3cc6..6ad291b 100644
--- a/rpmtools.spec
+++ b/rpmtools.spec
@@ -1,5 +1,5 @@
%define name rpmtools
-%define release 10mdk
+%define release 11mdk
# do not modify here, see Makefile in the CVS
%define version 1.2
@@ -103,6 +103,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Fri Sep 15 2000 Pixel <pixel@mandrakesoft.com> 1.2-11mdk
+- genhdlist_cz2, packdrake, build_archive: use TMPDIR if exists
+
* Mon Sep 04 2000 François Pons <fpons@mandrakesoft.com> 1.2-10mdk
- fixed management of basesystem, so that it always keeps all
its dependancies in order to keep ability to update base packages