SliTaz SliTaz Forum

You are not logged in.

#26 2017-08-29 13:17:42

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Package management and orphaned packages

Hi there,

2Filou,

I see it from time to time: this forum engine is not intended to share your scripts. Symbol "backtick" here have special meaning: text inserted between two backticks becomes monospaced and the entire backticks become hidden. It will break many of shell scripts, definitely.

I even can't make it visible in my post, so here image from Wikipedia:

220px-Backquote.png

You could use another (recommended) script syntax for subshell code, leaving backticks for old-fashioned bearded shell-script programmers (oh, sorry, your avatar is bearded Fry ☺ nothing personal):

[c]a=$(date)[/c]
I've put your script (slightly formatted, as I like) here:

https://gist.github.com/lexeii/9d3b2eb3cc94a099942a4ed30e6c8ec8

Offline

#27 2017-08-29 18:03:31

Filou
Moderator
Registered: 2011-05-03
Posts: 256

Re: Package management and orphaned packages

Thanx a lot for the lesson of "up-to-date-and-leading-edge-shell-programming" to an old-fashioned beared shell-programmer .... who is (which is worse) apart from that an autodidactic amateur (and really wears a beard)...             ;-)

No, honestly, thank you, I was not aware of that simpler and more elegant version of shell script... helps a lot (for all the other scripts where I am angry about not getting the results I intended...)

Your upload on github looks more than what I did myself (all the indents were removed in the post, which is why it looks extra-ugly), apart from the a=$(date) and the distributed yad options...

Do you know by the way, why the uploads are not accepted by the forum, although they are text files which should be permitted?

Thanks again and best regards,

Filou

Offline

#28 2017-08-29 21:00:35

lexeii
Administrator
Registered: 2012-03-21
Posts: 1,853

Re: Package management and orphaned packages

About backticks/backquotes versus dollar-parentheses you can find many notes in the internet, for example, this.

And this is not means that I'm an advanced shell-programmer. Nope ☺

Guthub's gist is not a repository. It's the place to share thoughts and to collaborate. So I think it's normally.

why the uploads are not accepted by the forum

I'll start from afar. SliTaz network consists of 3 servers: Tank, Mirror, and Pangolin. This forum is on Pangolin, and better I'll not touch it. There's another admins.

In forum settings that available for me (I'm one of forum admins too), I not found any upload settings. AFAIK, this permission-related question was already fixed few years ago. But looks like it broke again?

Best regards

Offline

#29 2017-09-01 15:01:12

Filou
Moderator
Registered: 2011-05-03
Posts: 256

Re: Package management and orphaned packages

While thinking of possible improvements of my rudimentary tries I just recognized that I have somehow been slightly on the wrong trail.

My idea was to set up some sort of "tracking mechanism" in order to distinguish intentionally installed packages from the dependencies installed with them in a "database" / file.

Now I realized that this is absolutely unnecessary:

Presuming, that the user has a system set up to his wishes (otherwise the tazorphan_yad might help to identify those packages that might not be necessary on the system but have been installed nonetheless), all we need is a routine that checks, if NEW orphancies popped up after removal of a package.

This is what I set up now in the script I put on github (thanx to Alekseys example) under

https://gist.github.com/F1lou/c7cb839dfed6e86268045bba9ca86685

You just invoke it by its name (presuming you put it somewhere on your drive, cd'ed there in the shell, chmod'ed it executable) and the package to be removed:

root@slitaz:/mnt/Scripts#./remorphan asunder

Offline

Registered users online in this topic: 0, guests: 1
[Bot] ClaudeBot

Board footer

Powered by FluxBB
Modified by Visman

[ Generated in 0.017 seconds, 12 queries executed - Memory usage: 1.54 MiB (Peak: 1.77 MiB) ]