about summary refs log tree commit diff
path: root/xpkgdiff
diff options
context:
space:
mode:
authorclassabbyamp <dev@placeviolette.net>2022-04-18 21:13:51 -0400
committerLeah Neukirchen <leah@vuxu.org>2022-05-05 15:50:58 +0200
commit9469a0daba9cdf56a390abf18bb7729c7469bc2d (patch)
treecb26d7f75c9a6c57cf8df304e17326c1ab5fd9ac /xpkgdiff
parent4fb55c12feb2c14e06e50a93dc3b29d1ed1038df (diff)
downloadxtools-9469a0daba9cdf56a390abf18bb7729c7469bc2d.tar.gz
xtools-9469a0daba9cdf56a390abf18bb7729c7469bc2d.tar.xz
xtools-9469a0daba9cdf56a390abf18bb7729c7469bc2d.zip
xpkgdiff: run an in-memory sync to allow use of XBPS_TARGET_ARCH
If the user would like to run a diff for a package on a certain arch,
XBPS_TARGET_ARCH=other-arch xpkgdiff -f foo will now work properly,
even if the user does not have a local repodata for that arch already.
Diffstat (limited to 'xpkgdiff')
-rwxr-xr-xxpkgdiff4
1 files changed, 2 insertions, 2 deletions
diff --git a/xpkgdiff b/xpkgdiff
index d2acf8b..9072b34 100755
--- a/xpkgdiff
+++ b/xpkgdiff
@@ -57,8 +57,8 @@ REPO="
 
 pkg="$1"
 
-if xbps-query -R $pkg >/dev/null; then
-	xbps-query -R $QUERY $pkg | $SORT > "$TMPDIR/${pkg}.repo"
+if xbps-query -MR $pkg >/dev/null; then
+	xbps-query -MR $QUERY $pkg | $SORT > "$TMPDIR/${pkg}.repo"
 else
 	echo "Package '$pkg' not found in repositories" > "$TMPDIR/${pkg}.repo"
 fi