From: Panu Matilainen Date: Thu, 16 Dec 2010 07:35:08 +0000 (+0200) Subject: Unbreak file user/groupname handling in build X-Git-Tag: tznext/4.11.0.1.tizen20130304~1366 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=50ab0945c5ddffd354692f8c31616c3575ebbd11;p=tools%2Flibrpm-tizen.git 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. --- 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("");