xbps-query: set a non-zero return code if requested property is not set for the queried package

Offen
#498 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
c, shell
Bereich
cli

Rechercherichtung

Start by locating the xbps-query implementation that handles the --property option and inspect how it behaves when the requested property is unset. Test changelog and homepage queries against packages with and without those properties; done means an unset requested property produces a non-zero status while an available property retains the current behavior.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Currently when I'm looking for a changelog and a package doesn't have the property set I fall back to opening the homepage, like this:

url=$(xbps-query --repository --property=changelog "$package")
if [[ -n $url ]]; then
	url=$(xbps-query --repository --property=homepage "$package")
fi
xdg-open "$url"

With this feature I could rewrite that to something like this:

if ! url=$(xbps-query --repository --property=changelog "$package"); then
	url=$(xbps-query --repository --property=homepage "$package")
fi
xdg-open "$url" 
Vorherrschende Sprache
C
Sterne
1.2k
Forks
156
Ø Merge
1 Std. 39 Min.
Gemergte PRs (30 T.)
1

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus void-linux/xbps

Alle Issues in void-linux/xbps

Ähnliche Issues

Weitere Issues zu C

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.