@@ -334,7 +334,7 @@ impl SBuildRecipe {
334334
335335 /// Get the GHCR package path for this recipe (simple version)
336336 pub fn ghcr_package ( & self ) -> String {
337- format ! ( "bincache/{}" , self . pkg)
337+ self . pkg . clone ( )
338338 }
339339
340340 /// Extract unique package names from provides field
@@ -413,13 +413,13 @@ 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: {owner}/{ghcr_pkg}/{pkg_name} or {owner}/{cache}/{ pkg_family}/{recipe_name}/{pkg_name}
416+ // GHCR path: {owner}/{ghcr_pkg}/{pkg_name} or {owner}/{pkg_family}/{recipe_name}/{pkg_name}
417417 let ghcr_path = if let Some ( ref custom_base) = self . ghcr_pkg {
418418 format ! ( "{}/{}/{}" , ghcr_owner, custom_base, sanitized_pkg_name)
419419 } else {
420420 format ! (
421- "{}/{}/{}/{}/{} " ,
422- ghcr_owner, cache_type , pkg_family, recipe_name, sanitized_pkg_name
421+ "{}/{}/{}/{}" ,
422+ ghcr_owner, pkg_family, recipe_name, sanitized_pkg_name
423423 )
424424 } ;
425425
@@ -557,8 +557,8 @@ provides:
557557
558558 // bat==batcat means bat is the package, batcat is symlink - only 1 entry
559559 assert_eq ! ( packages. len( ) , 1 ) ;
560- // GHCR path: {owner}/{cache}/{ pkg_family}/{recipe_name}/{pkg_name}
561- assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/bincache/ bat/static/bat" ) ;
560+ // GHCR path: {owner}/{pkg_family}/{recipe_name}/{pkg_name}
561+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/bat/static/bat" ) ;
562562 assert_eq ! ( packages[ 0 ] . pkg_name, "bat" ) ;
563563 assert_eq ! ( packages[ 0 ] . recipe_name, "static" ) ;
564564 }
@@ -578,8 +578,8 @@ provides:
578578
579579 // Two separate packages - each with its own GHCR path
580580 assert_eq ! ( packages. len( ) , 2 ) ;
581- assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/bincache/ myapp/static/app1" ) ;
582- assert_eq ! ( packages[ 1 ] . ghcr_path, "pkgforge/bincache/ myapp/static/app2" ) ;
581+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/myapp/static/app1" ) ;
582+ assert_eq ! ( packages[ 1 ] . ghcr_path, "pkgforge/myapp/static/app2" ) ;
583583 }
584584
585585 #[ test]
@@ -598,7 +598,7 @@ provides:
598598
599599 // All entries refer to busybox - should deduplicate to 1
600600 assert_eq ! ( packages. len( ) , 1 ) ;
601- assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/bincache/ busybox/static/busybox" ) ;
601+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/busybox/static/busybox" ) ;
602602 assert_eq ! ( packages[ 0 ] . pkg_name, "busybox" ) ;
603603 }
604604
@@ -615,8 +615,8 @@ provides:
615615 let packages = recipe. ghcr_packages_from_path ( path, "pkgforge" ) ;
616616
617617 assert_eq ! ( packages. len( ) , 1 ) ;
618- // GHCR path: {owner}/{cache}/{ pkg_family}/{recipe_name}/{pkg_name}
619- assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/pkgcache/ 0ad/appimage.0ad-matters.stable/0ad" ) ;
618+ // GHCR path: {owner}/{pkg_family}/{recipe_name}/{pkg_name}
619+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/0ad/appimage.0ad-matters.stable/0ad" ) ;
620620 assert_eq ! ( packages[ 0 ] . pkg_name, "0ad" ) ;
621621 assert_eq ! ( packages[ 0 ] . cache_type, "pkgcache" ) ;
622622 assert_eq ! ( packages[ 0 ] . recipe_name, "appimage.0ad-matters.stable" ) ;
@@ -698,10 +698,10 @@ provides:
698698
699699 assert_eq ! ( packages. len( ) , 2 ) ;
700700 // c++filt should be sanitized to cppfilt in the path
701- assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/bincache/ binutils/static/cppfilt" ) ;
701+ assert_eq ! ( packages[ 0 ] . ghcr_path, "pkgforge/binutils/static/cppfilt" ) ;
702702 assert_eq ! ( packages[ 0 ] . pkg_name, "c++filt" ) ; // Original name preserved
703703 // ld.gold is valid, no change
704- assert_eq ! ( packages[ 1 ] . ghcr_path, "pkgforge/bincache/ binutils/static/ld.gold" ) ;
704+ assert_eq ! ( packages[ 1 ] . ghcr_path, "pkgforge/binutils/static/ld.gold" ) ;
705705 assert_eq ! ( packages[ 1 ] . pkg_name, "ld.gold" ) ;
706706 }
707707}
0 commit comments