summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2010-12-16 09:35:08 +0200
committerPanu Matilainen <pmatilai@redhat.com>2010-12-21 11:49:43 +0200
commit56f64bb012b87143d6b28d22198be65b84afbaa6 (patch)
tree55d414109b3c712d42871f921af40f14566f5ddb
parent180510e4f5c4dddcbc5c041e3db455f04ce22d3e (diff)
downloadrpm-56f64bb012b87143d6b28d22198be65b84afbaa6.tar.gz
rpm-56f64bb012b87143d6b28d22198be65b84afbaa6.tar.bz2
rpm-56f64bb012b87143d6b28d22198be65b84afbaa6.zip
Unbreak file user/groupname handling in build
- Fixes regression from commit a2d002a34bc567e8ce88c9ed30270d55d7c904fd, the librpmbuild "name cache" was used for unique string storage too and not just user/group-info lookup cache, duh. - At least for now, making this separation explicit in the code by separating the "stash this string" operation from the actual user/group lookups. (cherry picked from commit 50ab0945c5ddffd354692f8c31616c3575ebbd11)
-rw-r--r--build/files.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/build/files.c b/build/files.c
index 276257818..71cc5901f 100644
--- a/build/files.c
+++ b/build/files.c
@@ -1463,8 +1463,8 @@ static rpmRC addFile(FileList fl, const char * diskPath,
flp->cpioPath = xstrdup(cpioPath);
flp->diskPath = xstrdup(diskPath);
- flp->uname = fileUname;
- flp->gname = fileGname;
+ flp->uname = rpmugStashStr(fileUname);
+ flp->gname = rpmugStashStr(fileGname);
if (fl->currentLangs && fl->nLangs > 0) {
char * ncl;
@@ -2028,14 +2028,14 @@ rpmRC processSourceFiles(rpmSpec spec, rpmBuildPkgFlags pkgFlags)
flp->fl_mode |= fl.def_ar.ar_fmode;
}
if (fl.def_ar.ar_user) {
- flp->uname = fl.def_ar.ar_user;
+ flp->uname = rpmugStashStr(fl.def_ar.ar_user);
} else {
- flp->uname = rpmugUname(flp->fl_uid);
+ flp->uname = rpmugStashStr(rpmugUname(flp->fl_uid));
}
if (fl.def_ar.ar_group) {
- flp->gname = fl.def_ar.ar_group;
+ flp->gname = rpmugStashStr(fl.def_ar.ar_group);
} else {
- flp->gname = rpmugGname(flp->fl_gid);
+ flp->gname = rpmugStashStr(rpmugGname(flp->fl_gid));
}
flp->langs = xstrdup("");