diff options
author | Guillem Jover <guillem@debian.org> | 2014-08-20 11:23:11 +0200 |
---|---|---|
committer | Guillem Jover <guillem@debian.org> | 2014-10-06 00:27:21 +0200 |
commit | 03c0873bd720a4f93db0cc4764fa98d3dbcadede (patch) | |
tree | 600239fcba73808aee5f5111369965db166beb0e /dpkg-deb/extract.c | |
parent | 81f0fdb71a029abdb4cb9d404c55ba5871cd3cf5 (diff) | |
download | dpkg-03c0873bd720a4f93db0cc4764fa98d3dbcadede.tar.gz |
dpkg-deb: Add new --ctrl-tarfile command
This allows to easily extract the entire control member in tar format,
for further processing.
Diffstat (limited to 'dpkg-deb/extract.c')
-rw-r--r-- | dpkg-deb/extract.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c index 5a076b7ce..1da2adbec 100644 --- a/dpkg-deb/extract.c +++ b/dpkg-deb/extract.c @@ -377,6 +377,23 @@ extracthalf(const char *debar, const char *dir, } int +do_ctrltarfile(const char *const *argv) +{ + const char *debar; + + debar = *argv++; + if (debar == NULL) + badusage(_("--%s needs a .deb filename argument"), cipaction->olong); + if (*argv) + badusage(_("--%s takes only one argument (.deb filename)"), + cipaction->olong); + + extracthalf(debar, NULL, DPKG_TAR_PASSTHROUGH, 1); + + return 0; +} + +int do_fsystarfile(const char *const *argv) { const char *debar; |