The following commit has been merged in the master branch:
commit ec5ad1fb6ead0e4a4833cc4b54efad92538d4757
Author: Guillem Jover <guil...@debian.org>
Date:   Sat Sep 11 06:12:49 2010 +0200

    Clarify several archive member strings
    
    This will make translators and users life easier, as the new strings
    are less ambiguous, and try to avoid second meanings.

diff --git a/dpkg-deb/extract.c b/dpkg-deb/extract.c
index 22aea98..497fb4c 100644
--- a/dpkg-deb/extract.c
+++ b/dpkg-deb/extract.c
@@ -127,7 +127,8 @@ void extracthalf(const char *debar, const char *directory,
   
   ar= fopen(debar,"r"); if (!ar) ohshite(_("failed to read archive 
`%.255s'"),debar);
   if (fstat(fileno(ar),&stab)) ohshite(_("failed to fstat archive"));
-  if (!fgets(versionbuf,sizeof(versionbuf),ar)) readfail(ar,debar,_("version 
number"));
+  if (!fgets(versionbuf, sizeof(versionbuf), ar))
+    readfail(ar, debar, _("archive magic version number"));
 
   if (!strcmp(versionbuf, DPKG_AR_MAGIC)) {
     oldformat = false;
@@ -138,14 +139,14 @@ void extracthalf(const char *debar, const char *directory,
       struct ar_hdr arh;
 
       if (fread(&arh,1,sizeof(arh),ar) != sizeof(arh))
-        readfail(ar,debar,_("between members"));
+        readfail(ar, debar, _("archive member header"));
 
       dpkg_ar_normalize_name(&arh);
 
       if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
         ohshit(_("file `%.250s' is corrupt - bad magic at end of first 
header"),debar);
       memberlen= parseheaderlength(arh.ar_size,sizeof(arh.ar_size),
-                                   debar, _("member length"));
+                                   debar, _("archive member size"));
       if (!header_done) {
         char *infobuf;
         char *cur;
@@ -154,7 +155,7 @@ void extracthalf(const char *debar, const char *directory,
           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))
-          readfail(ar,debar,_("header info member"));
+          readfail(ar, debar, _("archive information header member"));
         infobuf[memberlen] = '\0';
         cur= strchr(infobuf,'\n');
         if (!cur) ohshit(_("archive has no newlines in header"));
@@ -174,7 +175,8 @@ void extracthalf(const char *debar, const char *directory,
           /* Members with `_' are noncritical, and if we don't understand them
            * we skip them.
            */
-       stream_null_copy(ar, memberlen + (memberlen&1),_("skipped member data 
from %s"), debar);
+        stream_null_copy(ar, memberlen + (memberlen & 1),
+                         _("skipped archive member data from %s"), debar);
       } else {
        if (strncmp(arh.ar_name, ADMINMEMBER, sizeof(arh.ar_name)) == 0)
          adminmember = 1;
@@ -189,16 +191,18 @@ void extracthalf(const char *debar, const char *directory,
          }
 
           if (adminmember == -1 || decompressor == NULL)
-            ohshit(_("file `%.250s' contains ununderstood data member %.*s, 
giving up"),
+            ohshit(_("archive '%.250s' contains not understood data member 
%.*s, giving up"),
                    debar, (int)sizeof(arh.ar_name), arh.ar_name);
         }
         if (adminmember == 1) {
           if (ctrllennum != 0)
-            ohshit(_("file `%.250s' contains two control members, giving up"), 
debar);
+            ohshit(_("archive '%.250s' contains two control members, giving 
up"),
+                   debar);
           ctrllennum= memberlen;
         }
         if (!adminmember != !admininfo) {
-         stream_null_copy(ar, memberlen + (memberlen&1),_("skipped member data 
from %s"), debar);
+          stream_null_copy(ar, memberlen + (memberlen & 1),
+                           _("skipped archive member data from %s"), debar);
         } else {
           break; /* Yes ! - found it. */
         }
@@ -222,15 +226,16 @@ void extracthalf(const char *debar, const char *directory,
     if (l && versionbuf[l - 1] == '\n')
       versionbuf[l - 1] = '\0';
     if (!fgets(ctrllenbuf,sizeof(ctrllenbuf),ar))
-      readfail(ar, debar, _("control information length"));
+      readfail(ar, debar, _("archive control member size"));
     if (sscanf(ctrllenbuf,"%zi%c%d",&ctrllennum,&nlc,&dummy) !=2 || nlc != 
'\n')
-      ohshit(_("archive has malformatted control length `%s'"), ctrllenbuf);
+      ohshit(_("archive has malformatted control member size '%s'"), 
ctrllenbuf);
 
     if (admininfo) {
       memberlen = ctrllennum;
     } else {
       memberlen = stab.st_size - ctrllennum - strlen(ctrllenbuf) - l;
-      stream_null_copy(ar, ctrllennum, _("skipped control area from %s"), 
debar);
+      stream_null_copy(ar, ctrllennum,
+                       _("skipped archive control member data from %s"), 
debar);
     }
 
     if (admininfo >= 2) {
diff --git a/dpkg-split/info.c b/dpkg-split/info.c
index 35d476c..1bb27d1 100644
--- a/dpkg-split/info.c
+++ b/dpkg-split/info.c
@@ -104,7 +104,7 @@ struct partinfo *read_info(FILE *partfile, const char *fn, 
struct partinfo *ir)
   if (memcmp(arh.ar_fmag,ARFMAG,sizeof(arh.ar_fmag)))
     ohshit(_("file `%.250s' is corrupt - bad magic at end of first 
header"),fn);
   thisilen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
-                               _("info length"));
+                               _("archive information member size"));
   if (thisilen >= readinfobuflen) {
     readinfobuflen= thisilen+1;
     readinfobuf= m_realloc(readinfobuf,readinfobuflen);
@@ -134,23 +134,24 @@ struct partinfo *read_info(FILE *partfile, const char 
*fn, struct partinfo *ir)
       strspn(ir->md5sum, "0123456789abcdef") != MD5HASHLEN)
     ohshit(_("file `%.250s' is corrupt - bad MD5 checksum 
`%.250s'"),fn,ir->md5sum);
 
-  ir->orglength = unsignedlong(nextline(&rip, fn, _("total length")), fn,
-                               _("total length"));
-  ir->maxpartlen = unsignedlong(nextline(&rip, fn, _("part offset")), fn,
-                                _("part offset"));
+  ir->orglength = unsignedlong(nextline(&rip, fn, _("archive total size")),
+                               fn, _("archive total size"));
+  ir->maxpartlen = unsignedlong(nextline(&rip, fn, _("archive part offset")),
+                                fn, _("archive part offset"));
   
-  partnums = nextline(&rip, fn, _("part numbers"));
+  partnums = nextline(&rip, fn, _("archive part numbers"));
   slash= strchr(partnums,'/');
-  if (!slash) ohshit(_("file `%.250s' is corrupt - no slash between part 
numbers"),fn);
+  if (!slash)
+    ohshit(_("file '%.250s' is corrupt - no slash between archive part 
numbers"), fn);
   *slash++ = '\0';
 
-  templong = unsignedlong(slash, fn, _("number of parts"));
+  templong = unsignedlong(slash, fn, _("number of archive parts"));
   if (templong <= 0 || templong > INT_MAX)
-    ohshit(_("file '%.250s' is corrupt - bad number of parts"), fn);
+    ohshit(_("file '%.250s' is corrupt - bad number of archive parts"), fn);
   ir->maxpartn= templong;
-  templong = unsignedlong(partnums, fn, _("parts number"));
+  templong = unsignedlong(partnums, fn, _("archive parts number"));
   if (templong <= 0 || templong > ir->maxpartn)
-    ohshit(_("file `%.250s' is corrupt - bad part number"),fn);
+    ohshit(_("file '%.250s' is corrupt - bad archive part number"),fn);
   ir->thispartn= templong;
 
   if (fread(&arh,1,sizeof(arh),partfile) != sizeof(arh)) rerreof(partfile,fn);
@@ -163,7 +164,7 @@ struct partinfo *read_info(FILE *partfile, const char *fn, 
struct partinfo *ir)
     ohshit(_("file `%.250s' is corrupt - second member is not data 
member"),fn);
 
   ir->thispartlen = parseheaderlength(arh.ar_size, sizeof(arh.ar_size), fn,
-                                      _("data length"));
+                                      _("archive data member size"));
   ir->thispartoffset= (ir->thispartn-1)*ir->maxpartlen;
 
   if (ir->maxpartn != (ir->orglength+ir->maxpartlen-1)/ir->maxpartlen)

-- 
dpkg's main repository


-- 
To UNSUBSCRIBE, email to debian-dpkg-cvs-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to