Am 31.08.2012 18:20:32 schrieb(en) Virgile Prevosto:
Hello,
I'm starting to play with skylift, and I have a small question
regarding the sorting function for patch files in build/mk/bsd.pkg.mk.
Namely,
patch_sort() {
$SED -e '/^.*-\*/ d' |
$SED -e 's/^\(.*\)-\([^-]*\)$/\1-\2 \2/' |
LC_ALL=C $SORT -k 2 |
$SED -e 's/^\([^ ]\+\) .*$/\1/'
}
will sort against what follows the last - in the filenames. This seems
at odds with what is written in godi's user manual, that says that
the file names of patches have the convention
patch-<letter><letter>-<info>
Hi,
yep, it seems you are right here.
Shouldn't the regexp in the second line of patch sort be something
like:
$SED -e 's/^\([^-]*\)-\(.*\)$/\1-\2 \2/' |
Hmmm, this is also not fully correct, because the function gets full
paths as input, and the prefix path of the path could also contain
hyphens. It is more something like
$SED -e 's/^\(.*/[^/-]*\)-\([^/]*\)$/\1-\2 \2/'
but this needs to be tested.
Thanks for your sharp eyes.
Gerd
? This would allow to have something other than patch as a prefix
while retaining compatibility with the current convention.
Best regards,
--
E tutto per oggi, a la prossima volta
Virgile
_______________________________________________
Godi-list mailing list
Godi-list@ocaml-programming.de
https://godirepo.camlcity.org/mailman/listinfo/godi-list
--
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany g...@gerd-stolpmann.de
Creator of GODI and camlcity.org.
Contact details: http://www.camlcity.org/contact.html
Company homepage: http://www.gerd-stolpmann.de
------------------------------------------------------------
_______________________________________________
Godi-list mailing list
Godi-list@ocaml-programming.de
https://godirepo.camlcity.org/mailman/listinfo/godi-list