[SCM] dpkg's main repository branch, master, updated. 1.14.25-250-g9a8b551
The following commit has been merged in the master branch: commit 8007f14bce53b4d053fd97929173281aeffe Author: Guillem Jover guil...@debian.org Date: Tue Feb 10 02:44:59 2009 +0200 dpkg: Rename assertversion to assert_version_support diff --git a/ChangeLog b/ChangeLog index 84b10f6..2ff4497 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-10 Guillem Jover guil...@debian.org + + * src/enquiry.c (assertversion): Rename to ... + (assert_version_support): ... this. + 2009-02-08 Guillem Jover guil...@debian.org * lib/dpkg.h (ohshitvb): Remove function prototype. diff --git a/src/enquiry.c b/src/enquiry.c index 68e4acb..a2d9402 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -237,9 +237,11 @@ void unpackchk(const char *const *argv) { if (ferror(stdout)) werr(stdout); } -static void assertversion(const char *const *argv, - struct versionrevision *verrev_buf, - const char *reqversion) { +static void +assert_version_support(const char *const *argv, + struct versionrevision *verrev_buf, + const char *reqversion) +{ struct pkginfo *pkg; if (*argv) @@ -271,22 +273,22 @@ static void assertversion(const char *const *argv, void assertpredep(const char *const *argv) { static struct versionrevision predepversion = { ~0UL, NULL, NULL }; - assertversion(argv,predepversion,1.1.0); + assert_version_support(argv, predepversion, 1.1.0); } void assertepoch(const char *const *argv) { static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assertversion(argv,epochversion,1.4.0.7); + assert_version_support(argv, epochversion, 1.4.0.7); } void assertlongfilenames(const char *const *argv) { static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assertversion(argv,epochversion,1.4.1.17); + assert_version_support(argv, epochversion, 1.4.1.17); } void assertmulticonrep(const char *const *argv) { static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assertversion(argv,epochversion,1.4.1.19); + assert_version_support(argv, epochversion, 1.4.1.19); } void predeppackage(const char *const *argv) { -- 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.14.25-250-g9a8b551
The following commit has been merged in the master branch: commit 7efb708a1f3f645ad102de9c64a0ab7d7ac925a9 Author: Guillem Jover guil...@debian.org Date: Tue Feb 10 03:10:17 2009 +0200 dpkg: Print correct feature name on --assert-* failures diff --git a/ChangeLog b/ChangeLog index 7a304e3..73ee013 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assert_version_support): Add new feature_name + argument, and use it when printing the output messages. Fix all + callers. + +2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assert_version_support): Remove reqversion argument. Do not initialize verrev_buf from reqversion, when the epoch is ~0UL. (assertpredep): Pass a fully constructed versionrevision to diff --git a/debian/changelog b/debian/changelog index 66eb40a..41bb0c6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -59,6 +59,7 @@ dpkg (1.15.0) UNRELEASED; urgency=low * Add kopensolaris support to ostable and triplettable. Closes: #509312 * Document in deb.5 in detail the currently supported format, ar member names, types of tar archives and data.tar members. + * Print correct feature name on «dpkg --assert-*» failures. [ Raphael Hertzog ] * Enhance dpkg-shlibdeps's error message when a library can't be found to diff --git a/src/enquiry.c b/src/enquiry.c index 17bbc18..7840748 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -239,7 +239,8 @@ void unpackchk(const char *const *argv) { static void assert_version_support(const char *const *argv, - struct versionrevision *verrev_buf) + struct versionrevision *verrev_buf, + const char *feature_name) { struct pkginfo *pkg; @@ -257,33 +258,35 @@ assert_version_support(const char *const *argv, case stat_triggersawaited: if (versionsatisfied3(pkg-configversion,verrev_buf,dvr_laterequal)) break; -printf(_(Version of dpkg with working epoch support not yet configured.\n -Please use `dpkg --configure dpkg', and then try again.\n)); +printf(_(Version of dpkg with working %s support not yet configured.\n + Please use 'dpkg --configure dpkg', and then try again.\n), + feature_name); exit(1); default: -printf(_(dpkg not recorded as installed, cannot check for epoch support !\n)); +printf(_(dpkg not recorded as installed, cannot check for %s support!\n), + feature_name); exit(1); } } void assertpredep(const char *const *argv) { struct versionrevision version = { 0, 1.1.0, NULL }; - assert_version_support(argv, version); + assert_version_support(argv, version, _(Pre-Depends field)); } void assertepoch(const char *const *argv) { struct versionrevision version = { 0, 1.4.0.7, NULL }; - assert_version_support(argv, version); + assert_version_support(argv, version, _(epoch)); } void assertlongfilenames(const char *const *argv) { struct versionrevision version = { 0, 1.4.1.17, NULL }; - assert_version_support(argv, version); + assert_version_support(argv, version, _(long filenames)); } void assertmulticonrep(const char *const *argv) { struct versionrevision version = { 0, 1.4.1.19, NULL }; - assert_version_support(argv, version); + assert_version_support(argv, version, _(multiple Conflicts and Replaces)); } void predeppackage(const char *const *argv) { -- 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.14.25-250-g9a8b551
The following commit has been merged in the master branch: commit ad0596aaa56277e08efe764373001f4525dd5726 Author: Guillem Jover guil...@debian.org Date: Tue Feb 10 02:52:50 2009 +0200 dpkg: Pass fully constructed versions to assert_version_support Remove the missplaced version constructor from inside assert_version_support, and instead just pass an already initialized structure. This also allows making the version structures non-static. diff --git a/ChangeLog b/ChangeLog index 2ff4497..7a304e3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,16 @@ 2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assert_version_support): Remove reqversion argument. + Do not initialize verrev_buf from reqversion, when the epoch is ~0UL. + (assertpredep): Pass a fully constructed versionrevision to + assert_version_support, rename versionrevision variable to version + and remove static keyword. + (assertepoch): Likewise. + (assertlongfilenames): Likewise. + (assertmulticonrep): Likewise. + +2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assertversion): Rename to ... (assert_version_support): ... this. diff --git a/src/enquiry.c b/src/enquiry.c index a2d9402..17bbc18 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -239,8 +239,7 @@ void unpackchk(const char *const *argv) { static void assert_version_support(const char *const *argv, - struct versionrevision *verrev_buf, - const char *reqversion) + struct versionrevision *verrev_buf) { struct pkginfo *pkg; @@ -248,11 +247,7 @@ assert_version_support(const char *const *argv, badusage(_(--%s takes no arguments), cipaction-olong); modstatdb_init(admindir,msdbrw_readonly|msdbrw_noavail); - if (verrev_buf-epoch == ~0UL) { -verrev_buf-epoch= 0; -verrev_buf-version= nfstrsave(reqversion); -verrev_buf-revision = NULL; - } + pkg= findpackage(dpkg); switch (pkg-status) { case stat_installed: @@ -272,23 +267,23 @@ assert_version_support(const char *const *argv, } void assertpredep(const char *const *argv) { - static struct versionrevision predepversion = { ~0UL, NULL, NULL }; - assert_version_support(argv, predepversion, 1.1.0); + struct versionrevision version = { 0, 1.1.0, NULL }; + assert_version_support(argv, version); } void assertepoch(const char *const *argv) { - static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assert_version_support(argv, epochversion, 1.4.0.7); + struct versionrevision version = { 0, 1.4.0.7, NULL }; + assert_version_support(argv, version); } void assertlongfilenames(const char *const *argv) { - static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assert_version_support(argv, epochversion, 1.4.1.17); + struct versionrevision version = { 0, 1.4.1.17, NULL }; + assert_version_support(argv, version); } void assertmulticonrep(const char *const *argv) { - static struct versionrevision epochversion = { ~0UL, NULL, NULL }; - assert_version_support(argv, epochversion, 1.4.1.19); + struct versionrevision version = { 0, 1.4.1.19, NULL }; + assert_version_support(argv, version); } void predeppackage(const char *const *argv) { -- 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.14.25-250-g9a8b551
The following commit has been merged in the master branch: commit 9a8b551b6bb4f6379905bdd8273b5800f858cbdc Author: Guillem Jover guil...@debian.org Date: Tue Feb 10 03:12:02 2009 +0200 dpkg: Rename assert_version_support argument verrev_buf to version diff --git a/ChangeLog b/ChangeLog index 73ee013..966012f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assert_version_support): Rename verrev_buf argument + to version. + +2009-02-10 Guillem Jover guil...@debian.org + * src/enquiry.c (assert_version_support): Add new feature_name argument, and use it when printing the output messages. Fix all callers. diff --git a/src/enquiry.c b/src/enquiry.c index 7840748..d57073a 100644 --- a/src/enquiry.c +++ b/src/enquiry.c @@ -239,7 +239,7 @@ void unpackchk(const char *const *argv) { static void assert_version_support(const char *const *argv, - struct versionrevision *verrev_buf, + struct versionrevision *version, const char *feature_name) { struct pkginfo *pkg; @@ -256,7 +256,7 @@ assert_version_support(const char *const *argv, break; case stat_unpacked: case stat_halfconfigured: case stat_halfinstalled: case stat_triggersawaited: -if (versionsatisfied3(pkg-configversion,verrev_buf,dvr_laterequal)) +if (versionsatisfied3(pkg-configversion, version, dvr_laterequal)) break; printf(_(Version of dpkg with working %s support not yet configured.\n Please use 'dpkg --configure dpkg', and then try again.\n), -- 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