Skip to content

Merge request for enabling MDIS to uninstall previous MDIS installation

For enabling MDIS to uninstall previous MDIS installation, MDIS compilation system will create a new text file (saved in /etc/mdis/) called mdis_manifest.mnf that will keep tracking of all MDIS artifacts (binaries, libraries, modules, DESC files, etc...) installed, thus, the compilation infrastructure will be able to remove all previous files installed just reading the manifest file.

Below, an example of the content of a manifest file:

user@local:~/workspace/MDIS/manifest$ cat /etc/mdis/mdis_manifest.mnf 
/lib/modules/6.2.0-26-generic/misc/men_mdis_kernel.ko
/lib/modules/6.2.0-26-generic/misc/men_bbis_kernel.ko
/lib/modules/6.2.0-26-generic/misc/men_oss.ko
/lib/modules/6.2.0-26-generic/misc/men_dbg.ko
/lib/modules/6.2.0-26-generic/misc/men_desc.ko
/lib/modules/6.2.0-26-generic/misc/men_pld.ko
/lib/modules/6.2.0-26-generic/misc/men_pld_sw.ko
/lib/modules/6.2.0-26-generic/misc/men_id.ko
/lib/modules/6.2.0-26-generic/misc/men_id_sw.ko
/lib/modules/6.2.0-26-generic/misc/men_mbuf.ko
/lib/modules/6.2.0-26-generic/misc/men_smb_port.ko
/lib/modules/6.2.0-26-generic/misc/men_smb_port_io.ko
/lib/modules/6.2.0-26-generic/misc/men_chameleon.ko
/lib/modules/6.2.0-26-generic/misc/men_chameleon_io.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_xm01bc.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_smb2.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_m99.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_m199.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_z51_io.ko
/lib/modules/6.2.0-26-generic/misc/men_ll_z50_io.ko
/lib/modules/6.2.0-26-generic/misc/men_bb_smb2.ko
/lib/modules/6.2.0-26-generic/misc/men_bb_d203.ko
/lib/modules/6.2.0-26-generic/misc/men_bb_chameleon_pcitbl.ko
/usr/local/lib/libusr_oss.so
/usr/local/lib/libusr_utl.so
/usr/local/lib/libsmb2_api.so
/usr/local/lib/libsmb2_bmc_api.so
/usr/local/lib/libsmb2_shc.so
/usr/local/lib/libmdis_api.so
/usr/local/bin/xm01bc_ctrl
/usr/local/bin/smb2_simp
/usr/local/bin/smb2_f601
/usr/local/bin/smb2_ctrl
/usr/local/bin/smb2_boardident
/usr/local/bin/smb2_touch
/usr/local/bin/smb2_bmc_ctrl
/usr/local/bin/smb2_shc_ctrl
/usr/local/bin/smb2_stm32_flash
/usr/local/bin/smb2_eetemp
/usr/local/bin/smb2_poe
/usr/local/bin/m99_latency
/usr/local/bin/m199_simp
/usr/local/bin/z51_simp
/usr/local/bin/z50_simp
/usr/local/bin/m_errstr
/usr/local/bin/m_getblock
/usr/local/bin/m_getstat
/usr/local/bin/m_getstat_blk
/usr/local/bin/m_mod_id
/usr/local/bin/m_open
/usr/local/bin/m_read
/usr/local/bin/m_rev_id
/usr/local/bin/m_setblock
/usr/local/bin/m_setstat
/usr/local/bin/m_setstat_blk
/usr/local/bin/m_write
/usr/local/bin/wdog_test
/usr/local/bin/wdog_simp
/usr/local/bin/mdis_createdev
/etc/mdis/bioc_2.bin
/etc/mdis/bioc_3.bin
/etc/mdis/cpu.bin
/etc/mdis/d203_1.bin
/etc/mdis/dac_1.bin
/etc/mdis/m199_1.bin
/etc/mdis/m99_1.bin
/etc/mdis/mezz_cham_1.bin
/etc/mdis/smb2_1.bin
/etc/mdis/smb2_3.bin
/etc/mdis/smb2_bus0.bin
/etc/mdis/smb2_bus2.bin
/etc/mdis/xm01bc_1.bin

If a previous MDIS version is installed, just try to uninstall previous version, then, install the new version:

user@local:~/workspace/MDIS/manifest$ sudo make install
[sudo] password for user:
Uninstalling previous MDIS installation...
Updating module dependencies after uninstalling MDIS modules
Updating library cache
===================================
=> MDIS successfully uninstalled <=
===================================
installing men_mdis_kernel non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_bbis_kernel non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_oss non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_dbg non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_desc non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_pld non-debug version in /lib/modules/6.2.0-26-generic/misc
installing men_pld_sw non-debug version in /lib/modules/6.2.0-26-generic/misc
....

Invoking uninstall target explicitly:

user@local:~/workspace/MDIS/manifest$ sudo make uninstall
Uninstalling previous MDIS installation...
Updating module dependencies after uninstalling MDIS modules
Updating library cache
===================================
=> MDIS successfully uninstalled <=
===================================

If we invoke uninstall again, when no MDIS version is installed, nothing happens:

user@local:~/workspace/MDIS/manifest$ sudo make uninstall
MDIS is not installed in the system

@nbg-dpfeuffer @nbg-rwagensveld

Closes #331 (closed)

Merge request reports