[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-196-g5b9ecc1
The following commit has been merged in the master branch: commit 5b9ecc1b953c78614b2aee49687bec216de748f7 Author: Guillem Jover guil...@debian.org Date: Mon Jul 25 05:12:35 2011 +0200 Add build-indep and build-arch targets as aliases for build The current build target is responsible for the generation of architecture dependent and independent files. The architecture independent files are just sed'ed and as such they take insignificant build time, so splitting that from the general build process does not seem worth the trouble or complexity. Renaming the current build target to build-arch though would be incorrect. diff --git a/debian/changelog b/debian/changelog index 900a7d2..9cee55b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -158,6 +158,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low * Refer to Sources and Packages files as part of a repository instead of as being of exclusive use or owned by APT, which has never been the case. * Unify somewhat dpkg-maintscript-helper --help output with other commands. + * Add build-indep and build-arch targets as aliases for build in +debian/rules. * Fix possible segfault of dpkg in findbreakcycle(). LP: #733414 [ Bill Allombert] diff --git a/debian/rules b/debian/rules index 2503f80..8d6aee1 100755 --- a/debian/rules +++ b/debian/rules @@ -58,7 +58,7 @@ build-tree/config.status: configure --with-bz2 # Build the package in build-tree -build: build-tree/config.status +build-indep build-arch build: build-tree/config.status dh_testdir cd build-tree $(MAKE) -- 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
[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-196-g5b9ecc1
The following commit has been merged in the master branch: commit dac802bce2e7fa909dac09d87f6fadb6074b9097 Author: Guillem Jover guil...@debian.org Date: Thu Jul 7 19:08:18 2011 +0200 dpkg-deb: Use CONTROLFILE instead of a literal string diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c index cd67d78..c7ab5e6 100644 --- a/dpkg-deb/info.c +++ b/dpkg-deb/info.c @@ -184,12 +184,12 @@ info_list(const char *debar, const char *dir) free(cdlist); varbuf_trunc(controlfile, dirlen); - varbuf_add_str(controlfile, control); + varbuf_add_str(controlfile, CONTROLFILE); varbuf_end_str(controlfile); cc = fopen(controlfile.buf, r); if (!cc) { if (errno != ENOENT) - ohshite(_(failed to read `%.255s' (in `%.255s')), control, dir); + ohshite(_(failed to read `%.255s' (in `%.255s')), CONTROLFILE, dir); fputs(_((no `control' file in control archive!)\n), stdout); } else { lines= 1; @@ -203,7 +203,7 @@ info_list(const char *debar, const char *dir) putc('\n', stdout); if (ferror(cc)) - ohshite(_(failed to read `%.255s' (in `%.255s')), control, dir); + ohshite(_(failed to read `%.255s' (in `%.255s')), CONTROLFILE, dir); fclose(cc); } @@ -270,7 +270,7 @@ info_field(const char *debar, const char *dir, const char *const *fields, } if (ferror(cc)) ohshite(_(failed during read of `control' component)); if (fclose(cc)) -ohshite(_(error closing the '%s' component), control); +ohshite(_(error closing the '%s' component), CONTROLFILE); if (doing) putc('\n',stdout); m_output(stdout, _(standard output)); varbuf_destroy(controlfile); @@ -326,7 +326,7 @@ do_field(const char *const *argv) if (*argv) { info_field(debar, dir, argv, argv[1] != NULL); } else { -static const char *const controlonly[] = { control, NULL }; +static const char *const controlonly[] = { CONTROLFILE, NULL }; info_spew(debar, dir, controlonly); } -- 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
[SCM] dpkg's main repository branch, master, updated. 1.16.0.3-196-g5b9ecc1
The following commit has been merged in the master branch: commit 9b22745f0a7127b7a171308f73e3079c535923f7 Author: Guillem Jover guil...@debian.org Date: Thu Jul 7 19:18:04 2011 +0200 dpkg-deb: Construct control components paths with printf variants The output of dpkg-deb -I, -f and -W is not performance critical, and code simplicity trumps over the tiny performance improvements that using the explicit string functions or keeping the extracted control directory in the varbuf might imply in these cases. diff --git a/dpkg-deb/info.c b/dpkg-deb/info.c index c7ab5e6..65ea6fa 100644 --- a/dpkg-deb/info.c +++ b/dpkg-deb/info.c @@ -99,10 +99,7 @@ info_spew(const char *debar, const char *dir, const char *const *argv) while ((component = *argv++) != NULL) { varbuf_reset(controlfile); -varbuf_add_str(controlfile, dir); -varbuf_add_char(controlfile, '/'); -varbuf_add_str(controlfile, component); -varbuf_end_str(controlfile); +varbuf_printf(controlfile, %s/%s, dir, component); fd = open(controlfile.buf, O_RDONLY); if (fd = 0) { @@ -136,20 +133,17 @@ info_list(const char *debar, const char *dir) FILE *cc; struct stat stab; int c; - size_t dirlen; cdn = scandir(dir, cdlist, ilist_select, alphasort); if (cdn == -1) ohshite(_(cannot scan directory `%.255s'), dir); - varbuf_add_str(controlfile, dir); - varbuf_add_char(controlfile, '/'); - dirlen = controlfile.used; for (n = 0; n cdn; n++) { cdep = cdlist[n]; -varbuf_trunc(controlfile, dirlen); -varbuf_add_str(controlfile, cdep-d_name); -varbuf_end_str(controlfile); + +varbuf_reset(controlfile); +varbuf_printf(controlfile, %s/%s, dir, cdep-d_name); + if (stat(controlfile.buf, stab)) ohshite(_(cannot stat `%.255s' (in `%.255s')), cdep-d_name, dir); if (S_ISREG(stab.st_mode)) { @@ -183,9 +177,8 @@ info_list(const char *debar, const char *dir) } free(cdlist); - varbuf_trunc(controlfile, dirlen); - varbuf_add_str(controlfile, CONTROLFILE); - varbuf_end_str(controlfile); + varbuf_reset(controlfile); + varbuf_printf(controlfile, %s/%s, dir, CONTROLFILE); cc = fopen(controlfile.buf, r); if (!cc) { if (errno != ENOENT) @@ -215,19 +208,16 @@ static void info_field(const char *debar, const char *dir, const char *const *fields, bool showfieldname) { - struct varbuf controlfile = VARBUF_INIT; FILE *cc; + char *controlfile; char fieldname[MAXFIELDNAME+1]; char *pf; const char *const *fp; int c, lno, fnl; bool doing; - varbuf_add_str(controlfile, dir); - varbuf_add_char(controlfile, '/'); - varbuf_add_str(controlfile, CONTROLFILE); - varbuf_end_str(controlfile); - cc = fopen(controlfile.buf, r); + m_asprintf(controlfile, %s/%s, dir, CONTROLFILE); + cc = fopen(controlfile, r); if (!cc) ohshite(_(could not open the `control' component)); doing = true; @@ -273,14 +263,14 @@ info_field(const char *debar, const char *dir, const char *const *fields, ohshite(_(error closing the '%s' component), CONTROLFILE); if (doing) putc('\n',stdout); m_output(stdout, _(standard output)); - varbuf_destroy(controlfile); + free(controlfile); } int do_showinfo(const char *const *argv) { - struct varbuf controlfile = VARBUF_INIT; const char *debar, *dir; + char *controlfile; struct pkginfo *pkg; struct pkg_format_node *fmt = pkg_format_parse(showformat); @@ -289,14 +279,11 @@ do_showinfo(const char *const *argv) info_prepare(argv, debar, dir, 1); - varbuf_add_str(controlfile, dir); - varbuf_add_char(controlfile, '/'); - varbuf_add_str(controlfile, CONTROLFILE); - varbuf_end_str(controlfile); - parsedb(controlfile.buf, + m_asprintf(controlfile, %s/%s, dir, CONTROLFILE); + parsedb(controlfile, pdb_recordavailable | pdb_rejectstatus | pdb_ignorefiles, pkg); pkg_format_show(fmt, pkg, pkg-available); - varbuf_destroy(controlfile); + free(controlfile); return 0; } -- 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