svn commit: r271480 - head/release/scripts

Bryan Drewery bdrewery at FreeBSD.org
Fri Sep 12 21:21:38 UTC 2014


On 9/12/2014 1:52 PM, Glen Barber wrote:
> Author: gjb
> Date: Fri Sep 12 18:52:01 2014
> New Revision: 271480
> URL: http://svnweb.freebsd.org/changeset/base/271480
> 
> Log:
>   Set PKG_CACHEDIR to an 'All/' directory one level lower
>   to fix 'pkg repo' generating repository metadata for the
>   on-disc packages.
>   
>   MFC after:	3 days
>   X-MFC-to-10.1:	yes
>   Sponsored by:	The FreeBSD Foundation
> 
> Modified:
>   head/release/scripts/pkg-stage.sh
> 
> Modified: head/release/scripts/pkg-stage.sh
> ==============================================================================
> --- head/release/scripts/pkg-stage.sh	Fri Sep 12 18:31:44 2014	(r271479)
> +++ head/release/scripts/pkg-stage.sh	Fri Sep 12 18:52:01 2014	(r271480)
> @@ -44,7 +44,8 @@ PKG_ABI=$(pkg -vv | grep ^ABI | awk '{pr
>  PKG_ABI="${PKG_ABI%\";}"
>  PKG_ABI="${PKG_ABI#\"}"
>  export PKG_ABI
> -export PKG_CACHEDIR="dvd/packages/${PKG_ABI}"
> +export PKG_REPODIR="dvd/packages/${PKG_ABI}"
> +export PKG_CACHEDIR="${PKG_REPODIR}/${PKG_ABI}/All"
>  
>  /bin/mkdir -p ${PKG_CACHEDIR}
>  
> @@ -53,7 +54,7 @@ ${PKGCMD} -vv
>  ${PKGCMD} update -f
>  ${PKGCMD} fetch -d ${DVD_PACKAGES}
>  
> -${PKGCMD} repo ${PKG_CACHEDIR}
> +${PKGCMD} repo ${PKG_REPODIR}
>  
>  # Always exit '0', even if pkg(8) complains about conflicts.
>  exit 0
> 

There's still an issue with 1.3 here. pkg-fetch now uses mangled package
names in its cache dir, and does not use the All/ subdir anymore as
you've found.

# ls /var/cache/pkg/psutils-1.17_4*
/var/cache/pkg/psutils-1.17_4-fe318c25d7.txz
/var/cache/pkg/psutils-1.17_4.txz@

Rather the polluting the DVD with these hashed filenames you can just
not set PKG_CACHEDIR and use pkg fetch -o ${PKG_REPODIR} -d ${DVD_PACKAGES}.

You can also now simplify the PKG_ABI lookup 4 lines to just: export
PKG_ABI=$(pkg config ABI).

pkg fetch -o was added to 1.3 specifically for cases such as creating DVDs.

It will then store the files in dvd/packages/${PKG_ABI}/All.

See https://people.freebsd.org/~bdrewery/patches/pkg-stage-1.3.diff

-- 
Regards,
Bryan Drewery

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20140912/3c92f8e2/attachment.sig>


More information about the svn-src-all mailing list