genindex: added "filename-sha256" obj in pkgdict.
--HG-- extra : convert_revision : d443575b681c408bb357027fcc46f1e19022bd87
This commit is contained in:
parent
6a16f41237
commit
045e10c94e
2 changed files with 11 additions and 2 deletions
|
@ -17,7 +17,10 @@ a remote location specified with "location-remote".
|
||||||
The package dictionary will be the same than the one available in
|
The package dictionary will be the same than the one available in
|
||||||
package's metadata directory "/var/cache/xbps/$pkgname/props.plist",
|
package's metadata directory "/var/cache/xbps/$pkgname/props.plist",
|
||||||
but some additional objects are added to provide enough info for
|
but some additional objects are added to provide enough info for
|
||||||
the repository itself.
|
the repository itself:
|
||||||
|
|
||||||
|
- filename: name (and path) for the binary package.
|
||||||
|
- filename-sha256: SHA256 hash of the binary package.
|
||||||
|
|
||||||
Here's how the package index plist file shall look like in a repository:
|
Here's how the package index plist file shall look like in a repository:
|
||||||
|
|
||||||
|
@ -39,6 +42,8 @@ Here's how the package index plist file shall look like in a repository:
|
||||||
<string>1.5.17</string>
|
<string>1.5.17</string>
|
||||||
<key>filename</key>
|
<key>filename</key>
|
||||||
<string>klibc-1.5.17.x86_64.xbps</string>
|
<string>klibc-1.5.17.x86_64.xbps</string>
|
||||||
|
<key>filename-sha256</key>
|
||||||
|
<string>7b0de0521983037107cc33f2b1514126432f86ac2be1ef9b9dc51a1e959ea777</string>
|
||||||
<key>architecture</key>
|
<key>architecture</key>
|
||||||
<string>x86_64</string>
|
<string>x86_64</string>
|
||||||
<key>installed_size</key>
|
<key>installed_size</key>
|
||||||
|
|
|
@ -139,6 +139,7 @@ write_repo_pkgindex_dict()
|
||||||
local binpkgf="$3"
|
local binpkgf="$3"
|
||||||
local first_dict=
|
local first_dict=
|
||||||
local tmpdictf=
|
local tmpdictf=
|
||||||
|
local binpkg="$XBPS_PACKAGESDIR/$binpkgf"
|
||||||
|
|
||||||
[ -z "$pkgf" -o -z "$indexf" -o -z "$binpkgf" ] && return 1
|
[ -z "$pkgf" -o -z "$indexf" -o -z "$binpkgf" ] && return 1
|
||||||
|
|
||||||
|
@ -149,9 +150,12 @@ write_repo_pkgindex_dict()
|
||||||
if $(echo $line|grep -q "<dict>"); then
|
if $(echo $line|grep -q "<dict>"); then
|
||||||
first_dict=yes
|
first_dict=yes
|
||||||
echo "$line" >> $tmpdictf
|
echo "$line" >> $tmpdictf
|
||||||
# Write the binary pkg filename before.
|
# Write binpkg props.
|
||||||
echo "<key>filename</key>" >> $tmpdictf
|
echo "<key>filename</key>" >> $tmpdictf
|
||||||
echo "<string>$binpkgf</string>" >> $tmpdictf
|
echo "<string>$binpkgf</string>" >> $tmpdictf
|
||||||
|
echo "<key>filename-sha256</key>" >> $tmpdictf
|
||||||
|
echo "<string>$($XBPS_DIGEST_CMD $binpkg)</string>" \
|
||||||
|
>> $tmpdictf
|
||||||
continue
|
continue
|
||||||
# Continue until found.
|
# Continue until found.
|
||||||
elif [ -z "$first_dict" ]; then
|
elif [ -z "$first_dict" ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue