Commit graph

59 commits

Author SHA1 Message Date
Rene Ladan
f993572c81 rmport: warn about node slave packages when removing a www/node port 2024-07-14 16:01:55 +02:00
Rene Ladan
4214b7bd85 rmport: remove a hardcoded /usr/ports in a comment 2024-07-14 16:01:55 +02:00
Rene Ladan
335711ead9 rmport: bump copyright 2024-07-14 16:01:55 +02:00
Rene Ladan
6d6ee9171e rmport: remove trailing dot from the line added to MOVED
This satisfies a server-side git hook.
2024-07-14 16:01:54 +02:00
Rene Ladan
206e6293bd Tools/scripts/rmport: do not add a trailing colon when only removing one port
Reported by:	sunpoet (via private mail)
2023-06-03 13:06:52 +02:00
Rene Ladan
9f5f51d945 Tools/scripts: rmport: force cleaning up at the end 2023-05-20 11:39:45 +02:00
Rene Ladan
8270a4ffc5 Tools/scripts/rmport: also cleanup when being trapped on a signal
This should get rid of stale gitrmlist* and gitlog* files.
2023-04-30 13:40:21 +02:00
Rene Ladan
3a59d525a9 Tools/scripts/rmport: remove extraneous trailing '/' in single-port commit messages 2023-04-30 13:29:38 +02:00
Rene Ladan
021979f6cf Tools/scripts/rmport: try to fix flow for amending the final commit 2023-04-30 13:18:56 +02:00
Rene Ladan
3a48862fcd Tools/scripts/rmport: update copyright year 2023-04-30 13:14:01 +02:00
Rene Ladan
a3e43bd4a8 Tools/scripts/rmport: Fix my English
Reported by:	George L. Yermulnik <yz@yz.kiev.ua>
2023-02-19 21:24:17 +01:00
Rene Ladan
f08b42fbd9 Tools/scripts: use a port-specific commit message if removing a single port.
This helps in `git shortlog`, replacing "cleanup: Remove expired ports" by
"category/port: Remove expired port" for a given category and port.

Reported by:	gerald
2023-02-19 20:42:20 +01:00
Rene Ladan
282db8d418 Tools/scripts: note that you should also be in sync with origin/main 2022-12-04 12:29:43 +01:00
Rene Ladan
332b174080 rmport: first check if we are in a git checkout, then check for changes. 2021-09-08 21:57:45 +02:00
Rene Ladan
18860205ed rmport: use "cleanup" instead of "*/*" 2021-07-03 19:56:51 +02:00
Rene Ladan
0b673d6c5b cleanup: remove LEGAL and (support in) related tools.
LEGAL is badly maintained, LEGALlint notices quite a number of ports
which mismatch their line in LEGAL. The port itself is always leading.

* math/giacxcas: restrict RESTRICTED_FILES to giac_* only

Differential Revision: https://reviews.freebsd.org/D30061

Reviewed by:	portmgr (mat), dch, eadler, marcus
2021-06-11 15:45:10 +02:00
Rene Ladan
d674d5221b Tools/scripts/rmport: satisfy path check hook 2021-05-31 22:53:38 +02:00
Rene Ladan
d7d1f48512 Tools/scripts/rmport: differentiate exit codes. 2021-04-21 10:01:03 +02:00
Rene Ladan
578d48f1bc rmport: ready for git
- do not remove ports immediately but store them in a temporary file
  and remove them once the script has iterated over all ports to be
  removed. This prevents failed searches. The Subversion version
  used a temporary worktree so the main tree was unaffected.
- remove a "merge" from a question, we use rebase now.
- check if INDEX is readable and exit if not
2021-04-06 22:56:09 +02:00
Rene Ladan
6d299fa340 rmport: fix and simplify workflow
- gather information about the deleted port for the commit message
  before removing the port. I somehow missed that when testing the
  script.
- Instead of a temporary branch, just operate on the current branch
  and incorporate upstream changes with git pull --rebase. This
  prevents one from being stranded on a temporary branch if the
  script crashes and oblivates the need for a squash merge [1]

