On 02/26/2018 05:14 PM, Luke Shumaker wrote:
> On Mon, 26 Feb 2018 00:46:48 -0500,
> Eli Schwartz wrote:
>>> +++ b/db-functions
>>> @@ -450,7 +450,7 @@ arch_repo_add() {
>>>     # package files might be relative to repo dir
>>>     pushd "${FTP_BASE}/${repo}/os/${arch}" >/dev/null
>>>     /usr/bin/repo-add -q "${repo}${DBEXT}" ${pkgs[@]} \
>>> -           || error "repo-add ${repo}${DBEXT} ${pkgs[@]}"
>>> +           || error 'repo-add %q %s' "${repo}${DBEXT}" "${pkgs[*]@Q}"
>>>     popd >/dev/null
>>>     set_repo_permission "${repo}" "${arch}"
>>>  
>>> @@ -468,7 +468,7 @@ arch_repo_remove() {
>>>             return 1
>>>     fi
>>>     /usr/bin/repo-remove -q "${dbfile}" ${pkgs[@]} \
>>> -           || error "repo-remove ${dbfile} ${pkgs[@]}"
>>> +           || error 'repo-remove %q %s' "$dbfile" "${pkgs[*]@Q}"
>>>     set_repo_permission "${repo}" "${arch}"
>>
>> I think for consistency we should use the same style which means using
>> "${dbfile@Q}"
> 
> I was going for consistency with the repo-add version, which doesn't
> have a single dbfile variable to @Q.  Would you have me introduce a
> dbfile variable in arch_repo_add?

Well, we basically use it hardcoded three times, so why not. :p

Just like the repo-add version, except with pushd "${dbfile%/*}"

Actually, this decreases the difference between the two enough that we
may want to just have one call the other... or do this:

https://lists.archlinux.org/pipermail/arch-projects/2018-February/004832.html

-- 
Eli Schwartz
Bug Wrangler and Trusted User

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to