gazebo-tooling / gzdev

Gazebo developers tool is an Outreachy project designed to facilitate many of the usual tasks that Gazebo developers face daily
Other
14 stars 3 forks source link

Implement purge/--pre-cleanup option #86

Closed j-rivero closed 5 months ago

j-rivero commented 6 months ago

Add a --pre-clean option that removes any existing gzdev installation from the system before proceeding with the next actions.

j-rivero commented 6 months ago

Tested:

Although failing due to problems with Noble python packages, the relevant log seems fine:

#23 [19/51] RUN git clone https://github.com/gazebo-tooling/gzdev -b jrivero/precleanup_purge /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev
#23 0.358 Cloning into '/home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev'...
#23 DONE 1.1s

#24 [20/51] RUN if [ -n  ]; then         git -C /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev fetch origin  || true;         git -C /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev checkout  || true;     fi || true
#24 0.693 Your branch is up to date with 'origin/jrivero/precleanup_purge'.
#24 DONE 0.7s

#25 [21/51] RUN git -C /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev branch
#25 0.294 * jrivero/precleanup_purge
#25 DONE 0.3s

#26 [22/51] RUN /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev/gzdev.py repository purge

#26 0.396 Removed: /etc/apt/sources.list.d/_gzdev_osrf_stable.list
#26 0.396 Removed: /etc/apt/sources.list.d/_gzdev_osrf_prerelease.list
#26 0.396 Removed: /usr/share/keyrings/_gzdev_osrf_stable.gpg
#26 0.396 Removed: /usr/share/keyrings/_gzdev_osrf_prerelease.gpg
#26 DONE 0.5s

#27 [23/51] RUN /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev/gzdev.py repository enable --project=gz-math7 --force-linux-distro=noble || ( git -C /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev pull origin jrivero/precleanup_purge &&     if [ -n  ]; then git -C /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev checkout ; fi || true &&     /home/jenkins/workspace/_test_gz_math-ci-gz-math7-noble-amd64/gzdev/gzdev.py repository enable --project=gz-math7 --force-linux-distro=noble )
#27 0.449 Hit:1 http://packages.osrfoundation.org/gazebo/ubuntu-stable noble InRelease
#27 0.593 Hit:2 http://archive.ubuntu.com/ubuntu noble InRelease
#27 0.666 Hit:3 http://archive.ubuntu.com/ubuntu noble-updates InRelease
#27 0.703 Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease

#27 0.737 Hit:5 http://archive.ubuntu.com/ubuntu noble-backports InRelease
#27 0.799 Reading package lists...
#27 1.549 Get:1 http://packages.osrfoundation.org/gazebo/ubuntu-prerelease noble InRelease [4252 B]
#27 1.554 Hit:2 http://packages.osrfoundation.org/gazebo/ubuntu-stable noble InRelease
#27 1.594 Get:3 http://packages.osrfoundation.org/gazebo/ubuntu-prerelease noble/main amd64 Packages [39.6 kB]
#27 1.685 Hit:4 http://security.ubuntu.com/ubuntu noble-security InRelease
#27 1.692 Hit:5 http://archive.ubuntu.com/ubuntu noble InRelease
#27 1.769 Hit:6 http://archive.ubuntu.com/ubuntu noble-updates InRelease
#27 1.846 Hit:7 http://archive.ubuntu.com/ubuntu noble-backports InRelease
#27 1.895 Fetched 43.9 kB in 0s (123 kB/s)

#27 1.895 Reading package lists...
#27 2.610 
#27 2.610 Invoking 'apt-get update'
#27 2.610 
#27 2.610 
#27 2.610 Invoking 'apt-get update'
#27 2.610 
#27 DONE 2.7s