Tried again to not backup config files on netshared path

CVS patchset: 1687
CVS date: 1997/06/16 18:13:23
This commit is contained in:
ewt 1997-06-16 18:13:23 +00:00
parent 835e5f5f2d
commit 0a236450d7
2 changed files with 11 additions and 4 deletions

View File

@ -7,6 +7,9 @@
- used pclose() instead of fclose() in -t code
- updated man pages
- changed "struct rpmdb" to "struct rpmdb_s" for C++
- netsharedpath entries shouldn't match partial directory names
anymore (a nersharedpath of /usr/lib shouldn't affect /usr/libexec)
- don't backup config files on netsharedpaths (take 2)
2.4 -> 2.4.1:
- take advantage of lchown() if it's available

View File

@ -208,7 +208,7 @@ int rpmInstallPackage(char * rootdir, rpmdb db, int fd, char * location,
struct fileInfo * files;
int_32 installTime;
char * fileStates;
int i;
int i, j;
int installFile = 0;
int otherOffset = 0;
char * ext = NULL, * newpath;
@ -390,9 +390,13 @@ int rpmInstallPackage(char * rootdir, rpmdb db, int fd, char * location,
/* netsharedPaths are not relative to the current root (though
they do need to take the package prefix into account */
for (nsp = netsharedPaths; nsp && *nsp; nsp++)
if (!strncmp(files[i].relativePath, *nsp, strlen(*nsp)))
for (nsp = netsharedPaths; nsp && *nsp; nsp++) {
j = strlen(*nsp);
if (!strncmp(files[i].relativePath, *nsp, j) &&
(files[i].relativePath[j] == '\0' ||
files[i].relativePath[j] == '/'))
break;
}
if (nsp && *nsp) {
rpmMessage(RPMMESS_DEBUG, "file %s in netshared path\n",
@ -853,7 +857,7 @@ static int instHandleSharedFiles(rpmdb db, int ignoreOffset,
for (i = 0; i < sharedCount; i++) {
/* if a file isn't going to be installed it doesn't matter who
it's shared with */
if (!files[sharedList[i].mainFileNumber].install) continue;
if (!files[sharedList[i].mainFileNumber].action == SKIP) continue;
if (secOffset != sharedList[i].secRecOffset) {
if (secOffset) {