summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:54:37 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:54:37 +0000
commit917ae8051ca9a28c724875eaa77058ef162b4278 (patch)
tree188d396a9fbcf38fb25e949d8b25f839a3dd4e5b /apt-pkg
parentbf3abeedae8085fc1ef2180e2b331a213a842735 (diff)
Use symlinks for source
Author: jgg Date: 1999-08-28 03:22:34 GMT Use symlinks for source
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/acquire-item.cc18
1 files changed, 14 insertions, 4 deletions
diff --git a/apt-pkg/acquire-item.cc b/apt-pkg/acquire-item.cc
index 63c47f736..5dc9413a9 100644
--- a/apt-pkg/acquire-item.cc
+++ b/apt-pkg/acquire-item.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acquire-item.cc,v 1.35 1999/08/03 05:19:41 jgg Exp $
+// $Id: acquire-item.cc,v 1.36 1999/08/28 03:22:34 jgg Exp $
/* ######################################################################
Acquire Item - Item to acquire
@@ -617,9 +617,19 @@ void pkgAcqFile::Done(string Message,unsigned long Size,string MD5)
if (FileName != DestFile)
{
Local = true;
- Desc.URI = "copy:" + FileName;
- QueueURI(Desc);
- return;
+ if (_config->FindB("Acquire::Source-Symlinks",true) == false)
+ {
+ Desc.URI = "copy:" + FileName;
+ QueueURI(Desc);
+ return;
+ }
+
+ if (symlink(FileName.c_str(),DestFile.c_str()) != 0)
+ {
+ ErrorText = "Link to " + DestFile + "failure ";
+ Status = StatError;
+ Complete = false;
+ }
}
}
/*}}}*/