osmith has submitted this change. ( https://gerrit.osmocom.org/c/osmo-ci/+/31926 )
Change subject: obs: lib.args: store argparse result here
......................................................................
obs: lib.args: store argparse result here
Prepare to add more arguments to the OBS scripts, so they can be used
for building the wireshark package in its own OBS project.
It was not so clear to me when writing this initially, but with more and
more arguments getting added: it's not very maintainable to pass each
variable from the argparse result several functions down to where it
gets used... so unfortunately this means the code needs to be refactored
to just use libs.args in the few lines of code where the arguments
actually get used.
This patch adds lib.args, and the next patches refactor existing code to
use it instead of passing parameters, where it makes sense. After that
follow the patches related to adding the wireshark package.
Related: OS#2537
Change-Id: I48853444f1386dfb842c174ebc45f9decc8bec0f
---
M scripts/obs/build_binpkg.py
M scripts/obs/build_srcpkg.py
M scripts/obs/lib/__init__.py
M scripts/obs/update_obs_project.py
4 files changed, 37 insertions(+), 3 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, but someone else must approve
pespin: Looks good to me, approved
diff --git a/scripts/obs/build_binpkg.py b/scripts/obs/build_binpkg.py
index a34a699..dcd6cdc 100755
--- a/scripts/obs/build_binpkg.py
+++ b/scripts/obs/build_binpkg.py
@@ -38,7 +38,7 @@
help="package name, e.g. libosmocore")
args = parser.parse_args()
- lib.set_cmds_verbose(args.verbose)
+ lib.set_args(args)
srcdir = f"{lib.config.path_temp}/srcpkgs/{args.package}"
if not os.path.exists(srcdir):
diff --git a/scripts/obs/build_srcpkg.py b/scripts/obs/build_srcpkg.py
index ad21927..869b8ef 100755
--- a/scripts/obs/build_srcpkg.py
+++ b/scripts/obs/build_srcpkg.py
@@ -28,7 +28,7 @@
print("ERROR: specify -m and/or a package. See -h for help.")
exit(1)
- lib.set_cmds_verbose(args.verbose)
+ lib.set_args(args)
if args.docker:
lib.docker.run_in_docker_and_exit("build_srcpkg.py")
diff --git a/scripts/obs/lib/__init__.py b/scripts/obs/lib/__init__.py
index 479c1c1..edf19f4 100644
--- a/scripts/obs/lib/__init__.py
+++ b/scripts/obs/lib/__init__.py
@@ -10,6 +10,10 @@
import inspect
import lib.config
+# Argparse result
+args = None
+
+# Print output of commands as they run, not only on error
cmds_verbose = False
@@ -60,6 +64,12 @@
cmds_verbose = new_val
+def set_args(new_val):
+ global args
+ args = new_val
+ set_cmds_verbose(args.verbose)
+
+
def check_required_programs():
ok = True
diff --git a/scripts/obs/update_obs_project.py b/scripts/obs/update_obs_project.py
index 86cf40a..0ae949b 100755
--- a/scripts/obs/update_obs_project.py
+++ b/scripts/obs/update_obs_project.py
@@ -199,7 +199,7 @@
branch = args.git_branch
packages = parse_packages(args.package)
- lib.set_cmds_verbose(args.verbose)
+ lib.set_args(args)
if args.docker:
lib.docker.run_in_docker_and_exit("update_obs_project.py", True)
--
To view, visit https://gerrit.osmocom.org/c/osmo-ci/+/31926
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-ci
Gerrit-Branch: master
Gerrit-Change-Id: I48853444f1386dfb842c174ebc45f9decc8bec0f
Gerrit-Change-Number: 31926
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged
Attention is currently required from: arehbein, pespin, fixeria.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/31885 )
Change subject: PCU IF: Update NSE timer field
......................................................................
Patch Set 1:
(1 comment)
File include/osmo-bts/pcuif_proto.h:
https://gerrit.osmocom.org/c/osmo-bts/+/31885/comment/76c78d05_cc599e2f
PS1, Line 156: PCU_IF_NUM_NSE_TIMERS
> Ah of course, didn't think of that @fixeria. […]
You could move nse_timer[] to the end of the struct. This wouldn't break the ABI, but in case a new timer has to be added you cannot easily enlarge the array.
I see there are already some txxx and nxxx variables in this struct. Why not adding the 8 timers as separate variables at the end of the struct?
(Are we limited in space here? What if the info_ind grows larger than struct gsm_pcu_if_data, which seems to be the biggest struct at the moment.)
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/31885
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I7385574ef4bd4529d2e7e3d2000b7a1551ef1fcb
Gerrit-Change-Number: 31885
Gerrit-PatchSet: 1
Gerrit-Owner: arehbein <arehbein(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-CC: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: arehbein <arehbein(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 16 Mar 2023 09:10:21 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: arehbein <arehbein(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-MessageType: comment
Attention is currently required from: fixeria.
pespin has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-bsc/+/31939 )
Change subject: fix bs11_read_swl_file(): properly clean up stale file list
......................................................................
Patch Set 1: Code-Review+1
--
To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/31939
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Change-Id: Ib5eaa328aaf6881ae9621ca14859e4e255af2b00
Gerrit-Change-Number: 31939
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Comment-Date: Thu, 16 Mar 2023 08:09:13 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment