]> git.saurik.com Git - apt.git/commitdiff
Use symlinks for source
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:37 +0000 (16:54 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:37 +0000 (16:54 +0000)
Author: jgg
Date: 1999-08-28 03:22:34 GMT
Use symlinks for source

apt-pkg/acquire-item.cc
doc/apt.conf.5.yo
doc/examples/apt.conf

index 63c47f73622f1c4bd3132e5bdea4d0b071084af2..5dc9413a9cdb05e355a8584668e89b14a89aae23 100644 (file)
@@ -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;
+      }      
    }
 }
                                                                        /*}}}*/
index 923e2724ec688fb2b2df3aa392c9da22df90a186..94834901ff2f8e254d044cf6f8da99c33ef3854c 100644 (file)
@@ -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
index 955088768a94770ddfc1c36532bf7409be8e7d7f..dabdab35bf2f4a67b17f1a27a9dc44ce6621aec7 100644 (file)
@@ -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