+Mon Oct 11 02:13:15 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
+
+ * Merge patch from Ben Collins <bcollins@debian.org> to make dpkg-deb
+ handle packages created with Linux ar.
+
Thu Oct 7 01:16:23 CEST 1999 Wichert Akkerman <wakkerma@debian.org>
* Check if codenumber is between 0 and 99 instead of just checking
const char *taroption, int admininfo);
#define DEBMAGIC "!<arch>\ndebian-binary "
-#define ADMINMEMBER "control.tar.gz "
-#define DATAMEMBER "data.tar.gz "
+#define ADMINMEMBER "control.tar.gz "
+#define ADMINMEMBER_COMPAT "control.tar.gz/ "
+#define DATAMEMBER "data.tar.gz "
+#define DATAMEMBER_COMPAT "data.tar.gz/ "
#endif /* DPKG_DEB_H */
if (memberlen<0)
ohshit(_("file `%.250s' is corrupt - negative member length %ld"),debar,memberlen);
if (!header_done) {
- if (memcmp(arh.ar_name,"debian-binary ",sizeof(arh.ar_name)))
+ if (memcmp(arh.ar_name,"debian-binary ",sizeof(arh.ar_name)) &&
+ memcmp(arh.ar_name,"debian-binary/ ",sizeof(arh.ar_name)))
ohshit(_("file `%.250s' is not a debian binary archive (try dpkg-split?)"),debar);
infobuf= m_malloc(memberlen+1);
if (fread(infobuf,1, memberlen + (memberlen&1), ar) != memberlen + (memberlen&1))
skipmember(ar,debar,memberlen);
} else {
adminmember=
- !memcmp(arh.ar_name,ADMINMEMBER,sizeof(arh.ar_name)) ? 1 :
- !memcmp(arh.ar_name,DATAMEMBER,sizeof(arh.ar_name)) ? 0 :
+ (!memcmp(arh.ar_name,ADMINMEMBER,sizeof(arh.ar_name)) ||
+ !memcmp(arh.ar_name,ADMINMEMBER_COMPAT,sizeof(arh.ar_name))) ? 1 :
+ (!memcmp(arh.ar_name,DATAMEMBER,sizeof(arh.ar_name)) ||
+ !memcmp(arh.ar_name,DATAMEMBER_COMPAT,sizeof(arh.ar_name))) ? 0 :
-1;
if (adminmember == -1) {
ohshit(_("file `%.250s' contains ununderstood data member %.*s, giving up"),