-
Notifications
You must be signed in to change notification settings - Fork 20
Updating Linuxbrew xorg packages
This (quick) guide is for current and future maintainers of Linuxbrew/xorg.
-
Get homebrew-livecheck that works with Linuxbrew/xorg:
brew tap homebrew/livecheck cd $(brew --repo homebrew/livecheck) git fetch https://github.com/maxim-belkin/homebrew-livecheck.git livecheck-xorg:livecheck-xorg git checkout livecheck-xorg
-
Find formulae that can be updated & determine the order in which the formulae can be safely updated (for that purpose you can check out Linuxbrew/xorg updater).
cd $(brew --repo linuxbrew/xorg)/Formula echo -n "" > ../TODO.txt for file in *.rb do echo Processing $file brew livecheck -n linuxbrew/xorg/${file%.rb} 2>/dev/null 1>>../TODO.txt done # The above code creates a file `TODO.txt` with the output of `brew livecheck` that looks like this: # # encodings (guessed) : 1.0.4 ==> 1.0.5 # libdrm (guessed) : 2.4.97 ==> 2.4.98 # libevdev (guessed) : 1.6.0 ==> 1.7.0 # libfs (guessed) : 1.0.7 ==> 1.0.8 # libglvnd (guessed) : 1.1.0 ==> 1.1.1
-
Create a new "Update packages" issue in this repository documenting the packages that have to be updated. You may use the following code snippet to generate a list with check-boxes:
sed 's|^| - [ ] |; s| (guessed) :||;' ../TODO.txt > ../TODO.issue.txt
-
Figure out the order in which to update the packages: start with those that have fewer dependencies on packages in Linuxbrew/xorg:
for file in $(cut -d' ' -f1 ../TODO.txt); do echo -n "$file " brew deps --include-build --include-test linuxbrew/xorg/$file | grep linuxbrew/xorg | wc -l done | sort -nk2 > ../TODO.order.txt
Alternative solution that does not use
brew deps
:for file in $(cut -d' ' -f1 ../TODO.txt); do grep -Hc "depends_on.*linuxbrew/xorg" $file.rb | sed 's|:| |' done | sort -nk2 > ../TODO.order.txt
This alternative solution might produce incorrect results if dependencies are in conditional blocks, as in:
unless OS.mac? depends_on "linuxbrew/xorg/mesa" end
-
Proceed with updating formulae!