@@ -413,9 +413,9 @@ impl SBuildRecipe {
413413 // Sanitize package name for OCI compatibility (e.g., c++filt -> c-filt)
414414 let sanitized_pkg_name = sanitize_oci_name ( & pkg_name) ;
415415 // Use custom ghcr_pkg if specified, otherwise auto-generate path
416- // GHCR path: {ghcr_pkg}/{pkg_name} or {owner}/{cache}/{pkg_family}/{recipe_name}/{pkg_name}
416+ // GHCR path: {owner}/{ ghcr_pkg}/{pkg_name} or {owner}/{cache}/{pkg_family}/{recipe_name}/{pkg_name}
417417 let ghcr_path = if let Some ( ref custom_base) = self . ghcr_pkg {
418- format ! ( "{}/{}" , custom_base, sanitized_pkg_name)
418+ format ! ( "{}/{}/{}" , ghcr_owner , custom_base, sanitized_pkg_name)
419419 } else {
420420 format ! (
421421 "{}/{}/{}/{}/{}" ,
@@ -648,7 +648,7 @@ provides:
648648 let yaml = r#"
649649pkg: myapp
650650pkg_id: example.com.myapp
651- ghcr_pkg: "custom-org/custom- cache/custom-pkg"
651+ ghcr_pkg: "custom-cache/custom-pkg"
652652provides:
653653 - "app1"
654654 - "app2"
@@ -657,10 +657,10 @@ provides:
657657 let path = Path :: new ( "binaries/myapp/static.yaml" ) ;
658658 let packages = recipe. ghcr_packages_from_path ( path, "pkgforge" ) ;
659659
660- // Should use custom ghcr_pkg instead of auto-generated path
660+ // Should use custom ghcr_pkg with owner prepended
661661 assert_eq ! ( packages. len( ) , 2 ) ;
662- assert_eq ! ( packages[ 0 ] . ghcr_path, "custom-org /custom-cache/custom-pkg/app1" ) ;
663- assert_eq ! ( packages[ 1 ] . ghcr_path, "custom-org /custom-cache/custom-pkg/app2" ) ;
662+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge /custom-cache/custom-pkg/app1" ) ;
663+ assert_eq ! ( packages[ 1 ] . ghcr_path, "pkgforge /custom-cache/custom-pkg/app2" ) ;
664664 }
665665
666666 #[ test]
0 commit comments