W dniu 21.03.2011 00:48, uki pisze:
Hi,
I found a strange behaviour in prt-get, I suppose this might be a bug.
In my Pkgfile I have:
[...]
TIP=`cd $REPO && hg tip | grep changeset | cut -d ':' -f2 | sed -e 's/ //g'`
version=rev-${TIP}
[...]
prt-get builds the package properly:
=======> Building
'/home/pkgmk/packages/uki-awesome#rev-6738-1.pkg.tar.gz' succeeded.
but than when it tries to install it:
prt-get: installing uki-awesome rev-${TIP}-1
pkgadd: could not open uki-awesome#rev--1.pkg.tar.gz: No such file or
directory
Is this a bug? And if not - how can I fix my Pkgfile?
From what I saw in sources, the reason is that prt-get is not really a
shell script, and during installation phase it looks into Pkgfile itself
- caring /only/ for version= - thus other lines are not shell expanded
or cared at all. To be precise, peek into package.cpp:
expandShellCommands(m_data->version, timeNow, unameBuf);
is the "culprit" here (quotes intended, actually we're are the culprits
Just use pkg{mk,add,rm} for Pkgfiles bent towards versioning systems (I
do analogous stuff for git). Or, make sure everything needed for shell
expansion is in version=, e.g.
version=rev-$(stuff you had in TIP, without dependency on other shell lines)
_______________________________________________
CRUX mailing list
CRUX@lists.crux.nu
http://lists.crux.nu/mailman/listinfo/crux