Hello,
I'm trying to invent a oneliner for installing a specific package. The
problem is, the destination file is a redirect file forwarding a request
to a target package. The result is:
# pkg_add -vvvvv
http://10bees-agent.s3-website-us-east-1.amazonaws.com/openbsd/agent.tgz
parsing agent
Package name is not consistent ???
Error from
http://10bees-agent.s3-website-us-east-1.amazonaws.com/openbsd/agent.tgz
Redirected to
http://10bees-agent.s3-website-us-east-1.amazonaws.com/openbsd/10bees-1.1.55.20.tgz
ftp: Writing -: Broken pipe
--- 10bees-1.1.55.20 -------------------
Can't install 10bees-1.1.55.20: bad package
The idea behind that is that 'agent.tgz' will always point to the latest
version, so there is no need for users to keep track of the versions.
This pattern works on all other platforms so I'd like to keep that
approach on OpenBSD too, if possible.
Anyways, "Package name is not consistent ???" suggests that the problem
is that 'agent.tgz' doesn't follow packages-specs(7). But pkg_add
continues with the install and is failing on ftp - or so it would appear.
So far I figured tow solutions:
- change 'agent.tgz' to match packages-specs(7), didn't check that and
would like to avoid that,
- give users a longer command, like "ftp http://${REDIRECT} && pkg_add
${PACKAGE}", but that doesn't look too good.
Is there a better way than the second option? I cannot rely on replacing
${FETCH_CMD} as this needs to run on out-of-the-box OpenBSD.
Best regards,
ML