Re: Bundled Flash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 08/24/2013 03:12 AM, Toshio Kuratomi wrote:
On Fri, Aug 23, 2013 at 02:28:23PM -0700, Adam Williamson wrote:
On Fri, 2013-08-23 at 23:15 +0200, Michael Scherer wrote:

So anyway - I think we need some best practice on this. We definitely
need a 'if you absolutely must change a directory into a symlink (or a
file, or the same operations in the other direction), here's how you do
it' snippet set. If folks could chip in with thoughts on misc's approach
to doing this, that'd be great: Panu, do you see any problems? Know a
better way? I tried the giant-lump-of-lua from
https://bugs.launchpad.net/rpm/+bug/633636/comments/3 , but it throws a
bunch of warnings when cleanup of the *old* package tries to remove all
the files that are now no longer there, which is bad, and misc thinks
it's bad in other ways, I believe. There are various other attempts to
do this kind of operation spread through various packages in Fedora and
out - moodle has some, for instance, xmvn has one, there are others I
think that I don't have to hand right now.

+1 I was going to see if limburgher would push his recipe into an FPC
guideline but it seems that that method no longer works reliably.  it'll be
interesting to hear what Panu says here but I think the FPC could live with
the caveats if it had to.

Well the "classic" way of doing dir <-> symlink replacement is %pretrans -p <lua>, minimally something like the examples in https://lists.fedoraproject.org/pipermail/devel/2013-August/188304.html, eg

%pretrans -p <lua>
st = posix.stat("<path to dir>")
if st and st.type == "directory" then
  os.execute("rm -rf <path to dir>")
end

That "recommendation" has not changed. What has changed in rpm 4.11.x is that

a) Rpm detects attempts to change directory into something else, and attempts to change a directory symlink into a directory as conflicts. b) Rpm now emits warnings on removal of supposedly installed but non-existent files.

The twist with a) is that yum does a test-transaction, in which case %pretrans is not executed so the conflict that would be resolved in a real transaction is present in the supposed-to-be-helpful test-transaction. Because of that, rpm now has a heuristic to ignore those conflicts if the package has a %pretrans script that could resolve the issue. If the heuristic isn't working (in all cases) then it needs revising, I just need exact reproducer case(s).

b) is just a warning and doesn't affect the transaction result. Dunno if its possible to avoid it in this specific case but guess I could have a look.

	- Panu -




--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux