Topic: make uninstall also removes contents other than from qelectrotech

Dear All,

I am running Linux Mint. A few moths ago I have downloaded the source code of qet 0.100 compiled and installed it, modified part of the source code to fix some issues, uninstalled the old installation and re-installed it.

Yesterday, I noticed that files of other custom software installed under /usr/local/share/icons and /usr/local/man were missing. Only qet files were left in these directory trees.

So, I had a look at the Makefile of qet 0.100 and found the following section in Makefile.Release:

uninstall_icons: FORCE
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/256x256
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/128x128
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/64x64
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/48x48
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/32x32
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/22x22
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/share/icons/hicolor/16x16
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/share/icons/hicolor/

uninstall_man: FORCE
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/ru
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/pt
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/pl
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/nl
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/man1
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/it
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/fr.UTF-8
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/fr.ISO8859-1
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/fr
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/es
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/el
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/cs
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/ca
        -$(DEL_FILE) -r $(INSTALL_ROOT)/usr/local/man/be
        -$(DEL_DIR) $(INSTALL_ROOT)/usr/local/man/ 

These lines suggest that per "make uninstall" entire folders are removed, that may hold files from other software, rather than removing only qet files.

Therefore, I recommend to please correct the uninstall procedure carried out per Makefiles so that only qet files are removed.

Regards
Tom

Re: make uninstall also removes contents other than from qelectrotech

I am not a Qt expert, but it seems to me that the file "Makefile.Release" is created by qmake according to the instructions in the file "qelectrotech.pro". I had a look into "qelectrotech.pro" and modified it to fix the issue. Here is a diff output of the original "qelectrotech.pro" compared to the modified "qelectrotech.pro".

