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

Re: Avoiding uuagc-bootstrap

Hi Joachim,

On 06-04-12 13:52, Joachim Breitner wrote:
when upgradeing uuagc for Debian, I’d like to avoid packaging
uuagc-bootstrap, as it is just a copy of uuagc (right?). Given that
uuagc already exists in Debian, can a new uuagc packages build using
that? If so, how?

Let me first say that the package dependencies of uuagc are rather nasty, and that I would be open to suggestions for improvement. The current setup is the best we managed to come up with so far.

The 'uuagc-bootstrap' package is indeed some 'stable' copy of the original package, except that it contains the generated sources instead of the original sources, has a different executable name and a different entry-point when used as a library. The last two points are important to prevent collisions when building the actual uuagc package.

The current setup allows us to express via cabal that the bootstrap compiler must be present before building uuagc, and can be accessed by the cabal plugin. Several users had problems before with not having uuagc in $PATH.

So, if you want to use an existing uuagc to build uuagc, it's still possible with a slight patch. First, the dependency on the bootstrap package must be removed from the cabal description, but do not add a dependency to an older uuagc to the cabal description! You'll need an existing uuagc somewhere, but that you should be able to express via Debian's package manager.

You can then simply put in UUAGC's Main.hs:
main = defaultMainWithHooks (uuagcUserHook' "path-to-old-uuagc")

Note: you'll get a deprecation warning because - as mentioned earlier - the preferred method is building via uuagc-as-a-library instead of using a given executable. Anyway, you can ignore this warning.

However, I'm not sure what you would gain by doing this. The uuagc-bootstrap package is a conventional haskell package, so it should be easier to handle than fiddling around with an older version of uuagc.

The documentation in Distribution.Simple.UUAGC seems to be outdated,
but I cannot pass uuagc to uuagcLibUserHook.

uuagc :: BuildInfo ->  LocalBuildInfo ->  PreProcessorSource

uuagcLibUserHook :: ([String] ->  FilePath ->  IO (ExitCode,
[FilePath])) ->  UserHooksSource Main hook, argument should be uuagc

This comment refers to "uuagc" as exported by the uuagc package, which is an entry point to uuagc as a library. The 'uuagc' function exported by the cabal plugin package is something else. We might not even need to export that one.


Reply to: