]> git.saurik.com Git - apt.git/blobdiff - apt-inst/contrib/extracttar.cc
Merge remote-tracking branch 'mvo/feature/upgrade-with-cmdline' into debian/sid
[apt.git] / apt-inst / contrib / extracttar.cc
index 01b6b38360bd61dd1dcfe505aed9a9312b0dc47f..49ed5db56dc14e620ad297eaa256791546b5c260 100644 (file)
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
    ##################################################################### */
                                                                        /*}}}*/
 // Include Files                                                       /*{{{*/
-#include <apt-pkg/extracttar.h>
+#include<config.h>
 
 
+#include <apt-pkg/dirstream.h>
+#include <apt-pkg/extracttar.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/configuration.h>
@@ -28,6 +30,7 @@
 #include <signal.h>
 #include <fcntl.h>
 #include <iostream>
 #include <signal.h>
 #include <fcntl.h>
 #include <iostream>
+
 #include <apti18n.h>
                                                                        /*}}}*/
 
 #include <apti18n.h>
                                                                        /*}}}*/
 
@@ -60,7 +63,6 @@ ExtractTar::ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram)
 
 {
    GZPid = -1;
 
 {
    GZPid = -1;
-   InFd = -1;
    Eof = false;
 }
                                                                        /*}}}*/
    Eof = false;
 }
                                                                        /*}}}*/
@@ -143,7 +145,7 @@ bool ExtractTar::StartGzip()
    }
 
    // Fix up our FDs
    }
 
    // Fix up our FDs
-   InFd.Fd(Pipes[0]);
+   InFd.OpenDescriptor(Pipes[0], FileFd::ReadOnly, FileFd::None, true);
    close(Pipes[1]);
    return true;
 }
    close(Pipes[1]);
    return true;
 }