Suggested by:	mat [1]
2021-04-06 17:07:06 +02:00
Rene Ladan
297cd65581 Tools/scripts/rmport: convert workflow to git.
Do not push the final result automatically yet, unlike its previous
Subversion version.

Reviewed by:	emaste, mat, uqs
Approved by:	crees (maintainer, implicit)
Differential Revision:	https://reviews.freebsd.org/D29451
2021-04-06 12:39:47 +02:00
Rene Ladan
79f37cc7ae rmport: fix and speed up the find_expired() function.
find_expired() is used with -F (report on all expired ports using the
format "date category/port: reason") and -a (remove all expired ports).

Some speedups:
- only calculate the deprecation reason for -F
- use nested loops instead of nested recursion for traversing all ports.
  The nested recursion would also stop after finding the first port.

Approved by:	maintainer (crees) (implicit, fixit)
2019-03-05 22:54:34 +00:00
Rene Ladan
17094bb838 rmport: correctly deal with expired ports when the -a (find all expired) option.
Instead of grepping port Makefiles for EXPIRATION_DATE, evaluate this variable
using make. Also find ports by evaluating SUBDIR recursively instead of using
find on Makefile\*

Submitted by:   crees (maintainer)
Approved by:    crees (maintainer)
2019-02-26 21:51:44 +00:00
Chris Rees
0a32f395b7 Revert flavour support.
Submitted by:	rene
2018-12-17 15:09:13 +00:00
Chris Rees
814b0cc185 Support flavor_EXPIRATION_DATE
Correctly ignore commented dates (why would that exist?)

Handle more neatly when EXPIRATION_DATE is not in the main Makefile
2018-12-17 14:54:56 +00:00
Rene Ladan
10ad00012a rmport: if the user edited the commit message, ask again afterwards.
This is in line with asking for recreating the diffs and "fixes" the workflow.
2018-10-11 13:40:41 +00:00
Rene Ladan
88f198beed rmport: usability fixes:
- only write the message to edit the log once
- show the log itself instead of the temporary filename
2018-09-16 09:20:37 +00:00
Rene Ladan
00c81ca48c Tools/scrips/rmport: improve usability
- if svn is not found, look for svnlite
- improve workflow of removing ports

Submitted by:	blackend via email
Approved by:	maintainer (crees)
2018-09-02 11:30:20 +00:00
Eugene Grosbein
dfa53b2308 rmport: provide default for EDITOR varialble to prevent
an error "svnlog: not found" when EDITOR is undefined.

Reported by:	Matthias Fechner <idefix@fechner.net>
Approved by:	portmgr (crees)
2018-08-04 16:29:31 +00:00
Rene Ladan
affecc3c06 Detect flavored dependencies in Tools/scripts/rmport and add myself to the copyright. 2018-03-26 16:55:52 +00:00
Larry Rosenman
62de852b7f Update Tools/scripts/rmport to ignore commented out EXPIRATION_DATE lines
Reviewed by: 	crees (maintainer)
Approved by:	rene (portmgr, mentor), adamw (portmgr, mentor), crees (maintainer)
Differential Revision:	https://reviews.freebsd.org/D10548
2017-04-30 17:45:31 +00:00
Rene Ladan
6544d8b819 Remove a stale comment in Tools/scripts/rmport 2016-05-17 17:53:11 +00:00
Rene Ladan
8e33c1e0fa As a frequent user of the rmport script, it was time for some improvements:
- allow PORTSDIR to be a symbolic link when looking for expired ports or
  dependent ports
- allow for trailing slashes when specifying ports as cat/name. This prevents
  the port being a false positive for itself when the Makefile mentions the
  port name (e.g., in PLIST_FILES)
- fetch possibly open PRs via Bugzilla, GNATS is long gone. Remove the
  version that used freefall. Thanks to crees for pretty-printing the results.
- forcibly delete the temporary checkout to prevent rm(1) from asking for
  confirmation on each file in .svn
- add myself as author

