The following commit has been merged in the master branch:
commit ada8ee446e8b48d24bbf93aa446468fd9c4a76c2
Author: Guillem Jover <[email protected]>
Date: Fri Mar 30 22:42:00 2012 +0200
Rename informativeversion() to dpkg_version_is_informative()
diff --git a/dselect/pkglist.cc b/dselect/pkglist.cc
index 9fafb3b..c899e89 100644
--- a/dselect/pkglist.cc
+++ b/dselect/pkglist.cc
@@ -190,7 +190,7 @@ void packagelist::ensurestatsortinfo() {
break;
case pkginfo::stat_notinstalled:
case pkginfo::stat_configfiles:
- if (!informativeversion(&pkg->available.version)) {
+ if (!dpkg_version_is_informative(&pkg->available.version)) {
table[index]->ssavail= ssa_notinst_gone;
// FIXME: Disable for now as a workaround, until dselect knows how to properly
// store seen packages.
@@ -205,7 +205,7 @@ void packagelist::ensurestatsortinfo() {
case pkginfo::stat_installed:
veri= &table[index]->pkg->installed.version;
vera= &table[index]->pkg->available.version;
- if (!informativeversion(vera)) {
+ if (!dpkg_version_is_informative(vera)) {
table[index]->ssavail= ssa_installed_gone;
} else if (versioncompare(vera,veri) > 0) {
table[index]->ssavail= ssa_installed_newer;
diff --git a/dselect/pkgtop.cc b/dselect/pkgtop.cc
index 6a74004..b47c8c8 100644
--- a/dselect/pkgtop.cc
+++ b/dselect/pkgtop.cc
@@ -206,7 +206,7 @@ void packagelist::redraw1itemsel(int index, int selected) {
versioninstalled_width, versioninstalled_width,
versiondescribe(&pkg->installed.version, vdew_nonambig));
if (versionavailable_width) {
- if (informativeversion(&pkg->available.version) &&
+ if (dpkg_version_is_informative(&pkg->available.version) &&
versioncompare(&pkg->available.version,&pkg->installed.version) > 0)
wattrset(listpad, part_attr[selected ? selstatesel : selstate]);
mvwprintw(listpad, screenline, versionavailable_column, "%-*.*s",
diff --git a/lib/dpkg/dump.c b/lib/dpkg/dump.c
index 4723b2a..68a8287 100644
--- a/lib/dpkg/dump.c
+++ b/lib/dpkg/dump.c
@@ -63,7 +63,8 @@ w_version(struct varbuf *vb,
const struct pkginfo *pigp, const struct pkgbin *pifp,
enum fwriteflags flags, const struct fieldinfo *fip)
{
- if (!informativeversion(&pifp->version)) return;
+ if (!dpkg_version_is_informative(&pifp->version))
+ return;
if (flags&fw_printheader)
varbuf_add_str(vb, "Version: ");
varbufversion(vb,&pifp->version,vdew_nonambig);
@@ -77,7 +78,8 @@ w_configversion(struct varbuf *vb,
enum fwriteflags flags, const struct fieldinfo *fip)
{
if (pifp != &pigp->installed) return;
- if (!informativeversion(&pigp->configversion)) return;
+ if (!dpkg_version_is_informative(&pigp->configversion))
+ return;
if (pigp->status == stat_installed ||
pigp->status == stat_notinstalled ||
pigp->status == stat_triggerspending)
diff --git a/lib/dpkg/libdpkg.map b/lib/dpkg/libdpkg.map
index e11fdf5..8131e8b 100644
--- a/lib/dpkg/libdpkg.map
+++ b/lib/dpkg/libdpkg.map
@@ -178,7 +178,7 @@ LIBDPKG_PRIVATE {
# Version struct handling
dpkg_version_blank;
- informativeversion;
+ dpkg_version_is_informative;
epochsdiffer;
versioncompare;
versiondescribe;
diff --git a/lib/dpkg/parsehelp.c b/lib/dpkg/parsehelp.c
index 383acc5..10b78b0 100644
--- a/lib/dpkg/parsehelp.c
+++ b/lib/dpkg/parsehelp.c
@@ -181,7 +181,7 @@ const char *versiondescribe
struct varbuf *vb;
- if (!informativeversion(version))
+ if (!dpkg_version_is_informative(version))
return C_("version", "<none>");
vb= &bufs[bufnum]; bufnum++; if (bufnum == 10) bufnum= 0;
diff --git a/lib/dpkg/pkg.c b/lib/dpkg/pkg.c
index fe258dc..b42fb39 100644
--- a/lib/dpkg/pkg.c
+++ b/lib/dpkg/pkg.c
@@ -194,7 +194,7 @@ pkg_is_informative(struct pkginfo *pkg, struct pkgbin
*pkgbin)
(pkg->want != want_unknown ||
pkg->eflag != eflag_ok ||
pkg->status != stat_notinstalled ||
- informativeversion(&pkg->configversion)))
+ dpkg_version_is_informative(&pkg->configversion)))
return true;
if (pkgbin->depends ||
@@ -204,7 +204,7 @@ pkg_is_informative(struct pkginfo *pkg, struct pkgbin
*pkgbin)
nes(pkgbin->bugs) ||
nes(pkgbin->installedsize) ||
nes(pkgbin->source) ||
- informativeversion(&pkgbin->version) ||
+ dpkg_version_is_informative(&pkgbin->version) ||
pkgbin->conffiles ||
pkgbin->arbs)
return true;
diff --git a/lib/dpkg/version.c b/lib/dpkg/version.c
index f5d2d18..e89cc38 100644
--- a/lib/dpkg/version.c
+++ b/lib/dpkg/version.c
@@ -32,7 +32,7 @@ dpkg_version_blank(struct versionrevision *version)
}
bool
-informativeversion(const struct versionrevision *version)
+dpkg_version_is_informative(const struct versionrevision *version)
{
return (version->epoch ||
(version->version && *version->version) ||
diff --git a/lib/dpkg/version.h b/lib/dpkg/version.h
index b865737..5a3f4c3 100644
--- a/lib/dpkg/version.h
+++ b/lib/dpkg/version.h
@@ -34,7 +34,7 @@ struct versionrevision {
};
void dpkg_version_blank(struct versionrevision *version);
-bool informativeversion(const struct versionrevision *version);
+bool dpkg_version_is_informative(const struct versionrevision *version);
DPKG_END_DECLS
diff --git a/src/configure.c b/src/configure.c
index c815179..5c4414d 100644
--- a/src/configure.c
+++ b/src/configure.c
@@ -386,7 +386,7 @@ deferred_configure(struct pkginfo *pkg)
modstatdb_note(pkg);
maintainer_script_postinst(pkg, "configure",
- informativeversion(&pkg->configversion) ?
+
dpkg_version_is_informative(&pkg->configversion) ?
versiondescribe(&pkg->configversion,
vdew_nonambig) : "",
NULL);
diff --git a/src/depcon.c b/src/depcon.c
index 9901c71..4d49317 100644
--- a/src/depcon.c
+++ b/src/depcon.c
@@ -415,7 +415,7 @@ depisok(struct dependency *dep, struct varbuf *whynot,
case stat_unpacked:
case stat_halfconfigured:
if (allowunconfigd) {
- if (!informativeversion(&pkg_pos->configversion)) {
+ if (!dpkg_version_is_informative(&pkg_pos->configversion)) {
sprintf(linebuf, _(" %.250s is unpacked, but has never been "
"configured.\n"),
pkg_name(pkg_pos, pnaw_nonambig));
diff --git a/src/enquiry.c b/src/enquiry.c
index ffeb4ab..5bb85ae 100644
--- a/src/enquiry.c
+++ b/src/enquiry.c
@@ -619,9 +619,12 @@ cmpversions(const char *const *argv)
} else {
dpkg_version_blank(&b);
}
- if (!informativeversion(&a)) {
- return informativeversion(&b) ? rip->if_none_a : rip->if_none_both;
- } else if (!informativeversion(&b)) {
+ if (!dpkg_version_is_informative(&a)) {
+ if (dpkg_version_is_informative(&b))
+ return rip->if_none_a;
+ else
+ return rip->if_none_both;
+ } else if (!dpkg_version_is_informative(&b)) {
return rip->if_none_b;
}
r= versioncompare(&a,&b);
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]