On Sat, 2023-12-30 at 22:12 +0300, Hakan Bayındır wrote:

> What is the nature of these scripts? Can these be used by the users, too?

The scripts are mostly diagnostic code snippets I add to issue comments 
instructing the users to execute them and show me the output.

It would be great (to save my time and user questions) to not manually 
construct them for every user and issue
but parse the BiT config in ~/.config/backintime/config on the user's side to 
extract required paths and settings.

Example snippets are:

    # Show system log entries
    journalctl --since=today | grep -i backintime

    # Estimate snapshot deduplication by counting the number of hardlinked 
files in a folder and all its subfolders (recursively):
    find . \! -type d -links +1 -printf . | wc -c

    # Test systray icon support: What is the output of this snippet (should be 
True otherwise the file is corrupted)?
    cd /usr/share/backintime/common
    python3 -c "import sys; sys.path.insert(0, 
'/usr/share/backintime/plugins/'); import systrayiconplugin; p = 
systrayiconplugin.SysTrayIconPlugin();
    import snapshots; s = snapshots.Snapshots(); print(p.init(s))"

    # Check current Qt5 theme on Wayland:
    pkexec env QT_QPA_PLATFORM=wayland-egl XDG_RUNTIME_DIR=$XDG_RUNTIME_DIR 
XAUTHORITY=$XAUTHORITY python3 -c "from PyQt5.QtGui import QIcon; from
    PyQt5.QtWidgets import QSystemTrayIcon,QApplication; app = 
QApplication(['']); print('isSystemTrayAvailable: ' +
    str(QSystemTrayIcon.isSystemTrayAvailable())); print('Theme name: ' + 
QIcon.themeName()); print('has theme icon <document-save>: ' +
    str(QIcon.hasThemeIcon('document-save'))); print('themeSearchPaths: ' + 
str(QIcon.themeSearchPaths())); print('fallbackSearchPaths: ' +
    str(QIcon.fallbackSearchPaths())); print('fallbackThemeName: ' + 
str(QIcon.fallbackThemeName()))"



>  Maybe creating a folder inside the primary repo (e.g.: support, 
> support-scripts, tools, etc.) and putting them there can help. 

Yes, I guess this is better than another repo because some scripts could even 
be used for unit testing
(eg. above script to count the number of hardlinks in snapshot folders)



> Debian and a couple of other packages have dedicated, CLI based bug report 
> tools.
> Maybe we can develop something which can take the burden from both parties 
> and accelerate the reporting and diagnose procedures.

Yes, that would be great!

What I observe is that diagnostics always is a "ping pong game" and requires me 
to collect and adapt code snippets, post them to ask the user,
the user has problems to execute it or the result is unexpected and I use the 
next script to ask for more input.
This takes my and the user's time and if the user may get bored or reluctant to 
answer at some point.

I have a dream: ;-)

A single script that
- the user can download and executes just once
- collects all required diagnostics information into a file
- anonymizes sensitive info like path names

The user then just needed to upload the file instead of pasting it into 
comments (making them lengthy to scroll).

We already have the "--diagnostics" option in BiT which currently reports 
"only" OS, installation and general settings.

We could add a the code snippets as bash/shell script or even extend above 
option (or add another option like "--generate-bug-report-file").

_______________________________________________
Bit-dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/bit-dev.python.org/
Member address: [email protected]

Reply via email to