[Qa-jenkins-scm] [Git][qa/jenkins.debian.net][master] 11 commits: code cleanup: '! -z' --> '-n'
Holger Levsen (@holger)
gitlab at salsa.debian.org
Thu Mar 30 10:47:43 BST 2023
Holger Levsen pushed to branch master at Debian QA / jenkins.debian.net
Commits:
6d0ee613 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: '! -z' --> '-n'
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
4489f7a3 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: use grep return code directly
This uses greps return code directly, instead of checking if it produced
output.
NOTE: the problem with this is that I think that the old code was
broken in a couple of ways:
the $WORKER is inside single quotes (') which will ensure that the
variable expansion doesn't happen, and so the grep presumably never
matches.
the comment claims that the {z}cat runs when the worker isn't running,
but the code (if it worked) seems to be trying to run it only when it
is running.
My version uses the trick of putting some square brackets in the
pattern ([r]) to avoid the need for the protective `grep -v grep`
and makes it match the comment (adding a '!' at the start)
It would be better to use pgrep, but I'm not certain what the pattern
should be without seeing the running processes so I'll leave it at
ps|grep for now.
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
12803b10 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: useless echo removed
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
c94e713e by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: get rid of if $(echo|grep), and similar constructs
the $() is spurious here, and anyway bash can do regexp comparison
thus [[ ... =~ ... ]]
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
1be276c7 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: use grep -c rather than grep|wc -l
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
b458da01 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: replace egrep (obsolescent) with grep -E
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
24913ce3 by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: remove unneeded bits inside $((...))
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
9c8b268d by Philip Hands at 2023-03-30T11:47:00+02:00
code cleanup: get rid of superfluous [ -n/z $(grep ... bits
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
d97b7136 by Philip Hands at 2023-03-30T11:47:00+02:00
fixup! replace egrep (obsolescent) with grep -E
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
129dca03 by Philip Hands at 2023-03-30T11:47:00+02:00
fixup! code cleanup: remove unneeded bits inside $((...))
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
7d92f2d9 by Philip Hands at 2023-03-30T11:47:00+02:00
add (& use) exitcode_to_signame()
Signed-off-by: Holger Levsen <holger at layer-acht.org>
- - - - -
30 changed files:
- bin/cgi-bin/nph-logwatch
- bin/chroot-installation.sh
- bin/chroot-run.sh
- bin/common-functions.sh
- bin/d-i_build.sh
- bin/d-i_manual.sh
- bin/diffoscope_distribution_test.sh
- bin/find_dpkg_trigger_cycles.sh
- bin/find_obsolete_transitional_packages.sh
- bin/jenkins-shell-monitor.sh
- bin/maintenance.sh
- bin/reproducible_alpine_manual_scheduler.sh
- bin/reproducible_alpine_scheduler.sh
- bin/reproducible_archlinux_manual_scheduler.sh
- bin/reproducible_archlinux_scheduler.sh
- bin/reproducible_blacklist.sh
- bin/reproducible_build.sh
- bin/reproducible_build_alpine_pkg.sh
- bin/reproducible_build_archlinux_pkg.sh
- bin/reproducible_build_rpm.sh
- bin/reproducible_build_service.sh
- bin/reproducible_common.sh
- bin/reproducible_create_meta_pkg_sets.sh
- bin/reproducible_debian_live_build.sh
- bin/reproducible_debstrap.sh
- bin/reproducible_html_dashboard.sh
- bin/reproducible_html_nodes_info.sh
- bin/reproducible_html_repository_comparison.sh
- bin/reproducible_html_rpms.sh
- bin/reproducible_maintenance.sh
The diff was not included because it is too large.
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/f0ac16d1310d6d555de007b36079b9c8f37db63a...7d92f2d944d24ec70abf8edb541f4aa1e0046a14
--
View it on GitLab: https://salsa.debian.org/qa/jenkins.debian.net/-/compare/f0ac16d1310d6d555de007b36079b9c8f37db63a...7d92f2d944d24ec70abf8edb541f4aa1e0046a14
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/qa-jenkins-scm/attachments/20230330/01a80f76/attachment-0001.htm>
More information about the Qa-jenkins-scm
mailing list