Created attachment 319176 [details, diff] patch for rpm-5.3.5.ebuild trivial changes only.
Frankly. I haven't looked at rpm-5.x in a long time. It's a different upstream from rpm-4.x and should probably be moved to a separate package. And if we should unmask it (=app-arch/rpm-5* is hard-masked) we really would have to move it elsewhere so we don't trigger automatic updates for people on rpm-4.x All that said, changes look OK so I applied them. Thanks.
One thing I noticed a bit too late though: "${EROOT}"/usr/bin/rpm --initdb --root="${ROOT}" Shouldn't the second ${ROOT} be ${EROOT} as well?
that depends a lot on what it does with --root=xxxx Frankly, I don't have a clue.
$ rpm --initdb --root /tmp/rpmroot $ ls -lR /tmp/rpmroot /tmp/rpmroot: total 4 drwxr-xr-x. 3 w0rm w0rm 4096 Jul 26 10:55 var /tmp/rpmroot/var: total 4 drwxr-xr-x. 3 w0rm w0rm 4096 Jul 26 10:55 lib /tmp/rpmroot/var/lib: total 4 drwxr-xr-x. 2 w0rm w0rm 4096 Jul 26 10:55 rpm /tmp/rpmroot/var/lib/rpm: total 104 -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Basenames -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Conflictname -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Dirnames -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Group -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Installtid -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Name -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Obsoletename -rw-r--r--. 1 w0rm w0rm 12288 Jul 26 10:55 Packages -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Providename -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Requirename -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Sha1header -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Sigmd5 -rw-r--r--. 1 w0rm w0rm 8192 Jul 26 10:55 Triggername So in other word, --root tells rpm where to create/look for directory structure of database. In any case, if you were able to install prefixed rpm and tried basically any command without errors this should be OK. It's initializing db only when EROOT=="/" so it most probably does not matter much (unless user is overriding ROOT I guess). FYI we moved rpm-5.x to rpm5/rpm-5.x so you can look for it there. Feel free to commit away as well, package is now maintainer-needed (app-arch/rpm )
EROOT == "/" is almost the same as "system is not Prefix". That check is wrong. The question is, if rpm stores it's --prefix argument during compile (if it has one), and uses it when given a --root. I think not, but it could happen. If not, EROOT would be to be used as you pointed out yourself. Let's reopen for the time being, because this seems to be messy.
I had an rpm db in my home on AIX (without gentoo prefix) a long time ago, hence I think nothing speaks against initializing such an db on prefix. So the [[ $EROOT = "/" ]] check should go and the init command should be 'rpm --initdb --root="${EROOT}"'. But what was the reason for having the [[ ${ROOT} == "/" ]] check in gx86 in the first place?
[[ ${ROOT} == "/" ]] is something entirely different, and makes sense in this case, the ROOT -> EROOT conversion doesn't hold for this one
(In reply to comment #7) > [[ ${ROOT} == "/" ]] > > is something entirely different, and makes sense in this case, the ROOT -> > EROOT conversion doesn't hold for this one So $ROOT != / would only be the case if we are not on the live file-system, right? Can that ever happens in prefix?
(In reply to comment #7) > [[ ${ROOT} == "/" ]] > is something entirely different, and makes sense in this case, the ROOT -> > EROOT conversion doesn't hold for this one Would '[[ ${ROOT} == "/" ]] || use prefix' do the job? Are we planning a stage3 for prefix soon?
(In reply to comment #9) > (In reply to comment #7) > > [[ ${ROOT} == "/" ]] > > is something entirely different, and makes sense in this case, the ROOT -> > > EROOT conversion doesn't hold for this one > Would '[[ ${ROOT} == "/" ]] || use prefix' do the job? Are we planning a > stage3 for prefix soon? huh? Just [[ ${ROOT} == "/" ]] is fine.
(In reply to comment #10) > (In reply to comment #9) > > (In reply to comment #7) > > > [[ ${ROOT} == "/" ]] > > > is something entirely different, and makes sense in this case, the ROOT -> > > > EROOT conversion doesn't hold for this one > > Would '[[ ${ROOT} == "/" ]] || use prefix' do the job? Are we planning a > > stage3 for prefix soon? > > Just [[ ${ROOT} == "/" ]] is fine. You are right, I got myself confused. To conclude it should be [[ ${ROOT} == / ]] and initdb --root="${EROOT}", right?
yes (although I didn't check if the initdb thing works correctly when used so)
Test on my amd64-linux and added to the ebuild.