From 50ab0945c5ddffd354692f8c31616c3575ebbd11 Mon Sep 17 00:00:00 2001 From: Panu Matilainen Date: Thu, 16 Dec 2010 09:35:08 +0200 Subject: [PATCH] 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. --- build/files.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/build/files.c b/build/files.c index 2762578..71cc590 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(""); -- 2.7.4