Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 152856 - Let env-update run mkdb commands on FreeBSD/DFly
Summary: Let env-update run mkdb commands on FreeBSD/DFly
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Core (show other bugs)
Hardware: All FreeBSD
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-26 01:32 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2006-10-26 04:46 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
portage-mkdb-env.patch (portage-mkdb-env.patch,845 bytes, patch)
2006-10-26 01:33 UTC, Diego Elio Pettenò (RETIRED)
Details | Diff
pkg_postinst method (x.txt,302 bytes, text/plain)
2006-10-26 01:57 UTC, Roy Marples (RETIRED)
Details
pkg_postinst method (x.txt,311 bytes, text/plain)
2006-10-26 02:53 UTC, Roy Marples (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-26 01:32:48 UTC
As per summary, the attached patch makes env-update actually update the password and capability databases needed on FreeBSD. Although running those commands is not technically needed every time env-update is called, it's probably simpler to always run them for safety, so that users still only need env-update if they changed settings like login.conf.

This is needed to get the stage correctly building with catalyst and latest baselayout by the way :)

Thanks,
Diego
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-26 01:33:43 UTC
Created attachment 100513 [details, diff]
portage-mkdb-env.patch
Comment 2 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-26 01:38:13 UTC
Uhm maybe this is not really needed, Roy what you think, this implementation works, but might be overkill, as nobody should change master.passwd by hand anyway...
Comment 3 Zac Medico gentoo-dev 2006-10-26 01:41:25 UTC
If you do decide that this is needed, can we make those commands ${ROOT} friendly?  The relevant variable in that scope is target_root.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-10-26 01:43:33 UTC
Err okay remind me not to send patches without having my coffee first. I did put %s for adding target_root and forgot about it -_-
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-10-26 01:57:04 UTC
Created attachment 100516 [details]
pkg_postinst method

IMO that's overkill.

What is needed is that we only run pwd_mkdb and cap_mkdb when we need to.
For Linux, baselayout installs /etc/passwd and the shadow ebuild runs grpconv if a file is missing, so we can take the same approach here.

Attached is a pkg_postinst() snippet for the freebsd-usbin ebuild - as that is the ebuild that installs pwd_mkdb and cap_mkdb.
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-10-26 02:53:55 UTC
Created attachment 100519 [details]
pkg_postinst method

Better in respect to ${ROOT}
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-10-26 04:08:46 UTC
bsd team will change our ebuilds for this.
Comment 8 Roy Marples (RETIRED) gentoo-dev 2006-10-26 04:46:55 UTC
Fixored