Hi there,

I was trying to help someone with some pre-publication manifest changes, allowing us to selectively set file modes depending on the package name.

It's looking like %{pkg.fmri} or pkg.manifest.filename can't be used in the matching criteria of pkgmogrify rules. Is this intentional, or just an aspect of pkgmogrify-judo I haven't fully mastered yet?

I'm doing this so that we can set a default permissions for files from a given set of packages (and only those packages, for now) I was trying:

<transform pkg %{pkg.fmri}=pkg:/install/.*$ -> default pkg.tmp.install_modes true> <transform pkg %{pkg.fmri}=pkg:/system/install/.*$ -> default pkg.tmp.install_modes true> <transform file pkg.tmp.install_modes=true path=$(PYDIRVP)/.*\.(py|pyc) -> default mode 0444>
<transform file pkg.tmp.install_modes=.* -> delete pkg.tmp.install_modes .*>

but it doesn't look like we can match on %{pkg.fmri} The workaround I'm suggesting is a bit gruesome, involving two pkg.tmp attributes, the first only being added so that we can then match on its value:

<transform file path=$(PYDIRVP)/.*\.py$ -> default pkg.tmp.match_fmri %{pkg.fmri}> <transform file pkg.tmp.match_fmri=pkg:/install/.*$ -> default pkg.tmp.install_modes true> <transform file pkg.tmp.match_fmri=pkg:/system/install/.*$ -> default pkg.tmp.install_modes true> <transform file pkg.tmp.install_modes=true path=$(PYDIRVP)/.*\.(py|pyc) -> default mode 0444>
<transform file pkg.tmp.install_modes=.* -> delete pkg.tmp.install_modes .*>
<transform file pkg.tmp.match_fmri=.* -> delete pkg.tmp.match_fmri .*>


Is there a better way to do this?

        cheers,
                        tim
_______________________________________________
pkg-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/pkg-discuss

Reply via email to