packdrake   (3) manpage
packdrake
3
2004-02-25
perl v5.8.3
User Contributed Perl Documentation
  • NAME
      packdrake - Mandrake Simple Archive Extractor/Builder
  • SYNOPSYS

          require packdrake;




          packdrake::cat_archive("/export/Mandrake/base/hdlist.cz",
                                 "/export/Mandrake/base/hdlist2.cz");
          packdrake::list_archive("/tmp/modules.cz2");




          my $packer = new packdrake("/tmp/modules.cz2");
          $packer->extract_archive("/tmp", "file1.o", "file2.o");




          my $packer = packdrake::build_archive
              (\*STDIN, "/lib/modules", "/tmp/modules.cz2",
               400000, "bzip2", "bzip2 -d");
          my $packer = packdrake::build_archive
              (\*STDIN, "/export/Mandrake/base/hdlist.cz",
               400000, "gzip -9", "gzip -d");

  • DESCRIPTION
      "packdrake" is a very simple archive extractor and builder used by MandrakeSoft.
  • IMPLEMENTATION
      uncompressing sheme is:         | |         | |                                        | | $off1 =|*| }                                      | |         |*| }                                $off2 =|+| }         |*| } $siz1   =>   'gzip/bzip2 -d'   =>    |+| } $siz2  => $filename         |*| }                                      |+| }         |*| }                                      | |         | |                                        | |         | |                                        | |         | | where %data has the following format:   { 'filename' => [ 'f', $off1, $siz1, $off2, $siz2 ] } except for symbolink link where it is:   { 'filename_symlink' => [ 'l', $symlink_value ] } and directory where it is only   { 'filename_directory' => [ 'd' ] } as you can see, there is no owner, group, filemode... an extension could be made with 'F' (instead of 'f'), 'L' instead of 'l' for exemple. we do not need them as it is used for DrakX for fast archive extraction and owner/filemode is for user running only (ie root).

      archive file contains concatenation of all bzip2'ed group of files whose filenames are on input, then a TOC (describing %data, concatenation of toc_line) follow and a TOC_TRAILER for summary.
  • SEE ALSO
      packdrake command is a simple executable perl script using this module.
  • COPYRIGHT
      Copyright (C) 2000 MandrakeSoft <fpons@mandrakesoft.com>

      This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.

      This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.

      You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Current Users: 49 © 1999-2006 Linux.com.hk PenguinSoft
All trademarks and copyrights on this page are owned by their respective companies. Linux is a trademark of Linus Torvalds.