From: Tollef Fog Heen Date: Mon, 10 Mar 2008 16:56:45 +0000 (+0100) Subject: Merge commit 'origin/master' X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a4a633c1562bc258851e57e8c78ecc1429feae85;p=dpkg Merge commit 'origin/master' Conflicts: src/Makefile.am src/archives.c src/main.c --- a4a633c1562bc258851e57e8c78ecc1429feae85 diff --cc src/Makefile.am index 2092e961,80e61e76..5416cebd --- a/src/Makefile.am +++ b/src/Makefile.am @@@ -2,9 -2,9 +2,10 @@@ localedir = $(datadir)/locale INCLUDES = \ - -DLOCALEDIR=\"$(localedir)\" -I$(top_srcdir)/intl \ + -DLOCALEDIR=\"$(localedir)\" \ -DADMINDIR=\"$(admindir)\" \ + -DCONFIGDIR=\"$(pkgconfdir)\" \ + -idirafter $(top_srcdir)/libcompat \ -I$(top_srcdir)/lib @@@ -24,10 -24,10 +25,11 @@@ dpkg_SOURCES = processarc.c \ remove.c \ select.c \ - update.c + update.c \ + filters.c filters.h dpkg_LDADD = \ + ../libcompat/libcompat.a \ $(LIBINTL) ../lib/libdpkg.a $(ZLIB_LIBS) $(BZ2_LIBS) $(SELINUX_LIBS) dpkg_query_SOURCES = \ diff --cc src/archives.c index 48f1c6df,9fddb9c6..55a64890 --- a/src/archives.c +++ b/src/archives.c @@@ -232,30 -230,6 +232,30 @@@ int tarfileread(void *ud, char *buf, in return r; } +void tarfile_skip_one_forward(struct TarInfo *ti, + struct fileinlist **oldnifd, + struct fileinlist *nifd) { + struct tarcontext *tc= (struct tarcontext*)ti->UserData; + size_t r; + char databuf[TARBLKSZ]; + + obstack_free(&tar_obs, nifd); + tc->newfilesp= oldnifd; - *oldnifd = 0; ++ *oldnifd = NULL; + + /* We need to advance the tar file to the next object, so read the + * file data and set it to oblivion. + */ + if ((ti->Type == NormalFile0) || (ti->Type == NormalFile1)) { + char fnamebuf[256]; + fd_null_copy(tc->backendpipe, ti->Size, + "skipped unpacking file `%.255s' (replaced or excluded?)", + quote_filename(fnamebuf,256,ti->Name)); + r= ti->Size % TARBLKSZ; + if (r > 0) r= safe_read(tc->backendpipe,databuf,TARBLKSZ - r); + } +} + int fnameidlu; struct varbuf fnamevb; struct varbuf fnametmpvb; diff --cc src/main.c index cd7dd606,b4bd50f4..aec8af76 --- a/src/main.c +++ b/src/main.c @@@ -627,9 -620,7 +621,9 @@@ int main(int argc, const char *const *a standard_startup(&ejbuf, argc, &argv, DPKG, 1, cmdinfos); if (!cipaction) badusage(_("need an action option")); + loadfilters(); + - setvbuf(stdout,0,_IONBF,0); + setvbuf(stdout, NULL, _IONBF, 0); filesdbinit(); actionfunction= (void (*)(const char* const*))cipaction->farg;