1993-08-26 01:19:55 +00:00
|
|
|
/*
|
2011-12-30 10:58:14 +00:00
|
|
|
* FreeBSD install - a package for the installation and maintenance
|
1993-08-26 01:19:55 +00:00
|
|
|
* of non-core utilities.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* Jordan K. Hubbard
|
|
|
|
* 23 Aug 1993
|
|
|
|
*
|
|
|
|
* Various display routines for the info module.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2002-04-01 09:39:07 +00:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
__FBSDID("$FreeBSD$");
|
|
|
|
|
2011-05-17 19:11:47 +00:00
|
|
|
#include "lib.h"
|
1993-08-26 01:19:55 +00:00
|
|
|
#include "info.h"
|
1999-08-11 20:55:42 +00:00
|
|
|
#include <err.h>
|
2000-07-07 13:06:32 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/stat.h>
|
2001-02-03 20:56:32 +00:00
|
|
|
#include <md5.h>
|
1999-08-11 20:55:42 +00:00
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_file(const char *title, const char *fname)
|
1993-08-26 01:19:55 +00:00
|
|
|
{
|
|
|
|
FILE *fp;
|
|
|
|
char line[1024];
|
|
|
|
int n;
|
|
|
|
|
1993-09-08 01:46:59 +00:00
|
|
|
if (!Quiet)
|
|
|
|
printf("%s%s", InfoPrefix, title);
|
1993-08-26 01:19:55 +00:00
|
|
|
fp = fopen(fname, "r");
|
2003-05-26 17:06:05 +00:00
|
|
|
if (fp == (FILE *) NULL)
|
1995-07-30 01:08:34 +00:00
|
|
|
printf("ERROR: show_file: Can't open '%s' for reading!\n", fname);
|
|
|
|
else {
|
2003-05-26 17:06:05 +00:00
|
|
|
int append_nl = 0;
|
1996-06-20 18:33:55 +00:00
|
|
|
while ((n = fread(line, 1, 1024, fp)) != 0)
|
1995-07-30 01:08:34 +00:00
|
|
|
fwrite(line, 1, n, stdout);
|
|
|
|
fclose(fp);
|
2003-05-26 17:06:05 +00:00
|
|
|
append_nl = (line[n - 1] != '\n'); /* Do we have a trailing \n ? */
|
|
|
|
if (append_nl)
|
|
|
|
printf("\n");
|
1993-08-26 01:19:55 +00:00
|
|
|
}
|
|
|
|
printf("\n"); /* just in case */
|
|
|
|
}
|
|
|
|
|
1995-01-05 01:10:13 +00:00
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_index(const char *title, const char *fname)
|
1995-01-05 01:10:13 +00:00
|
|
|
{
|
|
|
|
FILE *fp;
|
|
|
|
char line[MAXINDEXSIZE+2];
|
1995-05-30 03:57:47 +00:00
|
|
|
|
2003-05-26 17:06:05 +00:00
|
|
|
strlcpy(line, "???\n", sizeof(line));
|
|
|
|
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
1995-01-05 01:10:13 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
1995-01-05 01:10:13 +00:00
|
|
|
fp = fopen(fname, "r");
|
2003-05-26 17:06:05 +00:00
|
|
|
if (fp == (FILE *) NULL) {
|
1997-10-08 07:48:21 +00:00
|
|
|
warnx("show_file: can't open '%s' for reading", fname);
|
2003-05-26 17:06:05 +00:00
|
|
|
} else {
|
|
|
|
if(fgets(line, MAXINDEXSIZE + 1, fp)) {
|
|
|
|
size_t line_length = strlen(line);
|
|
|
|
|
|
|
|
if (line[line_length - 1] != '\n') { /* Do we have a trailing \n ? */
|
|
|
|
line[line_length] = '\n'; /* Add a trailing \n */
|
|
|
|
line[line_length + 1] = '\0'; /* Terminate string */
|
|
|
|
}
|
|
|
|
}
|
|
|
|
fclose(fp);
|
1995-01-05 01:10:13 +00:00
|
|
|
}
|
2003-05-26 17:06:05 +00:00
|
|
|
fputs(line, stdout);
|
1995-05-30 03:57:47 +00:00
|
|
|
}
|
1995-01-05 01:10:13 +00:00
|
|
|
|
2001-10-10 06:58:42 +00:00
|
|
|
/* Show a packing list item type. If showall is TRUE, show all */
|
1993-08-26 01:19:55 +00:00
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_plist(const char *title, Package *plist, plist_t type, Boolean showall)
|
1993-08-26 01:19:55 +00:00
|
|
|
{
|
|
|
|
PackingList p;
|
|
|
|
Boolean ign = FALSE;
|
2006-01-07 22:10:58 +00:00
|
|
|
char *prefix = NULL;
|
1993-08-26 01:19:55 +00:00
|
|
|
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
1993-09-08 01:46:59 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
1993-08-26 01:19:55 +00:00
|
|
|
p = plist->head;
|
|
|
|
while (p) {
|
2001-10-10 06:58:42 +00:00
|
|
|
if (p->type != type && showall != TRUE) {
|
1993-08-26 01:19:55 +00:00
|
|
|
p = p->next;
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
switch(p->type) {
|
|
|
|
case PLIST_FILE:
|
|
|
|
if (ign) {
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "%s\n" : "File: %s (ignored)\n", p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
ign = FALSE;
|
|
|
|
}
|
|
|
|
else
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "%s\n" : "File: %s\n", p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
1995-05-30 03:57:47 +00:00
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
case PLIST_CWD:
|
2006-01-07 22:10:58 +00:00
|
|
|
if (!prefix)
|
|
|
|
prefix = p->name;
|
|
|
|
printf(Quiet ? "@cwd %s\n" : "\tCWD to %s\n", (p->name == NULL) ? prefix : p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
1994-12-06 00:51:50 +00:00
|
|
|
case PLIST_SRC:
|
|
|
|
printf(Quiet ? "@srcdir %s\n" : "\tSRCDIR to %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
case PLIST_CMD:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@exec %s\n" : "\tEXEC '%s'\n", p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
1997-10-18 05:42:05 +00:00
|
|
|
case PLIST_UNEXEC:
|
|
|
|
printf(Quiet ? "@unexec %s\n" : "\tUNEXEC '%s'\n", p->name);
|
|
|
|
break;
|
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
case PLIST_CHMOD:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@chmod %s\n" : "\tCHMOD to %s\n",
|
|
|
|
p->name ? p->name : "(clear default)");
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_CHOWN:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@chown %s\n" : "\tCHOWN to %s\n",
|
|
|
|
p->name ? p->name : "(clear default)");
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_CHGRP:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@chgrp %s\n" : "\tCHGRP to %s\n",
|
|
|
|
p->name ? p->name : "(clear default)");
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_COMMENT:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@comment %s\n" : "\tComment: %s\n", p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
2005-06-14 15:05:43 +00:00
|
|
|
case PLIST_NOINST:
|
|
|
|
printf(Quiet ? "@noinst %s\n" : "\tNot installed: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
case PLIST_IGNORE:
|
|
|
|
ign = TRUE;
|
|
|
|
break;
|
|
|
|
|
1994-12-06 00:51:50 +00:00
|
|
|
case PLIST_IGNORE_INST:
|
|
|
|
printf(Quiet ? "@ignore_inst ??? doesn't belong here.\n" :
|
|
|
|
"\tIgnore next file installation directive (doesn't belong)\n");
|
|
|
|
ign = TRUE;
|
|
|
|
break;
|
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
case PLIST_NAME:
|
1993-09-08 01:46:59 +00:00
|
|
|
printf(Quiet ? "@name %s\n" : "\tPackage name: %s\n", p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
|
1994-12-06 00:51:50 +00:00
|
|
|
case PLIST_DISPLAY:
|
|
|
|
printf(Quiet ? "@display %s\n" : "\tInstall message file: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_PKGDEP:
|
2002-05-05 21:03:25 +00:00
|
|
|
printf(Quiet ? "@pkgdep %s\n" : "Dependency: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_DEPORIGIN:
|
|
|
|
printf(Quiet ? "@comment DEPORIGIN:%s\n" :
|
|
|
|
"\tdependency origin: %s\n", p->name);
|
1994-12-06 00:51:50 +00:00
|
|
|
break;
|
|
|
|
|
2003-04-17 09:56:05 +00:00
|
|
|
case PLIST_CONFLICTS:
|
|
|
|
printf(Quiet ? "@conflicts %s\n" : "Conflicts: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
1994-12-06 00:51:50 +00:00
|
|
|
case PLIST_MTREE:
|
|
|
|
printf(Quiet ? "@mtree %s\n" : "\tPackage mtree file: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_DIR_RM:
|
|
|
|
printf(Quiet ? "@dirrm %s\n" : "\tDeinstall directory remove: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
2001-08-06 20:09:26 +00:00
|
|
|
case PLIST_OPTION:
|
|
|
|
printf(Quiet ? "@option %s\n" :
|
|
|
|
"\tOption \"%s\" controlling package installation behaviour\n",
|
|
|
|
p->name);
|
|
|
|
break;
|
|
|
|
|
2002-05-05 12:54:11 +00:00
|
|
|
case PLIST_ORIGIN:
|
|
|
|
printf(Quiet ? "@comment ORIGIN:%s\n" :
|
|
|
|
"\tPackage origin: %s\n", p->name);
|
|
|
|
break;
|
|
|
|
|
1993-08-26 01:19:55 +00:00
|
|
|
default:
|
1997-10-08 07:48:21 +00:00
|
|
|
cleanup(0);
|
2002-05-11 03:48:49 +00:00
|
|
|
errx(2, "%s: unknown command type %d (%s)",
|
2002-05-11 04:17:55 +00:00
|
|
|
__func__, p->type, p->name);
|
1993-08-26 01:19:55 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
p = p->next;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-10-24 21:38:25 +00:00
|
|
|
static const char *
|
2011-10-24 18:29:50 +00:00
|
|
|
elide_root(const char *dir)
|
|
|
|
{
|
|
|
|
if (strcmp(dir, "/") == 0)
|
|
|
|
return "";
|
|
|
|
return dir;
|
|
|
|
}
|
|
|
|
|
1993-09-08 01:46:59 +00:00
|
|
|
/* Show all files in the packing list (except ignored ones) */
|
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_files(const char *title, Package *plist)
|
1993-09-08 01:46:59 +00:00
|
|
|
{
|
|
|
|
PackingList p;
|
|
|
|
Boolean ign = FALSE;
|
2007-02-07 19:44:44 +00:00
|
|
|
char *prefix = NULL;
|
2001-10-10 06:58:42 +00:00
|
|
|
const char *dir = ".";
|
1993-09-08 01:46:59 +00:00
|
|
|
|
|
|
|
if (!Quiet)
|
|
|
|
printf("%s%s", InfoPrefix, title);
|
|
|
|
p = plist->head;
|
|
|
|
while (p) {
|
|
|
|
switch(p->type) {
|
|
|
|
case PLIST_FILE:
|
|
|
|
if (!ign)
|
2011-10-24 18:29:50 +00:00
|
|
|
printf("%s/%s\n", elide_root(dir), p->name);
|
1993-09-08 01:46:59 +00:00
|
|
|
ign = FALSE;
|
|
|
|
break;
|
1995-05-30 03:57:47 +00:00
|
|
|
|
1993-09-08 01:46:59 +00:00
|
|
|
case PLIST_CWD:
|
2007-02-07 19:44:44 +00:00
|
|
|
if (!prefix)
|
|
|
|
prefix = p->name;
|
|
|
|
if (p->name == NULL)
|
|
|
|
dir = prefix;
|
|
|
|
else
|
|
|
|
dir = p->name;
|
1993-09-08 01:46:59 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_IGNORE:
|
|
|
|
ign = TRUE;
|
|
|
|
break;
|
2000-07-07 13:06:32 +00:00
|
|
|
|
|
|
|
/* Silence GCC in the -Wall mode */
|
|
|
|
default:
|
|
|
|
break;
|
1993-09-08 01:46:59 +00:00
|
|
|
}
|
|
|
|
p = p->next;
|
|
|
|
}
|
|
|
|
}
|
2000-07-07 13:06:32 +00:00
|
|
|
|
|
|
|
/* Calculate and show size of all installed package files (except ignored ones) */
|
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_size(const char *title, Package *plist)
|
2000-07-07 13:06:32 +00:00
|
|
|
{
|
|
|
|
PackingList p;
|
|
|
|
Boolean ign = FALSE;
|
2001-10-10 06:58:42 +00:00
|
|
|
const char *dir = ".";
|
2000-07-07 13:06:32 +00:00
|
|
|
struct stat sb;
|
|
|
|
char tmp[FILENAME_MAX];
|
|
|
|
unsigned long size = 0;
|
|
|
|
long blksize;
|
2002-12-30 18:16:26 +00:00
|
|
|
int headerlen;
|
2000-07-07 13:06:32 +00:00
|
|
|
char *descr;
|
2007-02-07 19:44:44 +00:00
|
|
|
char *prefix = NULL;
|
2000-07-07 13:06:32 +00:00
|
|
|
|
|
|
|
descr = getbsize(&headerlen, &blksize);
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
2000-07-07 13:06:32 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
2000-07-07 13:06:32 +00:00
|
|
|
for (p = plist->head; p != NULL; p = p->next) {
|
|
|
|
switch (p->type) {
|
|
|
|
case PLIST_FILE:
|
|
|
|
if (!ign) {
|
2011-10-24 18:29:50 +00:00
|
|
|
snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name);
|
2000-07-07 13:06:32 +00:00
|
|
|
if (!lstat(tmp, &sb)) {
|
|
|
|
size += sb.st_size;
|
|
|
|
if (Verbose)
|
|
|
|
printf("%lu\t%s\n", (unsigned long) howmany(sb.st_size, blksize), tmp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ign = FALSE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_CWD:
|
2007-02-07 19:44:44 +00:00
|
|
|
if (!prefix)
|
|
|
|
prefix = p->name;
|
|
|
|
if (p->name == NULL)
|
|
|
|
dir = prefix;
|
|
|
|
else
|
|
|
|
dir = p->name;
|
2000-07-07 13:06:32 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case PLIST_IGNORE:
|
|
|
|
ign = TRUE;
|
|
|
|
break;
|
|
|
|
|
|
|
|
/* Silence GCC in the -Wall mode */
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!Quiet)
|
|
|
|
printf("%lu\t(%s)\n", howmany(size, blksize), descr);
|
|
|
|
else
|
2003-03-25 01:22:42 +00:00
|
|
|
if (UseBlkSz)
|
|
|
|
printf("%lu\n", howmany(size, blksize));
|
|
|
|
else
|
|
|
|
printf("%lu\n", size);
|
2000-07-07 13:06:32 +00:00
|
|
|
}
|
2000-10-23 07:01:31 +00:00
|
|
|
|
2001-02-03 20:56:32 +00:00
|
|
|
/* Show files that don't match the recorded checksum */
|
2012-09-18 22:09:23 +00:00
|
|
|
int
|
2001-10-10 06:58:42 +00:00
|
|
|
show_cksum(const char *title, Package *plist)
|
2001-02-03 20:56:32 +00:00
|
|
|
{
|
|
|
|
PackingList p;
|
2001-10-10 06:58:42 +00:00
|
|
|
const char *dir = ".";
|
2007-02-07 19:44:44 +00:00
|
|
|
char *prefix = NULL;
|
2001-02-03 20:56:32 +00:00
|
|
|
char tmp[FILENAME_MAX];
|
2012-09-18 22:09:23 +00:00
|
|
|
int errcode = 0;
|
2001-02-03 20:56:32 +00:00
|
|
|
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
2001-02-03 20:56:32 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
2001-02-03 20:56:32 +00:00
|
|
|
|
|
|
|
for (p = plist->head; p != NULL; p = p->next)
|
2007-02-07 19:44:44 +00:00
|
|
|
if (p->type == PLIST_CWD) {
|
|
|
|
if (!prefix)
|
|
|
|
prefix = p->name;
|
|
|
|
if (p->name == NULL)
|
|
|
|
dir = prefix;
|
|
|
|
else
|
|
|
|
dir = p->name;
|
|
|
|
} else if (p->type == PLIST_FILE) {
|
2011-10-24 18:29:50 +00:00
|
|
|
snprintf(tmp, FILENAME_MAX, "%s/%s", elide_root(dir), p->name);
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!fexists(tmp)) {
|
2005-09-24 19:41:56 +00:00
|
|
|
warnx("%s doesn't exist", tmp);
|
2012-09-18 22:09:23 +00:00
|
|
|
errcode = 1;
|
|
|
|
} else if (p->next && p->next->type == PLIST_COMMENT &&
|
2002-05-02 12:52:42 +00:00
|
|
|
(strncmp(p->next->name, "MD5:", 4) == 0)) {
|
|
|
|
char *cp = NULL, buf[33];
|
|
|
|
|
|
|
|
/*
|
|
|
|
* For packing lists whose version is 1.1 or greater, the md5
|
|
|
|
* hash for a symlink is calculated on the string returned
|
|
|
|
* by readlink().
|
|
|
|
*/
|
|
|
|
if (issymlink(tmp) && verscmp(plist, 1, 0) > 0) {
|
|
|
|
int len;
|
|
|
|
char linkbuf[FILENAME_MAX];
|
|
|
|
|
|
|
|
if ((len = readlink(tmp, linkbuf, FILENAME_MAX)) > 0)
|
|
|
|
cp = MD5Data((unsigned char *)linkbuf, len, buf);
|
|
|
|
} else if (isfile(tmp) || verscmp(plist, 1, 1) < 0)
|
|
|
|
cp = MD5File(tmp, buf);
|
|
|
|
|
|
|
|
if (cp != NULL) {
|
|
|
|
/* Mismatch? */
|
2001-02-03 20:56:32 +00:00
|
|
|
if (strcmp(cp, p->next->name + 4))
|
|
|
|
printf("%s fails the original MD5 checksum\n", tmp);
|
|
|
|
else if (Verbose)
|
|
|
|
printf("%s matched the original MD5 checksum\n", tmp);
|
2001-02-05 09:56:52 +00:00
|
|
|
}
|
2001-02-03 20:56:32 +00:00
|
|
|
}
|
|
|
|
}
|
2012-09-18 22:09:23 +00:00
|
|
|
return (errcode);
|
2001-02-03 20:56:32 +00:00
|
|
|
}
|
|
|
|
|
2000-10-23 07:01:31 +00:00
|
|
|
/* Show an "origin" path (usually category/portname) */
|
|
|
|
void
|
2001-10-10 06:58:42 +00:00
|
|
|
show_origin(const char *title, Package *plist)
|
2000-10-23 07:01:31 +00:00
|
|
|
{
|
|
|
|
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
2000-10-23 07:01:31 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
2002-05-04 14:49:49 +00:00
|
|
|
printf("%s\n", plist->origin != NULL ? plist->origin : "");
|
2000-10-23 07:01:31 +00:00
|
|
|
}
|
2001-10-10 08:21:41 +00:00
|
|
|
|
|
|
|
/* Show revision number of the packing list */
|
|
|
|
void
|
|
|
|
show_fmtrev(const char *title, Package *plist)
|
|
|
|
{
|
2002-05-04 14:49:49 +00:00
|
|
|
|
2012-09-18 22:09:23 +00:00
|
|
|
if (!Quiet) {
|
2001-10-10 08:21:41 +00:00
|
|
|
printf("%s%s", InfoPrefix, title);
|
2012-09-18 22:09:23 +00:00
|
|
|
fflush(stdout);
|
|
|
|
}
|
2001-10-10 08:21:41 +00:00
|
|
|
printf("%d.%d\n", plist->fmtver_maj, plist->fmtver_mnr);
|
|
|
|
}
|