Zuletzt aktiv 1732782061

List of available updates for void (orphan/mypkg/no version) packages installed locally.

Vinfall hat die Gist bearbeitet 1732782061. Zu Änderung gehen

Keine Änderungen

Vinfall hat die Gist bearbeitet 1732782046. Zu Änderung gehen

1 file changed, 0 insertions, 0 deletions

void-outdated-pkg.sh umbenannt zu xoutdated

Datei ohne Änderung umbenannt

Vinfall hat die Gist bearbeitet 1731732571. Zu Änderung gehen

1 file changed, 4 insertions, 2 deletions

void-outdated-pkg.sh

@@ -23,10 +23,12 @@ outdated_orphan(){
23 23 # awk 'NR==FNR{branches[$1]; next} {for (b in branches) if ($1 ~ b) next} {print}' branches.txt ${DISTFILE}
24 24 }
25 25
26 - # List my outdated packages w/o xcheckmypkgs (only work in local void-packages git repo)
26 + # List my outdated packages w/o xcheckmypkgs
27 + # only work in local void-packages copy if XBPS_DISTDIR is not set
27 28 outdated_mypkg(){
28 29 local MYURL
29 - MYURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_$(git config --local user.email | sed 's/@/%40/').txt"
30 + XDISTDIR="$(xdistdir)" || exit 1
31 + MYURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_$(git -C "${XDISTDIR}" config user.email | sed 's/@/%40/').txt"
30 32 local MYFILE="updates_me.txt"
31 33
32 34 wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${MYFILE} --quiet "${MYURL}"

Vinfall hat die Gist bearbeitet 1731415078. Zu Änderung gehen

Keine Änderungen

Vinfall hat die Gist bearbeitet 1731415050. Zu Änderung gehen

Keine Änderungen

Vinfall hat die Gist bearbeitet 1731415019. Zu Änderung gehen

2 files changed, 65 insertions, 26 deletions

void-orphan-pkg.sh (Datei gelöscht)

@@ -1,26 +0,0 @@
1 - #!/bin/bash
2 - # List of available updates for unmaintained void packages installed locally
3 -
4 - DISTURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_orphan%40voidlinux.org.txt"
5 - DISTFILE="updates_orphan.txt"
6 -
7 - wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${DISTFILE} --quiet ${DISTURL}
8 -
9 - # filter out uninterested packages
10 - # opinionated, `lib` could be a bit overkill
11 - grep -vE 'apache-|avr-|cargo-|cinnamon|gnome-|gst-|jenkins|lib|linux|live555|nemo-|pantheon-|perl-|python3-grpcio|python3-google|ruby-|R-cran-' ${DISTFILE} | sponge ${DISTFILE}
12 -
13 - # dedup, leave only the highest available version
14 - # side effect: order is slightly different
15 - awk '!seen[$1]++ {line[$1] = $0} {line[$1] = $0} END {for (pkg in line) print line[pkg]}' ${DISTFILE} | sort | sponge ${DISTFILE}
16 -
17 - # dedup again, leave only (manually) installed packages
18 - xpkg -m > installed.txt
19 - # query all installed packages (including core packages, more complete, but MUCH slower)
20 - # xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname > installed.txt
21 - awk 'NR==FNR{installed[$1]; next} $1 in installed' installed.txt ${DISTFILE} | sort | sponge ${DISTFILE}
22 - rm installed.txt
23 -
24 - # TODO: filter out existing update branches
25 - # git branch --list |awk '{print $1}' > branches.txt
26 - # awk 'NR==FNR{branches[$1]; next} {for (b in branches) if ($1 ~ b) next} {print}' branches.txt ${DISTFILE}

void-outdated-pkg.sh(Datei erstellt)

@@ -0,0 +1,65 @@
1 + #!/bin/bash
2 +
3 + # List of available updates for unmaintained void packages installed locally
4 + outdated_orphan(){
5 + local DISTURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_orphan%40voidlinux.org.txt"
6 + local DISTFILE="updates_orphan.txt"
7 +
8 + wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${DISTFILE} --quiet ${DISTURL}
9 +
10 + # filter out uninterested packages
11 + # opinionated, `lib` could be a bit overkill
12 + grep -vE 'apache-|avr-|cargo-|cinnamon|gnome-|gst-|jenkins|lib|linux|live555|nemo-|pantheon-|perl-|python3-grpcio|python3-google|ruby-|R-cran-' ${DISTFILE} | sponge ${DISTFILE}
13 +
14 + # dedup, leave only the highest available version
15 + # side effect: order is slightly different
16 + awk '!seen[$1]++ {line[$1] = $0} {line[$1] = $0} END {for (pkg in line) print line[pkg]}' ${DISTFILE} | sort | sponge ${DISTFILE}
17 +
18 + # dedup again, leave only installed packages
19 + awk 'NR==FNR{installed[$1]; next} $1 in installed' installed.txt ${DISTFILE} | sort | sponge ${DISTFILE}
20 +
21 + # TODO: filter out existing update branches
22 + # git branch --list |awk '{print $1}' > branches.txt
23 + # awk 'NR==FNR{branches[$1]; next} {for (b in branches) if ($1 ~ b) next} {print}' branches.txt ${DISTFILE}
24 + }
25 +
26 + # List my outdated packages w/o xcheckmypkgs (only work in local void-packages git repo)
27 + outdated_mypkg(){
28 + local MYURL
29 + MYURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_$(git config --local user.email | sed 's/@/%40/').txt"
30 + local MYFILE="updates_me.txt"
31 +
32 + wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${MYFILE} --quiet "${MYURL}"
33 + }
34 +
35 + # List packages that have error checking updates
36 + outdated_error(){
37 + local LOG_URL="https://repo-default.voidlinux.org/void-updates/void-updates/_log.txt"
38 + local LOG_FILE="updates_nover.txt"
39 +
40 + wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${LOG_FILE} --quiet ${LOG_URL}
41 +
42 + # leave only (manually) installed packages
43 + grep -v 'No such file' < ${LOG_FILE} | awk 'BEGIN {
44 + while ((getline < "installed.txt") > 0) {
45 + installed[$1]
46 + }
47 + }
48 + {
49 + package = $5;
50 + if (package in installed) print $0
51 + }' | sponge ${LOG_FILE}
52 + }
53 +
54 + # list only manually installed packages
55 + xpkg -m > installed.txt
56 + # query all installed packages (including core packages, more complete, but MUCH slower)
57 + # xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname > installed.txt
58 +
59 + # functions here
60 + outdated_orphan
61 + outdated_mypkg
62 + outdated_error
63 +
64 + # garbage clean
65 + rm installed.txt

