Blame rpm-4.12.0-payload-ghost.patch
|
Panu Matilainen |
3feadd |
diff --git a/lib/rpmarchive.h b/lib/rpmarchive.h
|
|
Panu Matilainen |
3feadd |
index fab2d58..85079ca 100644
|
|
Panu Matilainen |
3feadd |
--- a/lib/rpmarchive.h
|
|
Panu Matilainen |
3feadd |
+++ b/lib/rpmarchive.h
|
|
Panu Matilainen |
3feadd |
@@ -23,6 +23,7 @@ enum rpmfilesErrorCodes {
|
|
Panu Matilainen |
3feadd |
RPMERR_ENOENT = -10,
|
|
Panu Matilainen |
3feadd |
RPMERR_ENOTEMPTY = -11,
|
|
Panu Matilainen |
3feadd |
RPMERR_FILE_SIZE = -12,
|
|
Panu Matilainen |
3feadd |
+ RPMERR_ITER_SKIP = -13,
|
|
Panu Matilainen |
3feadd |
|
|
Panu Matilainen |
3feadd |
RPMERR_OPEN_FAILED = -32768,
|
|
Panu Matilainen |
3feadd |
RPMERR_CHMOD_FAILED = -32769,
|
|
Panu Matilainen |
3feadd |
diff --git a/lib/rpmfi.c b/lib/rpmfi.c
|
|
Panu Matilainen |
3feadd |
index 384a6c9..2fba707 100644
|
|
Panu Matilainen |
3feadd |
--- a/lib/rpmfi.c
|
|
Panu Matilainen |
3feadd |
+++ b/lib/rpmfi.c
|
|
Panu Matilainen |
3feadd |
@@ -821,7 +821,10 @@ int rpmfiNext(rpmfi fi)
|
|
Panu Matilainen |
3feadd |
{
|
|
Panu Matilainen |
3feadd |
int next = -1;
|
|
Panu Matilainen |
3feadd |
if (fi != NULL) {
|
|
Panu Matilainen |
3feadd |
- next = fi->next(fi);
|
|
Panu Matilainen |
3feadd |
+ do {
|
|
Panu Matilainen |
3feadd |
+ next = fi->next(fi);
|
|
Panu Matilainen |
3feadd |
+ } while (next == RPMERR_ITER_SKIP);
|
|
Panu Matilainen |
3feadd |
+
|
|
Panu Matilainen |
3feadd |
if (next >= 0 && next < rpmfilesFC(fi->files)) {
|
|
Panu Matilainen |
3feadd |
fi->i = next;
|
|
Panu Matilainen |
3feadd |
fi->j = rpmfilesDI(fi->files, fi->i);
|
|
Panu Matilainen |
3feadd |
@@ -1942,6 +1945,10 @@ static int iterReadArchiveNext(rpmfi fi)
|
|
Panu Matilainen |
3feadd |
rpm_loff_t fsize = 0;
|
|
Panu Matilainen |
3feadd |
rpm_mode_t mode = rpmfilesFMode(fi->files, fx);
|
|
Panu Matilainen |
3feadd |
|
|
Panu Matilainen |
3feadd |
+ /* %ghost in payload, should not be there but rpm < 4.11 sometimes did this */
|
|
Panu Matilainen |
3feadd |
+ if (rpmfilesFFlags(fi->files, fx) & RPMFILE_GHOST)
|
|
Panu Matilainen |
3feadd |
+ return RPMERR_ITER_SKIP;
|
|
Panu Matilainen |
3feadd |
+
|
|
Panu Matilainen |
3feadd |
if (S_ISREG(mode)) {
|
|
Panu Matilainen |
3feadd |
const int * links;
|
|
Panu Matilainen |
3feadd |
uint32_t numlinks = rpmfilesFLinks(fi->files, fx, &links);
|