* Major typo fix in Tgz.pm.

* Fixed newlines in tgz filelist.
   * Fixed some undefined value warnings.
This commit is contained in:
joey
2000-04-22 23:32:45 +00:00
parent 84a8367902
commit 23baf2bcf4
6 changed files with 20 additions and 7 deletions

View File

@@ -332,8 +332,7 @@ sub build {
$opts="--target noarch" if $rpmarch eq 'noarch';
}
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
$opts.=" $ENV{RPMBUILDOPTS}" if exists $ENV{RPMBUILDOPTS};
system("cd $dir; rpm $opts -bb ".$this->name."-".$this->version."-".$this->release.".spec >/dev/null") &&
die "package build failed";

View File

@@ -97,7 +97,7 @@ sub scan {
# Strip out any tar extentions.
$basename=~s/\.(tgz|tar\.(gz|Z))$//;
if ($basename=~m/(.*)-(.*)/ ne undef) {
if ($basename=~m/(.*)-(.*)/) {
$this->name($1);
$this->version($2);
}
@@ -113,6 +113,7 @@ sub scan {
$this->copyright('unknown');
$this->release(1);
$this->distribution("Slackware");
$this->group("unknown");
$this->origformat('tgz');
$this->changelogtext('');
$this->binary_info(`ls -l $file`);
@@ -140,6 +141,7 @@ sub scan {
open (FILELIST, "tar ztf $file |") ||
die "getting filelist: $!";
while (<FILELIST>) {
chomp;
unless (m:^install/:) {
push @filelist, "/$_";
}
@@ -168,7 +170,7 @@ sub unpack {
system("cat $file | (cd ".$this->unpacked_tree."; tar zxpf -)") &&
die "Unpacking of `$file' failed: $!";
# Delete the install directory that has slackware info in it.
system("cd ".$this->unpacked_tree."rm -rf ./install");
system("cd ".$this->unpacked_tree."; rm -rf ./install");
return 1;
}