cook: name the recipe and URL when an offline fetch has no source.tar
fetch_offline hashed source.tar BEFORE checking it exists, so a missing tarball surfaced as repo: failed to fetch: Opening file for blake3 failed at "recipes/x11/libice/source.tar": No such file (os error 2) which names neither the recipe nor the remedy. That message sent me to work around the symptom by hand twice -- libogg/libvorbis, then four newly promoted X11 recipes -- because it points at hashing rather than at a missing download. Now it reports the recipe, the upstream URL and the exact curl command. Also drops libice/libsm from redbear-full. They are X11 session-management libraries used only by ksmserver, which sits inside if(WITH_X11) and is not built, and they need xorg util-macros, which no recipe in the tree provides. Including them would have meant porting a build dependency for code that is never compiled.
This commit is contained in:
@@ -290,8 +290,11 @@ libxfixes = {}
|
||||
libxi = {}
|
||||
libxrender = {}
|
||||
libxft = {}
|
||||
libice = {}
|
||||
libsm = {}
|
||||
# libice/libsm deliberately NOT included: they are X11 session-management
|
||||
# libraries used only by ksmserver, which is inside if(WITH_X11) and is not
|
||||
# built. They also need xorg util-macros, which is in no recipe here -- so
|
||||
# including them would mean porting a build dependency for code we do not
|
||||
# compile.
|
||||
|
||||
libvorbis = {}
|
||||
libogg = {}
|
||||
|
||||
+27
-1
@@ -551,7 +551,7 @@ pub fn fetch_offline(recipe: &CookRecipe, logger: &PtyOut) -> Result<FetchResult
|
||||
}
|
||||
}
|
||||
Some(SourceRecipe::Tar {
|
||||
tar: _,
|
||||
tar,
|
||||
blake3,
|
||||
patches,
|
||||
script,
|
||||
@@ -560,6 +560,32 @@ pub fn fetch_offline(recipe: &CookRecipe, logger: &PtyOut) -> Result<FetchResult
|
||||
let cached = source_dir.is_dir();
|
||||
if !cached {
|
||||
let source_tar = recipe_dir.join("source.tar");
|
||||
// Existence BEFORE hashing. get_blake3() used to run first, so a
|
||||
// missing tarball surfaced as
|
||||
// repo: failed to fetch: Opening file for blake3 failed at
|
||||
// "recipes/x11/libice/source.tar": No such file (os error 2)
|
||||
// which names neither the recipe nor what to do about it. This
|
||||
// bit twice -- libogg/libvorbis, then four newly promoted X11
|
||||
// recipes -- and both times it was worked around by hand rather
|
||||
// than diagnosed, because the message pointed at hashing rather
|
||||
// than at a missing download.
|
||||
if !source_tar.exists() {
|
||||
bail_other_err!(
|
||||
"{}: source.tar is missing and this build is OFFLINE.\n \
|
||||
Expected: {}\n \
|
||||
Upstream: {}\n \
|
||||
Fetch it with:\n \
|
||||
curl -sSL -o {} '{}'\n \
|
||||
then verify against the blake3 in the recipe. A recipe \
|
||||
newly added to a config has no tarball until it is \
|
||||
fetched once.",
|
||||
recipe_dir.display(),
|
||||
source_tar.display(),
|
||||
tar,
|
||||
source_tar.display(),
|
||||
tar
|
||||
);
|
||||
}
|
||||
let source_tar_blake3 = get_blake3(&source_tar)?;
|
||||
if source_tar.exists() {
|
||||
if let Some(blake3) = blake3 {
|
||||
|
||||
Reference in New Issue
Block a user