~ubuntu-branches/ubuntu/trusty/dpkg/trusty-proposed

« back to all changes in this revision

Viewing changes to lib/dpkg/tarfn.h

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2012-06-07 10:07:38 UTC
  • mfrom: (1.5.7 sid)
  • Revision ID: package-import@ubuntu.com-20120607100738-8cxeoqk8c2f5n40d
Tags: 1.16.3ubuntu1
* Merge with 1.16.3 from unstable:
  - Change the multiarch downgrade version checks in prerm/postrm
    from 1.16.2 to 1.16.0~ to reflect when multiarch landed in Ubuntu.
  - Migrate dpkg multiarch conffile (and other multi-arch-related
    conf settings) to the new DB with dpkg --add-architecture, but
    keep a copy of the old conffile if it was modified.
  - Out of paranoia, keep an option handler for foreign-architecture
    that informs people that they need to scrub their config files
    and upgrade, on the off chance that the above migration fails
    for some reason (this mitigates the chances of leaving users with
    a dpkg that fails to run due to a broken config).
* Changes remaining from previous Ubuntu versions:
  - Add DPKG_UNTRANSLATED_MESSAGES environment check so that higher-level
    tools can get untranslated dpkg terminal log messages while at the
    same time having translated debconf prompts.  This is useful for tools
    that hide the dpkg terminal by default and use apport for bug
    reporting with the untranslated error message.
  - Build-depend on gettext:any for cross-building support.
  - Apply patch from Steve McIntyre to special-case armhf/armel ELF
    objects in Shlibs/Objdump.pm, so we don't get incorrect deps.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
#include <dpkg/file.h>
31
31
 
 
32
/**
 
33
 * @defgroup tar Tar archive handling
 
34
 * @ingroup dpkg-public
 
35
 * @{
 
36
 */
 
37
 
32
38
#define TARBLKSZ        512
33
39
 
34
40
enum tar_format {
39
45
};
40
46
 
41
47
enum tar_filetype {
42
 
        tar_filetype_file0 = '\0',      /* For compatibility with decades-old bug */
 
48
        /** For compatibility with decades-old bug. */
 
49
        tar_filetype_file0 = '\0',
43
50
        tar_filetype_file = '0',
44
51
        tar_filetype_hardlink = '1',
45
52
        tar_filetype_symlink = '2',
52
59
};
53
60
 
54
61
struct tar_entry {
55
 
        enum tar_format format; /* Tar archive format. */
56
 
        enum tar_filetype type; /* Regular, Directory, Special, Link */
57
 
        char *name;             /* File name */
58
 
        char *linkname;         /* Name for symbolic and hard links */
59
 
        off_t size;             /* Size of file */
60
 
        time_t mtime;           /* Last-modified time. */
61
 
        dev_t dev;              /* Special device for mknod() */
 
62
        /** Tar archive format. */
 
63
        enum tar_format format;
 
64
        /** File type. */
 
65
        enum tar_filetype type;
 
66
        /** File name. */
 
67
        char *name;
 
68
        /** Symlink or hardlink name. */
 
69
        char *linkname;
 
70
        /** File size. */
 
71
        off_t size;
 
72
        /** Last-modified time. */
 
73
        time_t mtime;
 
74
        /** Special device for mknod(). */
 
75
        dev_t dev;
62
76
 
63
77
        struct file_stat stat;
64
78
};
78
92
 
79
93
int tar_extractor(void *ctx, const struct tar_operations *ops);
80
94
 
 
95
/** @} */
 
96
 
81
97
#endif