archives.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. /*
  2. * dpkg - main program for package management
  3. * archives.h - functions common to archives.c and processarc.c
  4. *
  5. * Copyright (C) 1995 Ian Jackson <ian@chiark.greenend.org.uk>
  6. *
  7. * This is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License as
  9. * published by the Free Software Foundation; either version 2,
  10. * or (at your option) any later version.
  11. *
  12. * This is distributed in the hope that it will be useful, but
  13. * WITHOUT ANY WARRANTY; without even the implied warranty of
  14. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  15. * GNU General Public License for more details.
  16. *
  17. * You should have received a copy of the GNU General Public
  18. * License along with dpkg; if not, write to the Free Software
  19. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20. */
  21. #ifndef ARCHIVES_H
  22. #define ARCHIVES_H
  23. struct tarcontext {
  24. int backendpipe;
  25. struct pkginfo *pkg;
  26. struct fileinlist **newfilesp;
  27. };
  28. extern int fnameidlu;
  29. extern struct varbuf fnamevb;
  30. extern struct varbuf fnametmpvb;
  31. extern struct varbuf fnamenewvb;
  32. extern struct packageinlist *deconfigure;
  33. extern struct pkginfo *conflictor[];
  34. extern int cflict_index;
  35. void cu_pathname(int argc, void **argv);
  36. void cu_cidir(int argc, void **argv);
  37. void cu_fileslist(int argc, void **argv);
  38. void cu_backendpipe(int argc, void **argv);
  39. void cu_installnew(int argc, void **argv);
  40. void cu_prermupgrade(int argc, void **argv);
  41. void cu_prerminfavour(int argc, void **argv);
  42. void cu_preinstverynew(int argc, void **argv);
  43. void cu_preinstnew(int argc, void **argv);
  44. void cu_preinstupgrade(int argc, void **argv);
  45. void cu_postrmupgrade(int argc, void **argv);
  46. void cu_prermdeconfigure(int argc, void **argv);
  47. void ok_prermdeconfigure(int argc, void **argv);
  48. void setupfnamevbs(const char *filename);
  49. int unlinkorrmdir(const char *filename);
  50. int tarobject(struct TarInfo *ti);
  51. int tarfileread(void *ud, char *buf, int len);
  52. int filesavespackage(struct fileinlist*, struct pkginfo*,
  53. struct pkginfo *pkgbeinginstalled);
  54. void check_conflict(struct dependency *dep, struct pkginfo *pkg,
  55. const char *pfilename);
  56. struct fileinlist *addfiletolist(struct tarcontext *tc,
  57. struct filenamenode *namenode);
  58. extern int cleanup_pkg_failed, cleanup_conflictor_failed;
  59. #endif /* ARCHIVES_H */