From: Adam Heath Date: Wed, 20 Dec 2000 07:27:49 +0000 (+0000) Subject: Fix building of debs, when there is no given compression on the cmdline. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=571a4329a10e74ff7c5460a549e05b3dcfbba78f;p=dpkg Fix building of debs, when there is no given compression on the cmdline. --- diff --git a/ChangeLog b/ChangeLog index e1fd3fdd..0a143c9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Wed Dec 20 01:11:13 CST 2000 Adam Heath + + * dpkg-deb/build.c: Fix building of debs, when there is no given + compression on the cmdline. + Wed Dec 20 01:55:59 CET 2000 Wichert Akkerman * scripts/dpkg-architecture.pl: fix typo / syntax error diff --git a/dpkg-deb/build.c b/dpkg-deb/build.c index be0e8532..00a774d8 100644 --- a/dpkg-deb/build.c +++ b/dpkg-deb/build.c @@ -159,13 +159,14 @@ int internalGzip(int fd1, int fd2, const char *compression, char *desc, ...) { va_end(al); - if(compression != NULL) - if(*compression == '0') { - fd_fd_copy(0, 1, -1, _("%s: no compression copy loop"), v.buf); - exit(0); - } + if(compression == NULL) compression= "9"; + if(*compression == '0') { + fd_fd_copy(0, 1, -1, _("%s: no compression copy loop"), v.buf); + exit(0); + } #ifdef USE_ZLIB - snprintf(combuf, sizeof(combuf), "w%c", *compression); + strncpy(combuf, "w9", sizeof(combuf)); + combuf[1]= *compression; gzfile = gzdopen(1, combuf); while((actualread = read(0,gzbuffer,sizeof(gzbuffer))) > 0) { if (actualread < 0 ) { @@ -185,9 +186,11 @@ int internalGzip(int fd1, int fd2, const char *compression, char *desc, ...) { if (gzactualwrite != actualread) ohshite(_("%s: internal gzip error: read(%i) != write(%i)"), v.buf, actualread, gzactualwrite); } + gzclose(gzfile); exit(0); #else - snprintf(combuf, sizeof(combuf), "-%cc", *compression); + strncpy(combuf, "-9c", sizeof(combuf)); + combuf[1]= *compression; execlp(GZIP,"gzip",combuf,(char*)0); ohshit(_("%s: failed to exec gzip %s"), v.buf, combuf); #endif } diff --git a/po/dpkg.pot b/po/dpkg.pot index d0737f3d..9ddad895 100644 --- a/po/dpkg.pot +++ b/po/dpkg.pot @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" -"POT-Creation-Date: 2000-12-09 03:03+0100\n" +"POT-Creation-Date: 2000-12-20 01:22-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -452,17 +452,52 @@ msgstr "" msgid "wait for %s failed" msgstr "" -#: lib/mlib.c:138 +#: lib/mlib.c:139 #, c-format -msgid "failed in do_fd_write_fd (%s)" +msgid "failed in buffer_write(fd) (%i, ret=%i, %s)" msgstr "" -#: lib/mlib.c:183 +#: lib/mlib.c:146 +#, c-format +msgid "eof in buffer_write(stream): %s" +msgstr "" + +#: lib/mlib.c:148 +#, c-format +msgid "error in buffer_write(stream): %s" +msgstr "" + +#: lib/mlib.c:151 +#, c-format +msgid "unknown data type `%i' in buffer_write\n" +msgstr "" + +#: lib/mlib.c:161 +#, c-format +msgid "failed in buffer_read(fd): %s" +msgstr "" + +#: lib/mlib.c:166 +#, c-format +msgid "eof in buffer_read(stream): %s" +msgstr "" + +#: lib/mlib.c:168 +#, c-format +msgid "error in buffer_read(stream): %s" +msgstr "" + +#: lib/mlib.c:171 +#, c-format +msgid "unknown data type `%i' in buffer_read\n" +msgstr "" + +#: lib/mlib.c:209 #, c-format msgid "failed to allocate buffer in do_fd_read (%s)" msgstr "" -#: lib/mlib.c:202 +#: lib/mlib.c:228 #, c-format msgid "failed in do_fd_read on read (%s)" msgstr "" @@ -683,7 +718,7 @@ msgstr "" msgid "cannot open GPL file " msgstr "" -#: lib/varbuf.c:93 +#: lib/varbuf.c:92 msgid "failed to realloc for variable buffer" msgstr "" @@ -691,293 +726,278 @@ msgstr "" msgid "process_archive ... already disappeared !" msgstr "" -#: main/archives.c:128 +#: main/archives.c:122 msgid "error reading from dpkg-deb pipe" msgstr "" -#: main/archives.c:165 +#: main/archives.c:159 #, c-format msgid "error setting timestamps of `%.255s'" msgstr "" -#: main/archives.c:170 main/archives.c:425 +#: main/archives.c:166 main/archives.c:410 #, c-format msgid "error setting ownership of `%.255s'" msgstr "" -#: main/archives.c:172 main/archives.c:434 +#: main/archives.c:168 main/archives.c:413 #, c-format msgid "error setting permissions of `%.255s'" msgstr "" -#: main/archives.c:241 +#: main/archives.c:237 #, c-format msgid "" "tarobject ti->Name=`%s' Mode=%lo owner=%u.%u Type=%d(%c) ti->LinkName=`%s' " "namenode=`%s' flags=%o instead=`%s'" msgstr "" -#: main/archives.c:254 +#: main/archives.c:250 #, c-format msgid "" "trying to overwrite `%.250s', which is the diverted version of " "`%.250s'%.10s%.100s%.10s" msgstr "" -#: main/archives.c:258 +#: main/archives.c:254 msgid " (package: " msgstr "" -#: main/archives.c:280 +#: main/archives.c:276 #, c-format msgid "unable to stat `%.255s' (which I was about to install)" msgstr "" -#: main/archives.c:288 +#: main/archives.c:284 #, c-format msgid "" "unable to clean up mess surrounding `%.255s' before installing another " "version" msgstr "" -#: main/archives.c:294 +#: main/archives.c:290 #, c-format msgid "unable to stat restored `%.255s' before installing another version" msgstr "" -#: main/archives.c:326 +#: main/archives.c:322 #, c-format msgid "archive contained object `%.255s' of unknown type 0x%x" msgstr "" -#: main/archives.c:357 +#: main/archives.c:353 #, c-format msgid "Replacing files in old package %s ...\n" msgstr "" -#: main/archives.c:361 +#: main/archives.c:357 #, c-format msgid "" "trying to overwrite directory `%.250s' in package %.250s with nondirectory" msgstr "" -#: main/archives.c:371 +#: main/archives.c:367 #, c-format msgid "trying to overwrite `%.250s', which is also in package %.250s" msgstr "" #: main/archives.c:399 #, c-format -msgid "unable to fdopen for `%.255s'" +msgid "backend dpkg-deb during `%.255s'" msgstr "" -#: main/archives.c:408 -#, c-format -msgid "error reading dpkg-deb during `%.255s'" -msgstr "" - -#: main/archives.c:415 -#, c-format -msgid "error writing to `%.255s'" -msgstr "" - -#: main/archives.c:418 +#: main/archives.c:403 #, c-format msgid "tarobject ... stat override, uid=%d, gid=%d, mode=%04o" msgstr "" -#: main/archives.c:431 -#, c-format -msgid "error flushing `%.255s'" -msgstr "" - -#: main/archives.c:437 +#: main/archives.c:416 #, c-format msgid "error closing/writing `%.255s'" msgstr "" -#: main/archives.c:442 +#: main/archives.c:421 #, c-format msgid "error creating pipe `%.255s'" msgstr "" -#: main/archives.c:448 +#: main/archives.c:427 #, c-format msgid "error creating device `%.255s'" msgstr "" -#: main/archives.c:457 +#: main/archives.c:436 #, c-format msgid "error creating hard link `%.255s'" msgstr "" -#: main/archives.c:464 +#: main/archives.c:443 #, c-format msgid "error creating symbolic link `%.255s'" msgstr "" -#: main/archives.c:473 +#: main/archives.c:452 #, c-format msgid "error setting ownership of symlink `%.255s'" msgstr "" -#: main/archives.c:479 +#: main/archives.c:457 #, c-format msgid "error creating directory `%.255s'" msgstr "" -#: main/archives.c:514 +#: main/archives.c:492 #, c-format msgid "unable to move aside `%.255s' to install new version" msgstr "" -#: main/archives.c:527 +#: main/archives.c:505 #, c-format msgid "unable to make backup symlink for `%.255s'" msgstr "" -#: main/archives.c:533 +#: main/archives.c:511 #, c-format msgid "unable to chown backup symlink for `%.255s'" msgstr "" -#: main/archives.c:537 +#: main/archives.c:515 #, c-format msgid "unable to make backup link of `%.255s' before installing new version" msgstr "" -#: main/archives.c:543 +#: main/archives.c:521 #, c-format msgid "unable to install new version of `%.255s'" msgstr "" -#: main/archives.c:557 +#: main/archives.c:535 #, c-format msgid "" "dpkg: warning - ignoring dependency problem with removal of %s:\n" "%s" msgstr "" -#: main/archives.c:564 +#: main/archives.c:542 #, c-format msgid "" "dpkg: warning - considering deconfiguration of essential\n" " package %s, to enable removal of %s.\n" msgstr "" -#: main/archives.c:568 +#: main/archives.c:546 #, c-format msgid "" "dpkg: no, %s is essential, will not deconfigure\n" " it in order to enable removal of %s.\n" msgstr "" -#: main/archives.c:581 +#: main/archives.c:559 #, c-format msgid "" "dpkg: no, cannot remove %s (--auto-deconfigure will help):\n" "%s" msgstr "" -#: main/archives.c:615 +#: main/archives.c:593 #, c-format msgid "dpkg: considering removing %s in favour of %s ...\n" msgstr "" -#: main/archives.c:619 +#: main/archives.c:597 #, c-format msgid "%s is not properly installed - ignoring any dependencies on it.\n" msgstr "" -#: main/archives.c:646 +#: main/archives.c:624 #, c-format msgid "dpkg: may have trouble removing %s, as it provides %s ...\n" msgstr "" -#: main/archives.c:661 +#: main/archives.c:639 #, c-format msgid "" "dpkg: package %s requires reinstallation, but will remove anyway as you " "request.\n" msgstr "" -#: main/archives.c:664 +#: main/archives.c:642 #, c-format msgid "dpkg: package %s requires reinstallation, will not remove.\n" msgstr "" -#: main/archives.c:677 +#: main/archives.c:655 #, c-format msgid "dpkg: yes, will remove %s in favour of %s.\n" msgstr "" -#: main/archives.c:685 +#: main/archives.c:663 #, c-format msgid "" "dpkg: regarding %s containing %s:\n" "%s" msgstr "" -#: main/archives.c:688 +#: main/archives.c:666 #, c-format msgid "conflicting packages - not installing %.250s" msgstr "" -#: main/archives.c:689 +#: main/archives.c:667 msgid "dpkg: warning - ignoring conflict, may proceed anyway !\n" msgstr "" -#: main/archives.c:732 +#: main/archives.c:710 #, c-format msgid "--%s --recursive needs at least one path argument" msgstr "" -#: main/archives.c:761 +#: main/archives.c:739 msgid "failed to exec find for --recursive" msgstr "" -#: main/archives.c:766 +#: main/archives.c:744 msgid "failed to fdopen find's pipe" msgstr "" -#: main/archives.c:772 +#: main/archives.c:750 msgid "error reading find's pipe" msgstr "" -#: main/archives.c:773 +#: main/archives.c:751 msgid "error closing find's pipe" msgstr "" -#: main/archives.c:777 +#: main/archives.c:755 msgid "searched, but found no packages (files matching *.deb)" msgstr "" -#: main/archives.c:793 +#: main/archives.c:771 #, c-format msgid "--%s needs at least one package archive file argument" msgstr "" -#: main/archives.c:859 +#: main/archives.c:837 #, c-format msgid "Selecting previously deselected package %s.\n" msgstr "" -#: main/archives.c:864 +#: main/archives.c:842 #, c-format msgid "Skipping deselected package %s.\n" msgstr "" -#: main/archives.c:878 +#: main/archives.c:856 #, c-format msgid "Version %.250s of %.250s already installed, skipping.\n" msgstr "" -#: main/archives.c:890 +#: main/archives.c:868 #, c-format msgid "%s - warning: downgrading %.250s from %.250s to %.250s.\n" msgstr "" -#: main/archives.c:896 +#: main/archives.c:874 #, c-format msgid "Will not downgrade %.250s from version %.250s to %.250s, skipping.\n" msgstr "" @@ -1625,45 +1645,45 @@ msgstr "" msgid "failed to fdopen CC pipe" msgstr "" -#: main/enquiry.c:701 +#: main/enquiry.c:700 msgid "error reading from CC pipe" msgstr "" -#: main/enquiry.c:703 +#: main/enquiry.c:702 msgid "empty output" msgstr "" -#: main/enquiry.c:705 +#: main/enquiry.c:704 msgid "no newline" msgstr "" -#: main/enquiry.c:708 +#: main/enquiry.c:707 msgid "no gcc-lib component" msgstr "" -#: main/enquiry.c:710 +#: main/enquiry.c:709 msgid "no slash after gcc-lib" msgstr "" -#: main/enquiry.c:722 +#: main/enquiry.c:721 #, c-format msgid "dpkg: warning, architecture `%s' not in remapping table\n" msgstr "" -#: main/enquiry.c:764 +#: main/enquiry.c:763 msgid "--cmpversions takes three arguments: " msgstr "" -#: main/enquiry.c:769 +#: main/enquiry.c:768 msgid "--cmpversions bad relation" msgstr "" -#: main/enquiry.c:774 +#: main/enquiry.c:773 #, c-format msgid "version a has bad syntax: %s\n" msgstr "" -#: main/enquiry.c:784 +#: main/enquiry.c:783 #, c-format msgid "version b has bad syntax: %s\n" msgstr "" @@ -2355,81 +2375,77 @@ msgstr "" msgid "unable to exec dpkg-deb to get filesystem archive" msgstr "" -#: main/processarc.c:518 -msgid "unable to fdopen dpkg-deb extract pipe" -msgstr "" - -#: main/processarc.c:524 +#: main/processarc.c:523 msgid "error reading dpkg-deb tar output" msgstr "" -#: main/processarc.c:527 -msgid "unexpected EOF in filesystem tarfile - corrupted package archive" +#: main/processarc.c:525 +msgid "corrupted filesystem tarfile - corrupted package archive" msgstr "" -#: main/processarc.c:529 -msgid "corrupted filesystem tarfile - corrupted package archive" +#: main/processarc.c:528 +msgid "dpkg-deb: zap possible trailing zeros" msgstr "" -#: main/processarc.c:626 +#: main/processarc.c:620 #, c-format msgid "dpkg: warning - unable to delete old file `%.250s': %s\n" msgstr "" -#: main/processarc.c:648 main/processarc.c:883 main/remove.c:287 +#: main/processarc.c:642 main/processarc.c:877 main/remove.c:287 msgid "cannot read info directory" msgstr "" -#: main/processarc.c:661 +#: main/processarc.c:655 #, c-format msgid "old version of package has overly-long info file name starting `%.250s'" msgstr "" -#: main/processarc.c:673 +#: main/processarc.c:667 #, c-format msgid "unable to remove obsolete info file `%.250s'" msgstr "" -#: main/processarc.c:676 +#: main/processarc.c:670 #, c-format msgid "unable to install (supposed) new info file `%.250s'" msgstr "" -#: main/processarc.c:683 +#: main/processarc.c:677 msgid "unable to open temp control directory" msgstr "" -#: main/processarc.c:692 +#: main/processarc.c:686 #, c-format msgid "package contains overly-long control info file name (starting `%.50s')" msgstr "" -#: main/processarc.c:697 +#: main/processarc.c:691 #, c-format msgid "package control info contained directory `%.250s'" msgstr "" -#: main/processarc.c:699 +#: main/processarc.c:693 #, c-format msgid "package control info rmdir of `%.250s' didn't say not a dir" msgstr "" -#: main/processarc.c:705 +#: main/processarc.c:699 #, c-format msgid "dpkg: warning - package %s contained list as info file" msgstr "" -#: main/processarc.c:712 +#: main/processarc.c:706 #, c-format msgid "unable to install new info file `%.250s' as `%.250s'" msgstr "" -#: main/processarc.c:863 +#: main/processarc.c:857 #, c-format msgid "(Noting disappearance of %s, which has been completely replaced.)\n" msgstr "" -#: main/processarc.c:899 +#: main/processarc.c:893 #, c-format msgid "unable to delete disappearing control info file `%.250s'" msgstr "" @@ -2637,131 +2653,131 @@ msgstr "" msgid "%s: no compression copy loop" msgstr "" -#: dpkg-deb/build.c:173 +#: dpkg-deb/build.c:174 #, c-format msgid "%s: internal gzip error: read: `%s'" msgstr "" -#: dpkg-deb/build.c:183 +#: dpkg-deb/build.c:184 #, c-format msgid "%s: internal gzip error: write: `%s'" msgstr "" -#: dpkg-deb/build.c:186 +#: dpkg-deb/build.c:187 #, c-format msgid "%s: internal gzip error: read(%i) != write(%i)" msgstr "" -#: dpkg-deb/build.c:191 +#: dpkg-deb/build.c:194 #, c-format msgid "%s: failed to exec gzip %s" msgstr "" #. Decode our arguments -#: dpkg-deb/build.c:220 +#: dpkg-deb/build.c:223 msgid "--build needs a directory argument" msgstr "" -#: dpkg-deb/build.c:229 +#: dpkg-deb/build.c:232 msgid "--build takes at most two arguments" msgstr "" -#: dpkg-deb/build.c:233 +#: dpkg-deb/build.c:236 #, c-format msgid "unable to check for existence of archive `%.250s'" msgstr "" -#: dpkg-deb/build.c:248 +#: dpkg-deb/build.c:251 msgid "target is directory - cannot skip control file check" msgstr "" -#: dpkg-deb/build.c:249 +#: dpkg-deb/build.c:252 #, c-format msgid "" "dpkg-deb: warning, not checking contents of control area.\n" "dpkg-deb: building an unknown package in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:267 +#: dpkg-deb/build.c:270 msgid "package name has characters that aren't lowercase alphanums or `-+.'" msgstr "" -#: dpkg-deb/build.c:269 +#: dpkg-deb/build.c:272 #, c-format msgid "warning, `%s' contains user-defined Priority value `%s'\n" msgstr "" -#: dpkg-deb/build.c:274 +#: dpkg-deb/build.c:277 #, c-format msgid "warning, `%s' contains user-defined field `%s'\n" msgstr "" -#: dpkg-deb/build.c:280 +#: dpkg-deb/build.c:283 #, c-format msgid "%d errors in control file" msgstr "" -#: dpkg-deb/build.c:291 +#: dpkg-deb/build.c:294 #, c-format msgid "dpkg-deb: building package `%s' in `%s'.\n" msgstr "" -#: dpkg-deb/build.c:299 +#: dpkg-deb/build.c:302 #, c-format msgid "control directory has bad permissions %03lo (must be >=0755 and <=0775)" msgstr "" -#: dpkg-deb/build.c:310 +#: dpkg-deb/build.c:313 #, c-format msgid "maintainer script `%.50s' is not a plain file or symlink" msgstr "" -#: dpkg-deb/build.c:312 +#: dpkg-deb/build.c:315 #, c-format msgid "" "maintainer script `%.50s' has bad permissions %03lo (must be >=0555 and " "<=0775)" msgstr "" -#: dpkg-deb/build.c:316 +#: dpkg-deb/build.c:319 #, c-format msgid "maintainer script `%.50s' is not stattable" msgstr "" -#: dpkg-deb/build.c:326 +#: dpkg-deb/build.c:329 msgid "empty string from fgets reading conffiles" msgstr "" -#: dpkg-deb/build.c:328 +#: dpkg-deb/build.c:331 #, c-format msgid "" "warning, conffile name `%.50s...' is too long, or missing final newline\n" msgstr "" -#: dpkg-deb/build.c:340 +#: dpkg-deb/build.c:343 #, c-format msgid "conffile `%.250s' does not appear in package" msgstr "" -#: dpkg-deb/build.c:342 +#: dpkg-deb/build.c:345 #, c-format msgid "conffile `%.250s' is not stattable" msgstr "" -#: dpkg-deb/build.c:344 +#: dpkg-deb/build.c:347 #, c-format msgid "warning, conffile `%s' is not a plain file\n" msgstr "" -#: dpkg-deb/build.c:349 +#: dpkg-deb/build.c:352 msgid "error reading conffiles file" msgstr "" -#: dpkg-deb/build.c:352 +#: dpkg-deb/build.c:355 msgid "error opening conffiles file" msgstr "" -#: dpkg-deb/build.c:355 +#: dpkg-deb/build.c:358 #, c-format msgid "dpkg-deb: ignoring %d warnings about the control file(s)\n" msgstr "" @@ -2769,87 +2785,87 @@ msgstr "" #. Now that we have verified everything its time to actually #. * build something. Lets start by making the ar-wrapper. #. -#: dpkg-deb/build.c:364 +#: dpkg-deb/build.c:367 #, c-format msgid "unable to create `%.255s'" msgstr "" -#: dpkg-deb/build.c:365 +#: dpkg-deb/build.c:368 #, c-format msgid "unable to unbuffer `%.255s'" msgstr "" -#: dpkg-deb/build.c:370 dpkg-deb/build.c:443 dpkg-deb/build.c:465 +#: dpkg-deb/build.c:373 dpkg-deb/build.c:446 dpkg-deb/build.c:468 #, c-format msgid "failed to chdir to `%.255s'" msgstr "" -#: dpkg-deb/build.c:371 +#: dpkg-deb/build.c:374 msgid "failed to chdir to .../DEBIAN" msgstr "" -#: dpkg-deb/build.c:372 dpkg-deb/build.c:445 +#: dpkg-deb/build.c:375 dpkg-deb/build.c:448 msgid "failed to exec tar -cf" msgstr "" #. Create a temporary file to store the control data in. Immediately unlink #. * our temporary file so others can't mess with it. #. -#: dpkg-deb/build.c:378 +#: dpkg-deb/build.c:381 msgid "failed to make tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:379 +#: dpkg-deb/build.c:382 #, c-format msgid "failed to open tmpfile (control), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:382 +#: dpkg-deb/build.c:385 #, c-format msgid "failed to unlink tmpfile (control), %s" msgstr "" -#: dpkg-deb/build.c:390 dpkg-deb/build.c:419 dpkg-deb/build.c:455 +#: dpkg-deb/build.c:393 dpkg-deb/build.c:422 dpkg-deb/build.c:458 msgid "control" msgstr "" -#: dpkg-deb/build.c:395 +#: dpkg-deb/build.c:398 msgid "failed to fstat tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:418 +#: dpkg-deb/build.c:421 msgid "failed to rewind tmpfile (control)" msgstr "" -#: dpkg-deb/build.c:426 +#: dpkg-deb/build.c:429 msgid "failed to make tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:427 +#: dpkg-deb/build.c:430 #, c-format msgid "failed to open tmpfile (data), %s" msgstr "" #. make sure it's gone, the fd will remain until we close it -#: dpkg-deb/build.c:430 +#: dpkg-deb/build.c:433 #, c-format msgid "failed to unlink tmpfile (data), %s" msgstr "" -#: dpkg-deb/build.c:467 +#: dpkg-deb/build.c:470 msgid "failed to exec find" msgstr "" -#: dpkg-deb/build.c:478 dpkg-deb/build.c:485 +#: dpkg-deb/build.c:481 dpkg-deb/build.c:488 msgid "failed to write filename to tar pipe (data)" msgstr "" -#: dpkg-deb/build.c:502 +#: dpkg-deb/build.c:505 msgid "failed to rewind tmpfile (data)" msgstr "" -#: dpkg-deb/build.c:503 +#: dpkg-deb/build.c:506 msgid "cat (data)" msgstr ""