Closed qcybb closed 3 years ago
This seems to be very ports-specific, this would require a depth-visibility parameter.
A depth-visibility parameter would be great.
I find I'm doing a lot of scrolling just to browse what ports were updated. I also use this method to discover new ports I may not even be aware of, and also changes to ports which do not effect my installed versions.
Cross reference https://forums.FreeBSD.org/threads/gitup.77863/post-505392
I just pushed out an update to add these features. A new "display_depth" option was added to gitup.conf and a new command-line parameter -d was added to override the value in gitup.conf. I also added display lines to let people know that the local repository is being scanned, if /usr/src/UPDATING or /usr/ports/UPDATING was modified and a line to let people know that it successfully finished.
How does it look?
I'm sorry, I don't have the knowledge on how to test it. If something is not available on the ports system, I don't use it.
I just have tested it. It does not have the desired effect. It fails to remove the target_directory
as a prefix from the actual calculated path and then limit the visibity. Examples:
without depth:
$ ./gitup -C ./gitup.conf -w 59c6fb518d962e6fb40281cc71420e91ce712f13 ports
# Configuration file: ./gitup.conf
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Proxy Host: de.coia.siemens.net
# Proxy Port: 9400
# Proxy Username: de.coia.siemens.net
# Repository Path: /ports.git
# Target Directory: /var/osipovmi/freebsd-ports
# Have: b582171c5823a263f0dfd6131ac5b96266878f1b
# Want: 59c6fb518d962e6fb40281cc71420e91ce712f13
# Branch: (detached)
# Action: pull
* /var/osipovmi/freebsd-ports/MOVED
* /var/osipovmi/freebsd-ports/devel/qtcreator/Makefile
* /var/osipovmi/freebsd-ports/devel/qtcreator/pkg-plist
* /var/osipovmi/freebsd-ports/games/sgt-puzzles/Makefile
* /var/osipovmi/freebsd-ports/games/sgt-puzzles/distinfo
* /var/osipovmi/freebsd-ports/lang/solidity/Makefile
* /var/osipovmi/freebsd-ports/lang/solidity/distinfo
* /var/osipovmi/freebsd-ports/mail/postfix-current/Makefile
* /var/osipovmi/freebsd-ports/mail/postfix-current/distinfo
* /var/osipovmi/freebsd-ports/net/nats-server/Makefile
* /var/osipovmi/freebsd-ports/net/nats-server/distinfo
* /var/osipovmi/freebsd-ports/net/seaweedfs/Makefile
* /var/osipovmi/freebsd-ports/net/seaweedfs/Makefile.deps
* /var/osipovmi/freebsd-ports/net/seaweedfs/distinfo
* /var/osipovmi/freebsd-ports/net/zerotier/Makefile
* /var/osipovmi/freebsd-ports/net/zerotier/distinfo
* /var/osipovmi/freebsd-ports/www/Makefile
+ /var/osipovmi/freebsd-ports/www/py-django-mezzanine/Makefile
+ /var/osipovmi/freebsd-ports/www/py-django-mezzanine/distinfo
+ /var/osipovmi/freebsd-ports/www/py-django-mezzanine/files/pkg-message.in
+ /var/osipovmi/freebsd-ports/www/py-django-mezzanine/pkg-descr
# Done.
with depth of 2:
$ ./gitup -C ./gitup.conf -w 59c6fb518d962e6fb40281cc71420e91ce712f13 ports
# Configuration file: ./gitup.conf
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Proxy Host: de.coia.siemens.net
# Proxy Port: 9400
# Proxy Username: de.coia.siemens.net
# Repository Path: /ports.git
# Target Directory: /var/osipovmi/freebsd-ports
# Have: b582171c5823a263f0dfd6131ac5b96266878f1b
# Want: 59c6fb518d962e6fb40281cc71420e91ce712f13
# Branch: (detached)
# Action: pull
* /var/osipovmi/freebsd-ports
# Done.
While I would have expected something like this:
$ ./gitup -C ./gitup.conf -w 59c6fb518d962e6fb40281cc71420e91ce712f13 ports
# Configuration file: ./gitup.conf
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Proxy Host: de.coia.siemens.net
# Proxy Port: 9400
# Proxy Username: de.coia.siemens.net
# Repository Path: /ports.git
# Target Directory: /var/osipovmi/freebsd-ports
# Have: b582171c5823a263f0dfd6131ac5b96266878f1b
# Want: 59c6fb518d962e6fb40281cc71420e91ce712f13
# Branch: (detached)
# Action: pull
* /var/osipovmi/freebsd-ports/MOVED
* /var/osipovmi/freebsd-ports/devel/qtcreator
* /var/osipovmi/freebsd-ports/games/sgt-puzzles
* /var/osipovmi/freebsd-ports/lang/solidity
* /var/osipovmi/freebsd-ports/mail/postfix-current
* /var/osipovmi/freebsd-ports/net/nats-server
* /var/osipovmi/freebsd-ports/net/seaweedfs
* /var/osipovmi/freebsd-ports/net/zerotier
* /var/osipovmi/freebsd-ports/www/Makefile
+ /var/osipovmi/freebsd-ports/www/py-django-mezzanine
# Done.
I agree, depth 2 should look like :
# Branch: (detached)
# Action: pull
* /usr/ports/MOVED
* /usr/ports/devel/qtcreator
* /usr/ports/games/sgt-puzzles
* /usr/ports/lang/solidity
* /usr/ports/mail/postfix-current
* /usr/ports/net/nats-server
* /usr/ports/net/seaweedfs
* /usr/ports/net/zerotier
# Done.
Gah! Sorry about that -- I was testing it with paths like "./ports". How does it look now?
Could you show us what the output looks like on your end?
I forgot to apply the display depth code to the list of files/directories that were removed (sorry about that). How does it look now?
For those of us unable to test this locally, could you show us what it looks like?
Here's a truncated example of a display depth of 2 showing new ports, ports that have been modified and one port that has been removed. How does it look?
computer> ./gitup ports -C gitup.conf -d2
# Configuration file: gitup.conf
# Scanning local repository...
# Host: git.freebsd.org
# Port: 443
# Repository Path: /ports.git
# Target Directory: /usr/ports
# Have: e67ae562eb4c0242a4345f5462768eff9351b8f8
# Want: cd8e694917d3c39e6e52daca283b597a8e1c6ff2
# Branch: main
# Action: pull
* /usr/ports/MOVED
* /usr/ports/Mk/Uses
* /usr/ports/accessibility/at-spi2-atk
* /usr/ports/accessibility/at-spi2-core
* /usr/ports/accessibility/py-atspi
* /usr/ports/devel/Makefile
+ /usr/ports/devel/R-cran-waldo
* /usr/ports/devel/awscli
* /usr/ports/devel/bats-core
* /usr/ports/devel/go-git
* /usr/ports/devel/goredo
+ /usr/ports/devel/hs-git-brunch
* /usr/ports/devel/indicators
* /usr/ports/x11-fonts/iosevka
* /usr/ports/x11-fonts/liberation-fonts-ttf
* /usr/ports/x11-fonts/materialdesign-ttf
* /usr/ports/x11-fonts/stix-fonts
* /usr/ports/x11-themes/papirus-icon-theme
* /usr/ports/x11-wm/twm
* /usr/ports/x11-wm/wayfire
* /usr/ports/x11/fuzzel
* /usr/ports/x11/gnome-shell
* /usr/ports/x11/py-xdot
* /usr/ports/x11/xfce4-clipman-plugin
- /usr/ports/devel/gecode
# Done.
That looks good to me! It's nice and clean.
It is possible to add an option to make it less verbose?
What I would like to see is for it to display the results like portsnap did. Just show the directory that changed, and not the contents within it.
Before :
After :