- fully reset file actions between rpmtsRun() calls (#1076552)
This commit is contained in:
		
							parent
							
								
									98f66a8089
								
							
						
					
					
						commit
						600ff28b8e
					
				
							
								
								
									
										58
									
								
								rpm-4.11.x-reset-fileactions.patch
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								rpm-4.11.x-reset-fileactions.patch
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | |||||||
|  | diff --git a/lib/rpmfs.c b/lib/rpmfs.c
 | ||||||
|  | index 764618d..916f6eb 100644
 | ||||||
|  | --- a/lib/rpmfs.c
 | ||||||
|  | +++ b/lib/rpmfs.c
 | ||||||
|  | @@ -18,7 +18,7 @@ rpmfs rpmfsNew(rpm_count_t fc, int initState)
 | ||||||
|  |      rpmfs fs = xcalloc(1, sizeof(*fs)); | ||||||
|  |      fs->fc = fc; | ||||||
|  |      fs->actions = xmalloc(fs->fc * sizeof(*fs->actions)); | ||||||
|  | -    memset(fs->actions, FA_UNKNOWN, fs->fc * sizeof(*fs->actions));
 | ||||||
|  | +    rpmfsResetActions(fs);
 | ||||||
|  |      if (initState) { | ||||||
|  |  	fs->states = xmalloc(sizeof(*fs->states) * fs->fc); | ||||||
|  |  	memset(fs->states, RPMFILE_STATE_NORMAL, fs->fc); | ||||||
|  | @@ -115,3 +115,10 @@ void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action)
 | ||||||
|  |  	fs->actions[ix] = action; | ||||||
|  |      } | ||||||
|  |  } | ||||||
|  | +
 | ||||||
|  | +void rpmfsResetActions(rpmfs fs)
 | ||||||
|  | +{
 | ||||||
|  | +    if (fs && fs->actions) {
 | ||||||
|  | +	memset(fs->actions, FA_UNKNOWN, fs->fc * sizeof(*fs->actions));
 | ||||||
|  | +    }
 | ||||||
|  | +}
 | ||||||
|  | diff --git a/lib/rpmfs.h b/lib/rpmfs.h
 | ||||||
|  | index 5f74753..83f99d1 100644
 | ||||||
|  | --- a/lib/rpmfs.h
 | ||||||
|  | +++ b/lib/rpmfs.h
 | ||||||
|  | @@ -57,6 +57,9 @@ rpmFileAction rpmfsGetAction(rpmfs fs, unsigned int ix);
 | ||||||
|  |  RPM_GNUC_INTERNAL | ||||||
|  |  void rpmfsSetAction(rpmfs fs, unsigned int ix, rpmFileAction action); | ||||||
|  |   | ||||||
|  | +RPM_GNUC_INTERNAL
 | ||||||
|  | +void rpmfsResetActions(rpmfs fs);
 | ||||||
|  | +
 | ||||||
|  |  #ifdef __cplusplus | ||||||
|  |  } | ||||||
|  |  #endif | ||||||
|  | diff --git a/lib/transaction.c b/lib/transaction.c
 | ||||||
|  | index 02badc6..09c199a 100644
 | ||||||
|  | --- a/lib/transaction.c
 | ||||||
|  | +++ b/lib/transaction.c
 | ||||||
|  | @@ -1323,11 +1323,14 @@ static int rpmtsPrepare(rpmts ts)
 | ||||||
|  |   | ||||||
|  |      rpmlog(RPMLOG_DEBUG, "computing %" PRIu64 " file fingerprints\n", fileCount); | ||||||
|  |   | ||||||
|  | -    /* Skip netshared paths, not our i18n files, and excluded docs */
 | ||||||
|  | +    /* Reset actions, set skip for netshared paths and excluded files */
 | ||||||
|  |      pi = rpmtsiInit(ts); | ||||||
|  |      while ((p = rpmtsiNext(pi, 0)) != NULL) { | ||||||
|  |  	if (rpmfiFC(rpmteFI(p)) == 0) | ||||||
|  |  	    continue; | ||||||
|  | +	/* Ensure clean state, this could get called more than once. */
 | ||||||
|  | +	rpmfs fs = rpmteGetFileStates(p);
 | ||||||
|  | +	rpmfsResetActions(fs);
 | ||||||
|  |  	if (rpmteType(p) == TR_ADDED) { | ||||||
|  |  	    skipInstallFiles(ts, p); | ||||||
|  |  	} else { | ||||||
							
								
								
									
										3
									
								
								rpm.spec
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								rpm.spec
									
									
									
									
									
								
							| @ -57,6 +57,7 @@ Patch10: rpm-4.11.2-double-separator-warning.patch | |||||||
| Patch100: rpm-4.11.x-filter-soname-deps.patch | Patch100: rpm-4.11.x-filter-soname-deps.patch | ||||||
| Patch101: rpm-4.11.x-do-not-filter-ld64.patch | Patch101: rpm-4.11.x-do-not-filter-ld64.patch | ||||||
| Patch102: rpm-4.11.2-macro-newlines.patch | Patch102: rpm-4.11.2-macro-newlines.patch | ||||||
|  | Patch103: rpm-4.11.x-reset-fileactions.patch | ||||||
| 
 | 
 | ||||||
| # These are not yet upstream | # These are not yet upstream | ||||||
| Patch301: rpm-4.6.0-niagara.patch | Patch301: rpm-4.6.0-niagara.patch | ||||||
| @ -263,6 +264,7 @@ packages on a system. | |||||||
| %patch100 -p1 -b .filter-soname-deps | %patch100 -p1 -b .filter-soname-deps | ||||||
| %patch101 -p1 -b .dont-filter-ld64 | %patch101 -p1 -b .dont-filter-ld64 | ||||||
| %patch102 -p1 -b .macro-newlines | %patch102 -p1 -b .macro-newlines | ||||||
|  | %patch103 -p1 -b .reset-fileactions | ||||||
| 
 | 
 | ||||||
| %patch301 -p1 -b .niagara | %patch301 -p1 -b .niagara | ||||||
| %patch302 -p1 -b .geode | %patch302 -p1 -b .geode | ||||||
| @ -523,6 +525,7 @@ exit 0 | |||||||
| %changelog | %changelog | ||||||
| * Wed Mar 26 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-3 | * Wed Mar 26 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-3 | ||||||
| - dont eat newlines on parametrized macro invocations (#1045723) | - dont eat newlines on parametrized macro invocations (#1045723) | ||||||
|  | - fully reset file actions between rpmtsRun() calls (#1076552) | ||||||
| 
 | 
 | ||||||
| * Tue Feb 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-2 | * Tue Feb 18 2014 Panu Matilainen <pmatilai@redhat.com> - 4.11.2-2 | ||||||
| - reduce the double separator spec parse error into a warning (#1065563) | - reduce the double separator spec parse error into a warning (#1065563) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user