diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2004-11-01 14:30:01 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2004-11-01 14:30:01 +0000 |
commit | 11958661c8b955ee912f86c21f468e96dec38eeb (patch) | |
tree | 45d5ee1bb2e825d9ad7e2342e4efd3bf293865ee /usr.sbin/pkg_add/OpenBSD/Update.pm | |
parent | 1039de13029f757ee6b357412bdb28937b5eb8af (diff) |
handle the case of symlinks.
Let pkg_add -r do extraction first, and finish installation later.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Update.pm')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Update.pm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Update.pm b/usr.sbin/pkg_add/OpenBSD/Update.pm index d4341e48c27..5ee7859e9e8 100644 --- a/usr.sbin/pkg_add/OpenBSD/Update.pm +++ b/usr.sbin/pkg_add/OpenBSD/Update.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Update.pm,v 1.3 2004/11/01 11:48:03 espie Exp $ +# $OpenBSD: Update.pm,v 1.4 2004/11/01 14:30:00 espie Exp $ # # Copyright (c) 2004 Marc Espie <espie@openbsd.org> # @@ -52,16 +52,16 @@ sub extract } my $destdir = $state->{destdir}; + if (defined $self->{link} || defined $self->{symlink}) { + $self->{tempname} = 1; + return; + } my ($fh, $tempname) = tempfile(DIR => dirname($destdir.$fullname)); print "extracting $tempname\n"; $file->{name} = $tempname; $file->{cwd} = $self->{cwd}; $file->{destdir} = $destdir; - # faked installation are VERY weird - if (defined $self->{symlink} && $state->{do_faked}) { - $file->{linkname} = $destdir.$file->{linkname}; - } $file->create(); $self->{tempname} = $tempname; } |