From aed337b31d60115102d32c0532a327f0d173d1db Mon Sep 17 00:00:00 2001 From: jbj Date: Mon, 21 May 2001 16:00:45 +0000 Subject: [PATCH] - fix: skip %ghost files when building packages (#38218). CVS patchset: 4801 CVS date: 2001/05/21 16:00:45 --- CHANGES | 1 + lib/fsm.c | 17 +++++++++++------ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES b/CHANGES index 577d842..eab2923 100644 --- a/CHANGES +++ b/CHANGES @@ -60,6 +60,7 @@ - fix: filter duplicate package removals (#35828). - add armv3l arch. - fix: i18n strings need 1 on sucess return code (#41313). + - fix: skip %ghost files when building packages (#38218). 4.0 -> 4.0.[12] - add doxygen and lclint annotations most everywhere. diff --git a/lib/fsm.c b/lib/fsm.c index ef807e5..643091f 100644 --- a/lib/fsm.c +++ b/lib/fsm.c @@ -1312,14 +1312,19 @@ int fsmStage(FSM_t fsm, fileStage stage) if (rc) break; /* Perform lstat/stat for disk file. */ - rc = fsmStage(fsm, (!(fsm->mapFlags & CPIO_FOLLOW_SYMLINKS) + if (fsm->path != NULL) { + rc = fsmStage(fsm, (!(fsm->mapFlags & CPIO_FOLLOW_SYMLINKS) ? FSM_LSTAT : FSM_STAT)); - if (rc == CPIOERR_LSTAT_FAILED && errno == ENOENT) { - errno = saveerrno; - rc = 0; + if (rc == CPIOERR_LSTAT_FAILED && errno == ENOENT) { + errno = saveerrno; + rc = 0; + fsm->exists = 0; + } else if (rc == 0) { + fsm->exists = 1; + } + } else { + /* Skip %ghost files on build. */ fsm->exists = 0; - } else if (rc == 0) { - fsm->exists = 1; } fsm->diskchecked = 1; if (rc) break; -- 2.7.4