diff options
-rw-r--r-- | apt-pkg/acquire-item.cc | 18 | ||||
-rw-r--r-- | doc/apt.conf.5.yo | 4 | ||||
-rw-r--r-- | doc/examples/apt.conf | 3 |
3 files changed, 20 insertions, 5 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; + } } } /*}}}*/ diff --git a/doc/apt.conf.5.yo b/doc/apt.conf.5.yo index 923e2724e..94834901f 100644 --- a/doc/apt.conf.5.yo +++ b/doc/apt.conf.5.yo @@ -99,6 +99,10 @@ dit(bf(Retries)) Number of retries to perform. If this is non-zero apt will retry failed files the given number of times. +dit(bf(Acquire::Source-Symlinks)) +Use symlinks for source archives. If set to true then source archives will +be symlinked when possible instead of copying. True is the default + dit(bf(http)) HTTP URIs; http::Proxy is the default http proxy to use. It is in the standard form of em(http://[[user][:pass]@]host[:port]/). Per host proxies can also diff --git a/doc/examples/apt.conf b/doc/examples/apt.conf index 955088768..dabdab35b 100644 --- a/doc/examples/apt.conf +++ b/doc/examples/apt.conf @@ -1,4 +1,4 @@ -// $Id: apt.conf,v 1.36 1999/08/12 05:59:47 jgg Exp $ +// $Id: apt.conf,v 1.37 1999/08/28 03:22:45 jgg Exp $ /* This file is an index of all APT configuration directives. It should NOT actually be used as a real config file, though it is a completely valid file. @@ -62,6 +62,7 @@ Acquire { Queue-Mode "host"; // host|access Retries "0"; + Source-Symlinks "true"; // HTTP method configuration http |