[opensuse-buildservice] Re: [opensuse-packaging] find-lang.sh fails for paths containing colons
On Fri, Apr 19, 2013 at 09:50:00AM +0200, Richard Biener wrote:
On Thu, 18 Apr 2013, Jan Engelhardt wrote:
On Thursday 2013-04-18 20:22, Andrey Borzenkov wrote:
I tried to quickly build package locally and got
bor@opensuse:~/obs/home:arvidjaar:grub2-next/grub2/foo/BUILD/grub-2.00> LC_ALL=C /usr/lib/rpm/find-lang.sh /home/bor/obs/home:arvidjaar:grub2-next/grub2/foo/BUILDROOT/grub2-2.00-0.x86_64 grub2 sed: -e expression #1, char 33: unknown option to `s' sed: -e expression #1, char 33: unknown option to `s'
Well, find-lang.sh is using s:$PATH:: and that of course breaks if path itself contains ':'.
Not sure how common it is, nor how to make it more robust.
It is a lost case, I would say.
which(1) does not interpret "\x3a" or "\072" or "\:" in $PATH either, essentially making it impossible to use : for $PATH, similar to how it is impossible to use spaces for almost any file involved in a Makefile target/dependency, or files with newlines in some user-crafted scripts. (In all these cases, it is an arbitrary limitation of the tools at hand.)
Yeah, I've been bitten by the unfortunate choice of using ':' as sub-project delimiter as well ... maybe someone can teach osc to use a different one, like '-' or '_'?
Or you can use our pck getpac, which creates a structure like old getpac. It's based on mbranch, but can work on factory too. https://gitorious.org/opensuse/pack-tools/ package/distribution/ Alternativelly ~/.oscrc says # alternate filesystem layout: have multiple subdirs, where colons were. #checkout_no_colon = 0 For osc I'd say we should think about to make it as a default for recent osc. We can let people to select crazy delimiters if they want to. I doubt there will be problems for osc itself as it reads .osc/_project .osc/_package, but some tools making an assumptions about paths might be confused, so there should be a compat option for such cases ~/.oscrc # to use a previous colon separated layout project:subproject/ # checkout_delimiter = : or osc co --with-colons for one-time checouts maybe? CCying the opensuse-buildservice to discuss it there. Regards Michal Vyskocil
participants (1)
-
Michal Vyskocil