Approved by:	maintainer (crees)
Differential Revision:	https://reviews.freebsd.org/D6396
2016-05-17 17:51:59 +00:00
Christian Weisgerber
4399edafd2 Default to repo.FreeBSD.org for commits, as urged by our repo meister.
Approved by:	crees
2015-09-15 15:31:54 +00:00
Chris Rees
d34d662a29 Fix cdiff
Reported by:	swills
2014-03-24 20:30:00 +00:00
Baptiste Daroussin
a24b31bac2 Make check_deps behave the same as check_PRs:
propose to skip removing a port if anything depends on it, instead of infinite looping on "ignore the issue"
2013-03-09 23:49:02 +00:00
Eitan Adler
3152b4bd9f Make the removal diff nicer to read by not showing the line-by-line removal and instead replace it with "FILE has been deleted"
Reviewed by:	crees
2012-09-23 17:56:10 +00:00
Beat Gaetzi
6228337952 - Update addport and rmport to work with Subversion
Submitted by:	crees, miwi
2012-07-15 20:57:22 +00:00
Chris Rees
dd16d151db Take maintainership-- thanks to vd for his past work on this script
Approved by:	vd (maintainer)

- Make the diff output work

- Use cdiff if exists, otherwise stick with $EDITOR

- Stop trying to remove CVSROOT; hasn't been checked out since modules
  support was removed by erwin
2012-05-02 18:32:30 +00:00
Greg Larkin
e49ea39cc3 - Fixed "permission denied" error
- Prevented full ports tree build when operating with ~/.cvsrc

PR:		ports/139121
2009-10-06 00:48:13 +00:00
Erwin Lansing
e4bbe0c85e CVSROOT/modules no longer contains an entry per port, remove support
for this from these scripts.
2008-06-19 22:09:01 +00:00
Vasil Dimov
101df1b468 Use echo instead of printf because external commands cannot be executed
with very long arguments (>400000 characters).

The problem reveals for example if
/usr/ports/Tools/scripts/rmport -d print/ghostscript-gnu
is executed - it does
printf "%s\n" "... 451109 chars ..."

Spotted by:	rafan
2007-03-28 20:39:18 +00:00
Vasil Dimov
eed3828ab1 * Run cvs update just before cvs commit to sync a potentially changed files
in the repository. Suggested by: gabor@
* Fix typo in the output
2007-02-19 07:24:36 +00:00
Vasil Dimov
92615ddfc4 A bunch of cosmetic changes - add one empty line to make the output more
readable and use double quotes everywhere.
2007-01-26 14:25:39 +00:00
Vasil Dimov
a62c886fca Make output messages more useful 2007-01-26 10:19:23 +00:00
Vasil Dimov
0d451e0598 * Make it possible to skip existing dependencies and ports references in LEGAL
and continue with removal anyway. Requested by miwi@
* Pipe dependencies information (if any) through a PAGER because INDEX lines
  are very long and hard to read when wrapped
2007-01-19 15:49:49 +00:00
Vasil Dimov
59a026b0f1 Query Gnats for PRs by using the query-pr command on freefall instead of the
web-interface becase the later is not reliable.
2006-12-20 13:18:25 +00:00
Vasil Dimov
e2f1d375a7 Add check for existing non-closed PRs related to the port being removed.
If any are found then ask if the port should be skipped from removal or
removed regardless of the PRs.
2006-12-13 07:32:58 +00:00
Vasil Dimov
9125407be5 Add deprecated reason to the output of -F 2006-11-02 09:20:10 +00:00
Vasil Dimov
e1bcb99398 * Create custom commit message template and populate it with the ports
to be removed, possibly with the expiration date and deprecated reason
* If port is not marked for expiration than put "Removed" in ports/MOVED
  entry instead of "Has expired"
* Implement -a option to remove all expired ports
* Ask if the cvs diff output should be recreated/reviewed again thus
  giving the committer a chance to edit files by hand and view diff
  results afterwards
* Cosmetic changes
2006-11-01 09:57:36 +00:00