Vinfall hat die Gist bearbeitet 1731385392. Zu Änderung gehen

1 file changed, 26 insertions

void-orphan-pkg.sh(Datei erstellt)

@@ -0,0 +1,26 @@
1 + #!/bin/bash
2 + # List of available updates for unmaintained void packages installed locally
3 +
4 + DISTURL="https://repo-default.voidlinux.org/void-updates/void-updates/updates_orphan%40voidlinux.org.txt"
5 + DISTFILE="updates_orphan.txt"
6 +
7 + wget --hsts-file="$XDG_CACHE_HOME/wget-hsts" --output-document ${DISTFILE} --quiet ${DISTURL}
8 +
9 + # filter out uninterested packages
10 + # opinionated, `lib` could be a bit overkill
11 + grep -vE 'apache-|avr-|cargo-|cinnamon|gnome-|gst-|jenkins|lib|linux|live555|nemo-|pantheon-|perl-|python3-grpcio|python3-google|ruby-|R-cran-' ${DISTFILE} | sponge ${DISTFILE}
12 +
13 + # dedup, leave only the highest available version
14 + # side effect: order is slightly different
15 + awk '!seen[$1]++ {line[$1] = $0} {line[$1] = $0} END {for (pkg in line) print line[pkg]}' ${DISTFILE} | sort | sponge ${DISTFILE}
16 +
17 + # dedup again, leave only (manually) installed packages
18 + xpkg -m > installed.txt
19 + # query all installed packages (including core packages, more complete, but MUCH slower)
20 + # xbps-query -l | awk '{ print $2 }' | xargs -n1 xbps-uhelper getpkgname > installed.txt
21 + awk 'NR==FNR{installed[$1]; next} $1 in installed' installed.txt ${DISTFILE} | sort | sponge ${DISTFILE}
22 + rm installed.txt
23 +
24 + # TODO: filter out existing update branches
25 + # git branch --list |awk '{print $1}' > branches.txt
26 + # awk 'NR==FNR{branches[$1]; next} {for (b in branches) if ($1 ~ b) next} {print}' branches.txt ${DISTFILE}
Neuer Älter