18,19c18,32
<         QET_ICONS_PATH             = 'share/icons/hicolor/'
<         QET_MAN_PATH               = 'man/'
---
>         QET_ICONS_PATH_16_APPS     = 'share/icons/hicolor/16x16/apps/'
>         QET_ICONS_PATH_16_MIME     = 'share/icons/hicolor/16x16/mimetypes/'
>         QET_ICONS_PATH_22_APPS     = 'share/icons/hicolor/22x22/apps/'
>         QET_ICONS_PATH_22_MIME     = 'share/icons/hicolor/22x22/mimetypes/'
>         QET_ICONS_PATH_32_APPS     = 'share/icons/hicolor/32x32/apps/'
>         QET_ICONS_PATH_32_MIME     = 'share/icons/hicolor/32x32/mimetypes/'
>         QET_ICONS_PATH_48_APPS     = 'share/icons/hicolor/48x48/apps/'
>         QET_ICONS_PATH_48_MIME     = 'share/icons/hicolor/48x48/mimetypes/'
>         QET_ICONS_PATH_64_APPS     = 'share/icons/hicolor/64x64/apps/'
>         QET_ICONS_PATH_64_MIME     = 'share/icons/hicolor/64x64/mimetypes/'
>         QET_ICONS_PATH_128_APPS    = 'share/icons/hicolor/128x128/apps/'
>         QET_ICONS_PATH_128_MIME    = 'share/icons/hicolor/128x128/mimetypes/'
>         QET_ICONS_PATH_256_APPS    = 'share/icons/hicolor/256x256/apps/'
>         QET_ICONS_PATH_256_MIME    = 'share/icons/hicolor/256x256/mimetypes/'
>         QET_MAN_PATH               = 'man/man1/'
294,301c307,348
< icons.path         = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH})
< icons.files        = ico/breeze-icons/16x16   \
<                      ico/breeze-icons/22x22   \
<                      ico/breeze-icons/32x32   \
<                      ico/breeze-icons/48x48   \
<                      ico/breeze-icons/64x64   \
<                      ico/breeze-icons/128x128 \
<                      ico/breeze-icons/256x256
---
> icons16apps.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_16_APPS})
> icons16apps.files  = ico/breeze-icons/16x16/apps/qelectrotech.png
> icons16mime.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_16_MIME})
> icons16mime.files  = ico/breeze-icons/16x16/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/16x16/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/16x16/mimetypes/application-x-qet-titleblock.png
> icons22apps.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_22_APPS})
> icons22apps.files  = ico/breeze-icons/22x22/apps/qelectrotech.png
> icons22mime.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_22_MIME})
> icons22mime.files  = ico/breeze-icons/22x22/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/22x22/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/22x22/mimetypes/application-x-qet-titleblock.png
> icons32apps.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_32_APPS})
> icons32apps.files  = ico/breeze-icons/32x32/apps/qelectrotech.png
> icons32mime.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_32_MIME})
> icons32mime.files  = ico/breeze-icons/32x32/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/32x32/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/32x32/mimetypes/application-x-qet-titleblock.png
> icons48apps.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_48_APPS})
> icons48apps.files  = ico/breeze-icons/48x48/apps/qelectrotech.png
> icons48mime.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_48_MIME})
> icons48mime.files  = ico/breeze-icons/48x48/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/48x48/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/48x48/mimetypes/application-x-qet-titleblock.png
> icons64apps.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_64_APPS})
> icons64apps.files  = ico/breeze-icons/64x64/apps/qelectrotech.png
> icons64mime.path   = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_64_MIME})
> icons64mime.files  = ico/breeze-icons/64x64/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/64x64/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/64x64/mimetypes/application-x-qet-titleblock.png
> icons128apps.path  = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_128_APPS})
> icons128apps.files = ico/breeze-icons/128x128/apps/qelectrotech.png
> icons128mime.path  = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_128_MIME})
> icons128mime.files = ico/breeze-icons/128x128/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/128x128/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/128x128/mimetypes/application-x-qet-titleblock.png
> icons256apps.path  = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_256_APPS})
> icons256apps.files = ico/breeze-icons/256x256/apps/qelectrotech.png
> icons256mime.path  = $$join(INSTALL_PREFIX,,,$${QET_ICONS_PATH_256_MIME})
> icons256mime.files = ico/breeze-icons/256x256/mimetypes/application-x-qet-element.png \
>                      ico/breeze-icons/256x256/mimetypes/application-x-qet-project.png \
>              ico/breeze-icons/256x256/mimetypes/application-x-qet-titleblock.png
304c351
< man.files          = man/files/*
---
> man.files          = man/files/man1/qelectrotech.1.gz
311c358,360
<         INSTALLS += desktop mime_package icons man examples appdata
---
>         INSTALLS += desktop mime_package man examples appdata
>         INSTALLS += icons16apps icons16mime icons22apps icons22mime icons32apps icons32mime icons48apps icons48mime icons64apps icons64mime 
>         INSTALLS += icons128apps icons128mime icons256apps icons256mime
318c367
< 
---
>  

Maybe this helps others to avoid unintentionally deleting files of other software under /usr/local/man and /use/local/share/icons when they run "make uninstall" of qelectrotech.

Regards
Tom

Re: make uninstall also removes contents other than from qelectrotech

Hi Tom, see my Debian files for packaging deb.
Patching .pro breaks my all packaging workflows.

Thanks for your feedback Tom. Users want compile it and install it can use your patch.

Post's attachments

Attachment icon 01_pro.diff 3.25 kb, 5 downloads since 2026-05-30 

Attachment icon qelectrotech-data.install 68 b, 5 downloads since 2026-05-30 

Attachment icon qelectrotech-examples.install 32 b, 5 downloads since 2026-05-30 

Attachment icon qelectrotech.install 1.85 kb, 6 downloads since 2026-05-30 

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

Re: make uninstall also removes contents other than from qelectrotech

Tom789 wrote:

Dear All,

I am running Linux Mint. A few moths ago I have downloaded the source code of qet 0.100 compiled and installed it, modified part of the source code to fix some issues, uninstalled the old installation and re-installed it.


Regards
Tom

Why don't use branch master, with new very cool features?

git clone --recursive https://github.com/qelectrotech/qelectrotech-source-mirror.git qet
cd qet
mkdir build && cd build
qmake CONFIG+=debug ../qelectrotech.pro
time make -f Makefile.Debug -j$(nproc)

Regards,
Laurent

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !

5 (edited by Tom789 2026-05-31 11:00:58)

Re: make uninstall also removes contents other than from qelectrotech

Hi Laurent,

scorpio810 wrote:

Why don't use branch master, with new very cool features?

I need a stable environment, that allows me to draw high quality schematics and export them as vector graphics. To this purpose I downloaded the source code of qet 0.100 and introduced some local modifications to the source code.

E.g. I modified the CapStyle and JoinStyle of lines, rectangles, polygons in the following files ...

sources/editor/graphicspart/partpolygon.cpp
sources/qetgraphicsitem/element.cpp
sources/qetgraphicsitem/qetshapeitem.cpp
sources/factory/elementpicturefactory.cpp
sources/editor/graphicspart/partline.cpp
sources/editor/elementview.cpp

... to get sharp corners of rectangles and polygons (up to a certain miter limit) and rounded ends for single lines.

On the one hand, I know, that qet does not have many development resources and that I cannot expect these modifications to be officially introduced. On the other hand, I do not have the time to tweak each new development version. So, as a compromise I focus on new released official versions.

Regards
Tom

BTW: Sorry, that my patch breaks your packaging workflow. As I said, I am not a Qt expert. Maybe there is another way to "fix" the qelectrotech.pro file so that a win-win situation can be established? Unfortunately, I do not know how this can be done :-(.

Re: make uninstall also removes contents other than from qelectrotech

Hi tom,
for local installation use /usr/loca/ and don't use /usr/share/ it's distro specific path for us distribution.

"Le jour où tu découvres le Libre, tu sais que tu ne pourras jamais plus revenir en arrière..."Questions regarding QET belong in this forum and will NOT be answered via PM! – Les questions concernant QET doivent être posées sur ce forum et ne seront pas traitées par MP !