Add dup for the "other" gzdopen premature close.

CVS patchset: 2556
CVS date: 1998/11/25 00:42:36
This commit is contained in:
jbj 1998-11-25 00:42:36 +00:00
parent 4551a1256f
commit b2fd4c2d88
11 changed files with 181 additions and 193 deletions

View File

@ -13,30 +13,33 @@
#define MAXDOCDIR 1024
typedef struct {
struct stat fl_st;
#define fl_dev fl_st.st_dev
#define fl_ino fl_st.st_ino
#define fl_mode fl_st.st_mode
#define fl_nlink fl_st.st_nlink /* unused */
#define fl_uid fl_st.st_uid
#define fl_gid fl_st.st_gid
#define fl_rdev fl_st.st_rdev
#define fl_size fl_st.st_size
#define fl_mtime fl_st.st_mtime
const char *diskName; /* get file from here */
const char *fileName; /* filename in cpio archive */
mode_t mode;
uid_t uid;
gid_t gid;
dev_t device;
ino_t inode;
const char *uname;
const char *gname;
int flags;
int verifyFlags;
int size;
int mtime;
dev_t rdev;
const char *lang;
} FileListRec;
struct AttrRec {
const char *PmodeString;
int Pmode;
const char *PdirmodeString;
int Pdirmode;
const char *Uname;
const char *Gname;
mode_t Pmode;
mode_t Pdirmode;
};
struct FileList {
@ -61,7 +64,7 @@ struct FileList {
/* Hard coded limit of MAXDOCDIR docdirs. */
/* If you break it you are doing something wrong. */
char *docDirs[MAXDOCDIR];
const char *docDirs[MAXDOCDIR];
int docDirCount;
FileListRec *fileList;
@ -75,16 +78,16 @@ static int processPackageFiles(Spec spec, Package pkg,
static void freeFileList(FileListRec *fileList, int count);
static int compareFileListRecs(const void *ap, const void *bp);
static int isDoc(struct FileList *fl, const char *fileName);
static int processBinaryFile(Package pkg, struct FileList *fl, char *fileName);
static int addFile(struct FileList *fl, char *name, struct stat *statp);
static int processBinaryFile(Package pkg, struct FileList *fl, const char *fileName);
static int addFile(struct FileList *fl, const char *name, struct stat *statp);
static int parseForSimple(Spec spec, Package pkg, char *buf,
struct FileList *fl, char **fileName);
struct FileList *fl, const char **fileName);
static int parseForVerify(char *buf, struct FileList *fl);
static int parseForLang(char *buf, struct FileList *fl);
static int parseForAttr(char *buf, struct FileList *fl);
static int parseForConfig(char *buf, struct FileList *fl);
static int parseForRegexLang(char *fileName, char **lang);
static int myGlobPatternP(char *pattern);
static int parseForRegexLang(const char *fileName, char **lang);
static int myGlobPatternP(const char *pattern);
static int glob_error(const char *foo, int bar);
static void timeCheck(int tc, Header h);
static void genCpioListAndHeader(struct FileList *fl,
@ -98,9 +101,9 @@ static char *strtokWithQuotes(char *s, char *delim);
*
* Return nonzero if PATTERN has any special globbing chars in it.
*/
static int myGlobPatternP (char *pattern)
static int myGlobPatternP (const char *pattern)
{
register char *p = pattern;
register const char *p = pattern;
register char c;
int open = 0;
@ -523,7 +526,7 @@ static int parseForLang(char *buf, struct FileList *fl)
return 0;
}
static int parseForRegexLang(char *fileName, char **lang)
static int parseForRegexLang(const char *fileName, char **lang)
{
static int initialized = 0;
static int hasRegex = 0;
@ -531,7 +534,8 @@ static int parseForRegexLang(char *fileName, char **lang)
static char buf[BUFSIZ];
int x;
regmatch_t matches[2];
char *patt, *s;
const char *patt;
const char *s;
if (! initialized) {
initialized = 1;
@ -545,11 +549,9 @@ static int parseForRegexLang(char *fileName, char **lang)
hasRegex = 1;
}
if (! hasRegex) {
if (! hasRegex || regexec(&compiledPatt, fileName, 2, matches, REG_NOTEOL))
return 1;
}
if (! regexec(&compiledPatt, fileName, 2, matches, REG_NOTEOL)) {
/* Got match */
s = fileName + matches[1].rm_eo - 1;
x = matches[1].rm_eo - matches[1].rm_so;
@ -557,13 +559,11 @@ static int parseForRegexLang(char *fileName, char **lang)
while (x) {
buf[--x] = *s--;
}
if (lang)
*lang = buf;
return 0;
}
return 1;
}
typedef struct VFA {
char * attribute;
int flag;
@ -588,7 +588,7 @@ VFA_t virtualFileAttributes[] = {
};
static int parseForSimple(Spec spec, Package pkg, char *buf,
struct FileList *fl, char **fileName)
struct FileList *fl, const char **fileName)
{
char *s, *t;
int res, specialDoc = 0;
@ -635,8 +635,7 @@ static int parseForSimple(Spec spec, Package pkg, char *buf,
if (*fileName) {
/* We already got a file -- error */
rpmError(RPMERR_BADSPEC,
_("Two files on one line: %s"), *fileName);
rpmError(RPMERR_BADSPEC, _("Two files on one line: %s"), *fileName);
fl->processingFailed = 1;
res = 1;
}
@ -694,11 +693,8 @@ static int parseForSimple(Spec spec, Package pkg, char *buf,
static int compareFileListRecs(const void *ap, const void *bp)
{
const char *a, *b;
a = ((FileListRec *)ap)->fileName;
b = ((FileListRec *)bp)->fileName;
const char *a = ((FileListRec *)ap)->fileName;
const char *b = ((FileListRec *)bp)->fileName;
return strcmp(a, b);
}
@ -749,9 +745,9 @@ static void genCpioListAndHeader(struct FileList *fl,
if (! (flp->flags & RPMFILE_GHOST)) {
clp->fsPath = strdup(flp->diskName);
clp->archivePath = strdup(flp->fileName + skipLen);
clp->finalMode = flp->mode;
clp->finalUid = flp->uid;
clp->finalGid = flp->gid;
clp->finalMode = flp->fl_mode;
clp->finalUid = flp->fl_uid;
clp->finalGid = flp->fl_gid;
clp->mapFlags = CPIO_MAP_PATH | CPIO_MAP_MODE |
CPIO_MAP_UID | CPIO_MAP_GID;
if (isSrc) {
@ -765,58 +761,58 @@ static void genCpioListAndHeader(struct FileList *fl,
headerAddOrAppendEntry(h, RPMTAG_FILENAMES, RPM_STRING_ARRAY_TYPE,
&(flp->fileName), 1);
headerAddOrAppendEntry(h, RPMTAG_FILESIZES, RPM_INT32_TYPE,
&(flp->size), 1);
&(flp->fl_size), 1);
headerAddOrAppendEntry(h, RPMTAG_FILEUSERNAME, RPM_STRING_ARRAY_TYPE,
&(flp->uname), 1);
headerAddOrAppendEntry(h, RPMTAG_FILEGROUPNAME, RPM_STRING_ARRAY_TYPE,
&(flp->gname), 1);
headerAddOrAppendEntry(h, RPMTAG_FILEMTIMES, RPM_INT32_TYPE,
&(flp->mtime), 1);
if (sizeof(flp->mode) != sizeof(uint_16)) {
uint_16 pmode = (uint_16)flp->mode;
&(flp->fl_mtime), 1);
if (sizeof(flp->fl_mode) != sizeof(uint_16)) {
uint_16 pmode = (uint_16)flp->fl_mode;
headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(pmode), 1);
} else {
headerAddOrAppendEntry(h, RPMTAG_FILEMODES, RPM_INT16_TYPE,
&(flp->mode), 1);
&(flp->fl_mode), 1);
}
if (sizeof(flp->rdev) != sizeof(uint_16)) {
uint_16 prdev = (uint_16)flp->rdev;
if (sizeof(flp->fl_rdev) != sizeof(uint_16)) {
uint_16 prdev = (uint_16)flp->fl_rdev;
headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(prdev), 1);
} else {
headerAddOrAppendEntry(h, RPMTAG_FILERDEVS, RPM_INT16_TYPE,
&(flp->rdev), 1);
&(flp->fl_rdev), 1);
}
if (sizeof(flp->device) != sizeof(uint_32)) {
uint_32 pdevice = (uint_32)flp->device;
if (sizeof(flp->fl_dev) != sizeof(uint_32)) {
uint_32 pdevice = (uint_32)flp->fl_dev;
headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(pdevice), 1);
} else {
headerAddOrAppendEntry(h, RPMTAG_FILEDEVICES, RPM_INT32_TYPE,
&(flp->device), 1);
&(flp->fl_dev), 1);
}
headerAddOrAppendEntry(h, RPMTAG_FILEINODES, RPM_INT32_TYPE,
&(flp->inode), 1);
&(flp->fl_ino), 1);
headerAddOrAppendEntry(h, RPMTAG_FILELANGS, RPM_STRING_ARRAY_TYPE,
&(flp->lang), 1);
/* We used to add these, but they should not be needed */
/* headerAddOrAppendEntry(h, RPMTAG_FILEUIDS,
* RPM_INT32_TYPE, &(flp->uid), 1);
* RPM_INT32_TYPE, &(flp->fl_uid), 1);
* headerAddOrAppendEntry(h, RPMTAG_FILEGIDS,
* RPM_INT32_TYPE, &(flp->gid), 1);
* RPM_INT32_TYPE, &(flp->fl_gid), 1);
*/
buf[0] = '\0';
if (S_ISREG(flp->mode))
if (S_ISREG(flp->fl_mode))
mdfile(flp->diskName, buf);
s = buf;
headerAddOrAppendEntry(h, RPMTAG_FILEMD5S, RPM_STRING_ARRAY_TYPE,
&s, 1);
buf[0] = '\0';
if (S_ISLNK(flp->mode))
if (S_ISLNK(flp->fl_mode))
buf[readlink(flp->diskName, buf, BUFSIZ)] = '\0';
s = buf;
headerAddOrAppendEntry(h, RPMTAG_FILELINKTOS, RPM_STRING_ARRAY_TYPE,
@ -831,7 +827,7 @@ static void genCpioListAndHeader(struct FileList *fl,
if (!isSrc && isDoc(fl, flp->fileName))
flp->flags |= RPMFILE_DOC;
if (S_ISDIR(flp->mode))
if (S_ISDIR(flp->fl_mode))
flp->flags &= ~(RPMFILE_CONFIG|RPMFILE_DOC);
headerAddOrAppendEntry(h, RPMTAG_FILEFLAGS, RPM_INT32_TYPE,
@ -851,14 +847,15 @@ static void freeFileList(FileListRec *fileList, int count)
FREE(fileList);
}
static int addFile(struct FileList *fl, char *name, struct stat *statp)
static int addFile(struct FileList *fl, const char *name, struct stat *statp)
{
FileListRec *flp;
char fileName[BUFSIZ];
char diskName[BUFSIZ];
struct stat statbuf;
int_16 fileMode;
int fileUid, fileGid;
mode_t fileMode;
uid_t fileUid;
gid_t fileGid;
char *fileUname, *fileGname;
char *lang;
@ -966,11 +963,13 @@ static int addFile(struct FileList *fl, char *name, struct stat *statp)
flp = &fl->fileList[fl->fileListRecsUsed];
flp->fl_st = *statp; /* structure assignment */
flp->fl_mode = fileMode;
flp->fl_uid = fileUid;
flp->fl_gid = fileGid;
flp->fileName = strdup(fileName);
flp->diskName = strdup(diskName);
flp->mode = fileMode;
flp->uid = fileUid;
flp->gid = fileGid;
flp->uname = fileUname;
flp->gname = fileGname;
@ -985,21 +984,15 @@ static int addFile(struct FileList *fl, char *name, struct stat *statp)
flp->flags = fl->currentFlags;
flp->verifyFlags = fl->currentVerifyFlags;
flp->size = statp->st_size;
flp->mtime = statp->st_mtime;
flp->rdev = statp->st_rdev;
flp->device = statp->st_dev;
flp->inode = statp->st_ino;
fl->totalFileSize += flp->fl_size;
fl->fileListRecsUsed++;
fl->totalFileSize += flp->size;
fl->fileCount++;
return 0;
}
static int processBinaryFile(Package pkg, struct FileList *fl, char *fileName)
static int processBinaryFile(Package pkg, struct FileList *fl, const char *fileName)
{
char fullname[BUFSIZ];
glob_t glob_result;
@ -1044,7 +1037,8 @@ static int processPackageFiles(Spec spec, Package pkg,
int installSpecialDoc, int test)
{
struct FileList fl;
char *s, **files, **fp, *fileName;
char *s, **files, **fp;
const char *fileName;
char buf[BUFSIZ];
FILE *f;
@ -1370,23 +1364,13 @@ int processSourceFiles(Spec spec)
flp->fileName = strdup(fn);
flp->verifyFlags = RPMVERIFY_ALL;
{ struct stat sb;
stat(s, &sb);
flp->mode = sb.st_mode;
flp->uid = sb.st_uid;
flp->gid = sb.st_gid;
flp->size = sb.st_size;
flp->mtime = sb.st_mtime;
flp->rdev = sb.st_rdev;
flp->device = sb.st_dev;
flp->inode = sb.st_ino;
}
stat(s, &flp->fl_st);
flp->uname = getUname(flp->uid);
flp->gname = getGname(flp->gid);
flp->uname = getUname(flp->fl_uid);
flp->gname = getGname(flp->fl_gid);
flp->lang = strdup("");
fl.totalFileSize += flp->size;
fl.totalFileSize += flp->fl_size;
if (! (flp->uname && flp->gname)) {
rpmError(RPMERR_BADSPEC, _("Bad owner/group: %s"), s);

View File

@ -17,10 +17,11 @@ int parseNum(char *line, int *res)
return 0;
}
char *cleanFileName(char *name)
char *cleanFileName(const char *name)
{
static char res[BUFSIZ];
char *copyTo, *copyFrom, copied;
char *copyTo, copied;
const char *copyFrom;
/* Copy to fileName, eliminate duplicate "/" and trailing "/" */
copyTo = res;

View File

@ -44,7 +44,7 @@ Cambridge, MA 02139, USA. */
static int
myftw_dir (DIR **dirs, int level, int descriptors,
char *dir, size_t len,
int (*func) (void *fl, char *name, struct stat *statp),
myftwFunc func,
void *fl)
{
int got;
@ -163,7 +163,7 @@ myftw_dir (DIR **dirs, int level, int descriptors,
int myftw (const char *dir,
int descriptors,
int (*func) (void *fl, char *name, struct stat *statp),
myftwFunc func,
void *fl)
{
DIR **dirs;

View File

@ -15,7 +15,7 @@
extern "C" {
#endif
typedef int (*myftwFunc) (void *fl, char *name, struct stat *statp);
typedef int (*myftwFunc) (void *fl, const char *name, struct stat *statp);
int myftw (const char *dir,
int descriptors,

View File

@ -94,7 +94,7 @@ int isPart(char *line);
/* from build/misc.h */
int parseNum(char *line, /*@out@*/int *res);
char *cleanFileName(char *name);
char *cleanFileName(const char *name);
/* from build/parse.h */

View File

@ -71,8 +71,8 @@ struct SpecStruct {
int anyarch;
int gotBuildRoot;
/*@only@*/ char *buildRoot;
/*@only@*/ char *buildSubdir;
/*@only@*/ const char *buildRoot;
/*@only@*/ const char *buildSubdir;
char *passPhrase;
int timeCheck;

View File

@ -411,7 +411,8 @@ static void trimChangelog(Header h) {
/* 2 error */
int rpmInstallPackage(char * rootdir, rpmdb db, FD_t fd,
struct rpmRelocation * relocations,
int flags, rpmNotifyFunction notify, char * labelFormat) {
int flags, rpmNotifyFunction notify, char * labelFormat)
{
int rc, isSource, major, minor;
char * name, * version, * release;
Header h;
@ -1009,7 +1010,7 @@ static int installArchive(FD_t fd, struct fileInfo * files,
{ CFD_t cfdbuf, *cfd = &cfdbuf;
cfd->cpioIoType = cpioIoTypeGzFd;
cfd->cpioGzFd = gzdFdopen(fd, "r"); /* XXX cpioGzFd == fd */
cfd->cpioGzFd = gzdFdopen(fdDup(fdFileno(fd)), "r");
rc = cpioInstallArchive(cfd, map, mappedFiles,
((notify && archiveSize) || specFile) ?
callback : NULL,

View File

@ -465,7 +465,8 @@ static int runScript(Header h, char * root, int progArgc, char ** progArgv,
if (fdFileno(out) != STDOUT_FILENO)
dup2(fdFileno(out), STDOUT_FILENO);
/* make sure we don't close stdin/stderr/stdout by mistake! */
if (fdFileno(out) > STDERR_FILENO && fdFileno(out) != fdFileno(errfd)) fdClose (out);
if (fdFileno(out) > STDERR_FILENO && fdFileno(out) != fdFileno(errfd))
fdClose (out);
if (fdFileno(errfd) > STDERR_FILENO)
fdClose (errfd);
}

View File

@ -7,7 +7,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1998-11-24 14:20-0500\n"
"POT-Creation-Date: 1998-11-24 19:36-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@ -1467,53 +1467,53 @@ msgstr ""
msgid "syntax error in expression"
msgstr ""
#: ../build/files.c:202
#: ../build/files.c:205
#, c-format
msgid "TIMECHECK failure: %s\n"
msgstr ""
#: ../build/files.c:230 ../build/files.c:242 ../build/files.c:315
#: ../build/files.c:327 ../build/files.c:354
#: ../build/files.c:233 ../build/files.c:245 ../build/files.c:318
#: ../build/files.c:330 ../build/files.c:357
#, c-format
msgid "Bad %s() syntax: %s"
msgstr ""
#: ../build/files.c:278
#: ../build/files.c:281
#, c-format
msgid "Invalid %s token: %s"
msgstr ""
#: ../build/files.c:338
#: ../build/files.c:341
msgid "No files after %%defattr(): %s"
msgstr ""
#: ../build/files.c:366
#: ../build/files.c:369
#, c-format
msgid "Bad %s() mode spec: %s"
msgstr ""
#: ../build/files.c:384
#: ../build/files.c:387
#, c-format
msgid "Bad %s() dirmode spec: %s"
msgstr ""
#: ../build/files.c:439
#: ../build/files.c:442
msgid "Bad %%config() syntax: %s"
msgstr ""
#: ../build/files.c:457
#: ../build/files.c:460
msgid "Invalid %%config token: %s"
msgstr ""
#: ../build/files.c:480 ../build/files.c:492 ../build/files.c:505
#: ../build/files.c:483 ../build/files.c:495 ../build/files.c:508
msgid "Bad %%lang() syntax: %s"
msgstr ""
#: ../build/files.c:511
#: ../build/files.c:514
msgid "%%lang() entries are 2 characters: %s"
msgstr ""
#: ../build/files.c:517
#: ../build/files.c:520
msgid "Only one entry in %%lang(): %s"
msgstr ""
@ -1525,113 +1525,114 @@ msgstr ""
msgid "Only one arg for %%docdir"
msgstr ""
#: ../build/files.c:639
#. We already got a file -- error
#: ../build/files.c:638
#, c-format
msgid "Two files on one line: %s"
msgstr ""
#: ../build/files.c:652
#: ../build/files.c:651
#, c-format
msgid "File must begin with \"/\": %s"
msgstr ""
#: ../build/files.c:664
#: ../build/files.c:663
msgid "Can't mix special %%doc with other forms: %s"
msgstr ""
#: ../build/files.c:744
#: ../build/files.c:740
#, c-format
msgid "File listed twice: %s"
msgstr ""
#: ../build/files.c:896
#: ../build/files.c:893
#, c-format
msgid "File doesn't match prefix (%s): %s"
msgstr ""
#: ../build/files.c:906 ../build/files.c:1026
#: ../build/files.c:903 ../build/files.c:1019
#, c-format
msgid "File not found: %s"
msgstr ""
#: ../build/files.c:953
#: ../build/files.c:950
#, c-format
msgid "Bad owner/group: %s\n"
msgstr ""
#: ../build/files.c:958
#: ../build/files.c:955
#, c-format
msgid "File %d: %s\n"
msgstr ""
#: ../build/files.c:1010
#: ../build/files.c:1003
#, c-format
msgid "File needs leading \"/\": %s"
msgstr ""
#: ../build/files.c:1068
#: ../build/files.c:1062
msgid "Could not open %%files file: %s"
msgstr ""
#: ../build/files.c:1074 ../build/pack.c:451
#: ../build/files.c:1068 ../build/pack.c:451
#, c-format
msgid "line: %s"
msgstr ""
#: ../build/files.c:1392 ../build/parsePrep.c:40
#: ../build/files.c:1376 ../build/parsePrep.c:40
#, c-format
msgid "Bad owner/group: %s"
msgstr ""
#: ../build/files.c:1446
#: ../build/files.c:1430
#, c-format
msgid "Couldn't exec %s"
msgstr ""
#: ../build/files.c:1450
#: ../build/files.c:1434
#, c-format
msgid "Couldn't fork %s"
msgstr ""
#: ../build/files.c:1500
#: ../build/files.c:1484
#, c-format
msgid "%s failed"
msgstr ""
#: ../build/files.c:1504
#: ../build/files.c:1488
#, c-format
msgid "failed to write all data to %s"
msgstr ""
#: ../build/files.c:1538
#: ../build/files.c:1522
msgid "Finding provides...\n"
msgstr ""
#: ../build/files.c:1545
#: ../build/files.c:1529
msgid "Failed to find provides"
msgstr ""
#: ../build/files.c:1564
#: ../build/files.c:1548
msgid "Finding requires...\n"
msgstr ""
#: ../build/files.c:1571
#: ../build/files.c:1555
msgid "Failed to find requires"
msgstr ""
#: ../build/files.c:1605
#: ../build/files.c:1589
msgid "Provides:"
msgstr ""
#: ../build/files.c:1620
#: ../build/files.c:1604
msgid "Prereqs:"
msgstr ""
#: ../build/files.c:1632
#: ../build/files.c:1616
msgid "Requires:"
msgstr ""
#: ../build/files.c:1656
#: ../build/files.c:1640
#, c-format
msgid "Processing files: %s\n"
msgstr ""
@ -2285,120 +2286,120 @@ msgstr ""
msgid "instchangelog value in rpmrc should be a number, but isn't"
msgstr ""
#: ../lib/install.c:454 ../lib/install.c:735
#: ../lib/install.c:455 ../lib/install.c:736
msgid "stopping install as we're running --test\n"
msgstr ""
#: ../lib/install.c:485
#: ../lib/install.c:486
#, c-format
msgid "package %s-%s-%s is for a different architecture"
msgstr ""
#: ../lib/install.c:492
#: ../lib/install.c:493
#, c-format
msgid "package %s-%s-%s is for a different operating system"
msgstr ""
#: ../lib/install.c:504
#: ../lib/install.c:505
#, c-format
msgid "package: %s-%s-%s files test = %d\n"
msgstr ""
#. no matches
#: ../lib/install.c:569
#: ../lib/install.c:570
#, c-format
msgid "package %s is now obsolete and will be removed\n"
msgstr ""
#: ../lib/install.c:680
#: ../lib/install.c:681
#, c-format
msgid "file %s in netshared path\n"
msgstr ""
#: ../lib/install.c:697
#: ../lib/install.c:698
#, c-format
msgid "%s exists - creating with alternate name\n"
msgstr ""
#: ../lib/install.c:702
#: ../lib/install.c:703
#, c-format
msgid "%s exists - backing up\n"
msgstr ""
#: ../lib/install.c:741
#: ../lib/install.c:742
msgid "running preinstall script (if any)\n"
msgstr ""
#: ../lib/install.c:772
#: ../lib/install.c:773
#, c-format
msgid "warning: %s created as %s"
msgstr ""
#: ../lib/install.c:806
#: ../lib/install.c:807
#, c-format
msgid "warning: %s saved as %s"
msgstr ""
#: ../lib/install.c:810 ../lib/install.c:1521 ../lib/uninstall.c:597
#: ../lib/install.c:811 ../lib/install.c:1522 ../lib/uninstall.c:598
#, c-format
msgid "rename of %s to %s failed: %s"
msgstr ""
#: ../lib/install.c:911
#: ../lib/install.c:912
msgid "running postinstall script (if any)\n"
msgstr ""
#: ../lib/install.c:932
#: ../lib/install.c:933
msgid "removing old versions of package\n"
msgstr ""
#. this would probably be a good place to check if disk space
#. was used up - if so, we should return a different error
#: ../lib/install.c:1023
#: ../lib/install.c:1024
#, c-format
msgid "unpacking of archive failed on file %s: %d: %s"
msgstr ""
#: ../lib/install.c:1062
#: ../lib/install.c:1063
#, c-format
msgid "package %s-%s-%s is already installed"
msgstr ""
#: ../lib/install.c:1110
#: ../lib/install.c:1111
#, c-format
msgid "%s skipped due to missingok flag\n"
msgstr ""
#: ../lib/install.c:1128
#: ../lib/install.c:1129
msgid "\tfile type on disk is different then package - saving\n"
msgstr ""
#: ../lib/install.c:1131
#: ../lib/install.c:1132
msgid ""
"\tfile type in database is different then disk and package file - saving\n"
msgstr ""
#: ../lib/install.c:1135
#: ../lib/install.c:1136
msgid "\tfile type changed - replacing\n"
msgstr ""
#: ../lib/install.c:1139
#: ../lib/install.c:1140
msgid "\tcan't check file for changes - replacing\n"
msgstr ""
#. assume the file has been removed, don't freak
#: ../lib/install.c:1151 ../lib/install.c:1161
#: ../lib/install.c:1152 ../lib/install.c:1162
msgid "\tfile not present - creating"
msgstr ""
#. this config file has never been modified, so
#. just replace it
#: ../lib/install.c:1174
#: ../lib/install.c:1175
msgid "\told == current, replacing with new version\n"
msgstr ""
#. this file is the same in all versions of this package
#: ../lib/install.c:1181
#: ../lib/install.c:1182
msgid "\told == new, keeping\n"
msgstr ""
@ -2406,78 +2407,78 @@ msgstr ""
#. the ones in the two packages are different. It would
#. be nice if RPM was smart enough to at least try and
#. merge the difference ala CVS, but...
#: ../lib/install.c:1189
#: ../lib/install.c:1190
msgid "\tfiles changed too much - backing up\n"
msgstr ""
#: ../lib/install.c:1251 ../lib/rpmdb.c:309 ../lib/uninstall.c:118
#: ../lib/install.c:1252 ../lib/rpmdb.c:309 ../lib/uninstall.c:118
#: ../lib/uninstall.c:218
#, c-format
msgid "cannot read header at %d for uninstall"
msgstr ""
#: ../lib/install.c:1264 ../lib/uninstall.c:131
#: ../lib/install.c:1265 ../lib/uninstall.c:131
#, c-format
msgid "package %s-%s-%s contain shared files\n"
msgstr ""
#: ../lib/install.c:1269 ../lib/uninstall.c:136
#: ../lib/install.c:1270 ../lib/uninstall.c:136
#, c-format
msgid "package %s contains no files"
msgstr ""
#: ../lib/install.c:1291 ../lib/uninstall.c:159
#: ../lib/install.c:1292 ../lib/uninstall.c:159
#, c-format
msgid "file %s is shared\n"
msgstr ""
#: ../lib/install.c:1307
#: ../lib/install.c:1308
msgid "\told version already replaced\n"
msgstr ""
#: ../lib/install.c:1310
#: ../lib/install.c:1311
msgid "\tother version never installed\n"
msgstr ""
#: ../lib/install.c:1318
#: ../lib/install.c:1319
#, c-format
msgid "%s conflicts with file from %s-%s-%s"
msgstr ""
#: ../lib/install.c:1337
#: ../lib/install.c:1338
#, c-format
msgid "%s from %s-%s-%s will be replaced\n"
msgstr ""
#: ../lib/install.c:1401
#: ../lib/install.c:1402
msgid "installing a source package\n"
msgstr ""
#: ../lib/install.c:1417 ../lib/install.c:1422
#: ../lib/install.c:1418 ../lib/install.c:1423
#, c-format
msgid "cannot write to %s"
msgstr ""
#: ../lib/install.c:1426
#: ../lib/install.c:1427
#, c-format
msgid "sources in: %s\n"
msgstr ""
#: ../lib/install.c:1427
#: ../lib/install.c:1428
#, c-format
msgid "spec file in: %s\n"
msgstr ""
#: ../lib/install.c:1460 ../lib/install.c:1499
#: ../lib/install.c:1461 ../lib/install.c:1500
msgid "source package contains no .spec file"
msgstr ""
#: ../lib/install.c:1519
#: ../lib/install.c:1520
#, c-format
msgid "renaming %s to %s\n"
msgstr ""
#: ../lib/install.c:1635
#: ../lib/install.c:1636
#, c-format
msgid "package %s-%s-%s (which is newer) is already installed"
msgstr ""
@ -3097,59 +3098,59 @@ msgstr ""
msgid "removing database entry\n"
msgstr ""
#: ../lib/uninstall.c:511
#: ../lib/uninstall.c:512
msgid "execution of script failed"
msgstr ""
#: ../lib/uninstall.c:556
#: ../lib/uninstall.c:557
#, c-format
msgid "%s has already been replaced\n"
msgstr ""
#. if it's a config file, we may not want to remove it
#: ../lib/uninstall.c:563
#: ../lib/uninstall.c:564
#, c-format
msgid "finding md5sum of %s\n"
msgstr ""
#: ../lib/uninstall.c:572
#: ../lib/uninstall.c:573
msgid " failed - assuming file removed\n"
msgstr ""
#: ../lib/uninstall.c:575
#: ../lib/uninstall.c:576
msgid " file changed - will save\n"
msgstr ""
#: ../lib/uninstall.c:579
#: ../lib/uninstall.c:580
msgid " file unchanged - will remove\n"
msgstr ""
#: ../lib/uninstall.c:587
#: ../lib/uninstall.c:588
#, c-format
msgid "keeping %s\n"
msgstr ""
#: ../lib/uninstall.c:591
#: ../lib/uninstall.c:592
#, c-format
msgid "saving %s as %s.rpmsave\n"
msgstr ""
#: ../lib/uninstall.c:605
#: ../lib/uninstall.c:606
#, c-format
msgid "%s - removing\n"
msgstr ""
#: ../lib/uninstall.c:611
#: ../lib/uninstall.c:612
#, c-format
msgid "cannot remove %s - directory not empty"
msgstr ""
#: ../lib/uninstall.c:614
#: ../lib/uninstall.c:615
#, c-format
msgid "rmdir of %s failed: %s"
msgstr ""
#: ../lib/uninstall.c:624
#: ../lib/uninstall.c:625
#, c-format
msgid "removal of %s failed: %s"
msgstr ""

View File

@ -2,7 +2,7 @@ Summary: Red Hat Package Manager
Name: rpm
%define version 2.90
Version: %{version}
Release: 1
Release: 2
Group: Utilities/System
Source: ftp://ftp.rpm.org/pub/rpm/dist/rpm-2.5.x/rpm-%{version}.tar.gz
Copyright: GPL

View File

@ -61,7 +61,7 @@ int main(int argc, char **argv)
rc = EXIT_SUCCESS;
}
gzdClose(gzdi);
gzdClose(gzdi); /* XXX gzdi == fdi */
return rc;
}