summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2012-01-17 12:50:51 +0200
committerPanu Matilainen <pmatilai@redhat.com>2012-01-17 12:50:51 +0200
commitac4a011be50ddfa5996be0b946cb78fa53ba0a8b (patch)
treefeca63969ebac7acafd6b514b1d9354c2a6e57e2
parent7bd0ee76691d18887facdcfc1ca164304a83621f (diff)
downloadlibrpm-tizen-ac4a011be50ddfa5996be0b946cb78fa53ba0a8b.tar.gz
librpm-tizen-ac4a011be50ddfa5996be0b946cb78fa53ba0a8b.tar.bz2
librpm-tizen-ac4a011be50ddfa5996be0b946cb78fa53ba0a8b.zip
Kill off yet more repackage remnants from fsm
- CPIO_ALL_HARDLINKS flag and related code has been unused and dead since rpm >= 4.6.x
-rw-r--r--lib/fsm.c28
-rw-r--r--lib/fsm.h1
2 files changed, 3 insertions, 26 deletions
diff --git a/lib/fsm.c b/lib/fsm.c
index 6506b2915..bcf1434b4 100644
--- a/lib/fsm.c
+++ b/lib/fsm.c
@@ -1751,8 +1751,7 @@ static int fsmStage(FSM_t fsm, fileStage stage)
}
/* Flush partial sets of hard linked files. */
- if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS))
- rc = writeLinks(fsm);
+ rc = writeLinks(fsm);
if (!rc)
rc = cpioTrailerWrite(fsm);
@@ -1768,24 +1767,8 @@ static int fsmStage(FSM_t fsm, fileStage stage)
if (fsm->goal == FSM_PKGBUILD) {
if (fsm->fflags & RPMFILE_GHOST) /* XXX Don't if %ghost file. */
break;
- if (S_ISREG(st->st_mode) && st->st_nlink > 1) {
- hardLink_t li, prev;
-
-if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
- rc = writeLinkedFile(fsm);
- if (rc) break; /* W2DO? */
-
- for (li = fsm->links, prev = NULL; li; prev = li, li = li->next)
- if (li == fsm->li)
- break;
-
- if (prev == NULL)
- fsm->links = fsm->li->next;
- else
- prev->next = fsm->li->next;
- fsm->li->next = NULL;
- fsm->li = freeHardLink(fsm->li);
- } else {
+ /* Hardlinks are handled later */
+ if (!(S_ISREG(st->st_mode) && st->st_nlink > 1)) {
rc = writeFile(fsm, 1);
}
break;
@@ -2040,11 +2023,6 @@ if (!(fsm->mapFlags & CPIO_ALL_HARDLINKS)) break;
break;
}
}
- if (fsm->goal == FSM_PKGBUILD &&
- (fsm->mapFlags & CPIO_ALL_HARDLINKS))
- {
- rc = CPIOERR_MISSING_HARDLINK;
- }
fsm->li = freeHardLink(fsm->li);
}
fsm->rdbuf = fsm->rdb = _free(fsm->rdb);
diff --git a/lib/fsm.h b/lib/fsm.h
index f44840c82..c25b7c5e8 100644
--- a/lib/fsm.h
+++ b/lib/fsm.h
@@ -89,7 +89,6 @@ enum cpioMapFlags_e {
CPIO_FOLLOW_SYMLINKS= (1 << 4), /*!< only for building. */
CPIO_MAP_ABSOLUTE = (1 << 5),
CPIO_MAP_ADDDOT = (1 << 6),
- CPIO_ALL_HARDLINKS = (1 << 7), /*!< fail if hardlinks are missing. */
CPIO_MAP_TYPE = (1 << 8), /*!< only for building. */
CPIO_SBIT_CHECK = (1 << 9)
};