Summary: | dev-lang/ocaml - ocaml-rebuild.sh script should use portage API instead of messing with VDB directly | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jakub Moc (RETIRED) <jakub> |
Component: | Current packages | Assignee: | Gentoo Team for the ML programming language family <ml> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | fauli |
Priority: | High | ||
Version: | 2007.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
ocaml-rebuild.sh
Some clean up without messing too much around |
Description
Jakub Moc (RETIRED)
2008-02-05 12:28:09 UTC
Created attachment 142729 [details]
ocaml-rebuild.sh
A quick rewrite... play with this. :)
$ time dash ocaml-rebuild2.sh [...] real 10m39.998s user 8m45.153s sys 0m47.599s $ time dash /usr/sbin/ocaml-rebuild.sh [...] real 0m38.953s user 0m5.736s sys 0m0.468s is that really something we want to move to ?!? Created attachment 155605 [details]
Some clean up without messing too much around
I got an error in line 38 of the old script anyway, so I cleaned up the script at least. Even fixed some typos.
(In reply to comment #3) > Created an attachment (id=155605) [edit] > Some clean up without messing too much around > > I got an error in line 38 of the old script anyway, so I cleaned up the script > at least. Even fixed some typos. > hmm yeah that's the slot stuff I had been poked about. I was thinking about simplifying the stuff here, but first the story: - the script removes & reinstalls ocaml packages - it used to do =cat/pkg-version, which fails if the package has been removed since it was installed - it was then changed to >=cat/pkg-version - then it didnt reinstall slotted packages So what I'm thinking about is something: emerge >=cat/pkg-version:slot that'll remove the slot hack and should fix your syntax error. About the change from `` to $(), I'd prefer the former as it seems `` is supported by more shells (even if we force bash for now, and even if $() is "nicer") (In reply to comment #4) > hmm yeah that's the slot stuff I had been poked about. > I was thinking about simplifying the stuff here, but first the story: > - the script removes & reinstalls ocaml packages > - it used to do =cat/pkg-version, which fails if the package has been removed > since it was installed > - it was then changed to >=cat/pkg-version > - then it didnt reinstall slotted packages Just by the way, there exist qatom which can do the atom extraction for you. > So what I'm thinking about is something: > emerge >=cat/pkg-version:slot > > that'll remove the slot hack and should fix your syntax error. I am fine with it. > About the change from `` to $(), I'd prefer the former as it seems `` is > supported by more shells (even if we force bash for now, and even if $() is > "nicer") That makes me sad. :) well, now ocaml-3.12.0-r1 installs a portage set file to replace ocaml-rebuild.sh; emerge @ocaml-rebuild ->fixed |