Closed yurivict closed 7 years ago
Looking into this myself. Looks like pourdiere isn't package generation aware.
'list_deps' is where this begins. Changing it to this:
list_deps() {
[ $# -ne 1 ] && eargs list_deps directory
local dir="/usr/ports/$1"
local makeargs="-VPKG_DEPENDS -VBUILD_DEPENDS -VEXTRACT_DEPENDS -VLIB_DEPENDS -VPATCH_DEPENDS -VFETCH_DEPENDS -VRUN_DEPENDS"
prefix_stderr_quick "(${COLOR_PORT}$1${COLOR_RESET})${COLOR_WARN}" \
injail make -C ${dir} $makeargs | \
tr ' ' '\n' | \
sed -E "s,^(py[0-9]+)-(.*)/py-(.*),\1-\2/\1-\3,g" | \
sed -e "s,[[:graph:]]*/usr/ports/,,g" \
-e "s,:[[:graph:]]*,,g" -e '/^$/d' | \
sort -u || err 1 "Makefile broken: $1"
}
makes it compute package names with generations. This will need to be used to strip generation:
pname_strip_generation() {
echo "$1" | sed -E "s,^(py[0-9]+)-,py-,g"
}
Then many functions need to be aware of this, when port directory =/= port name with generation in it.
Ok, this is clearly the bug in poudriere. I have made most of the changes needed to fix this. Will try to make a patch.
Pull request: https://github.com/freebsd/poudriere/pull/314
No, it's not a bug in Poudriere. It's a flawed hack in the ports framework. Any implementation of building these packages needs to be handled mostly in the framework. Putting special logic in Poudriere is not right; Portmaster and Portupgrade are also broken with this framework hack. #259 discusses this as well.
I'm against adding support for this hack into Poudriere. The proper framework support should either use slaves or just bundle multiple versions in each python package or come up with a more longterm solution of having multiple versions/packages per origin. Currently it is too specific and shortsighted.
But framework itself builds them fine currently. Poudriere is the one that fails to handle them.
This is like virtual slave support. It is generic, not only for python, but also for ruby, and for any number of classes.
It was a mistake to add the feature into the framework IMO. Especially without discussing and considering the impact on all of the tools people use.
This is stale, I consider it a bug now and is tracked in #259
For direct context, I backtracked on "it's not a bug in Poudriere" heavily and implemented support for _DEPENDSARGS in #483, as well as FLAVORS.
Port shar is here: http://pastebin.com/c98Jn1XX
It does rebuild and extract python34 fine:
but it fails to rebuild required py34-* modules:
It looks like poudriere rebuilds py27- dependencies, and then fails on missing py34- ones.
This may well be the problem in ports Mk/, but it only fails in poudriere.