WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Proposal for upgrading .tcz on .tcz.dep changed  (Read 11387 times)

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #60 on: March 29, 2023, 12:57:17 PM »
Hi GNUser,
In my opinion in the current state of TC there is no need in calling check_dependencies() in tce-update. I propose You to write the pull-request for commenting out of the 2 calls of check_dependencies().

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #61 on: March 29, 2023, 01:25:38 PM »
... i don't understand whats happening with this!! ... this is not working.
Hi patrikg,
Thank You, very nice description of shell scripting! By the way I think the leading "s" in the word "shell" may be omitted, for best descriptivity and saving some internet traffic ;-)

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #62 on: March 29, 2023, 01:29:22 PM »
Hi jazzbiker. I disagree with commenting-out the calls to the function. If a naive user upgrades system using only tce-update, .dep file is re-downloaded for every extension being upgraded. The check_dependencies function provides the valuable service of downloading any missing dependencies in this scenario.

The value that update-everything adds is that it checks .dep files of all local extensions--those that are about to be upgraded as well as those that are not. It is only in this special scenario (where all .dep files have been checked and any missing dependencies taken care of) that check_dependencies() does nothing except waste CPU cycles and your time.

I created a pull request in GitHub to add --skip-dependency-check to tce-update. If/when the pull request is merged and the new tce-update becomes part of the base system, I will change line 29 in update-everything from tce-update to tce-update --skip-dependency-check and the script will become a little bit faster.
« Last Edit: March 29, 2023, 01:37:29 PM by GNUser »

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 723
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #63 on: March 29, 2023, 01:40:38 PM »
Hi jazzbiker, thx for your thoughts.
And omit the "s" is what it is.*lol*

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #64 on: March 29, 2023, 01:45:16 PM »
Hi jazzbiker. I disagree with commenting-out the calls to the function. If a naive user upgrades system using only tce-update, .dep file is re-downloaded for every extension being upgraded. The check_dependencies function provides the valuable service of downloading any missing dependencies in this scenario.

Hi GNUser, check_dependencies() provides only single-level dependency fetching, opposite to tce-load, utilized by "tce-audit fetchmissing" (by the way we mentioned it earlier in this thread), so life of naive user is sad and unpredictable like trying to write scripts in one widely used language, until he'd got the good news about Your excellent update-everything!
« Last Edit: March 29, 2023, 01:56:35 PM by jazzbiker »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #65 on: March 29, 2023, 01:49:50 PM »
i don't understand whats happening with this!!
Haha, I've been there before. In situations like this, I think it's best to just try a different approach. Fortunately, in this case the cat+echo dynamic duo has already won the day.

Sometimes, if you are convinced you understand all the nuances and the outcome is still not what you'd expect, it may be that you found a bug in the software.
« Last Edit: March 29, 2023, 02:08:48 PM by GNUser »

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #66 on: March 29, 2023, 02:07:35 PM »
Hi GNUser, check_dependencies() provides only single-level dependency fetching, opposite to tce-load, utilized by "tce-audit fetchmissing" (by the way we mentioned it earlier in this thread)
Good point, but right now I'm just interested in winning the small battle of optimizing update-everything. For this, all I need is a way to opt-out of check_dependencies(). What you are suggesting would involve a bigger war that I don't want to fight today.

so life of naive user is sad and unpredictable
Yes, it is. It's not easy being a naive user.

P.S. Would TCL developers like me to create a pull request to add update-everything to base system? With the insights provided by jazzbiker and Rich--not to mention the freakish power of awk--the script has morphed into something quite fast and reliable.

Offline patrikg

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 723
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #67 on: March 29, 2023, 02:13:16 PM »
I am now in school for learning more about IT Security.
How we now can defeat the security problems like not using username and passwords only for logging in.
And more using 2FA or using some kind of hardware token like Yubikey.

Now we have some lab's to do, and using tools like john.
And  just run that command spits out some usage: like this.
John the Ripper password cracker, version 1.8.0
Copyright (c) 1996-2013 by Solar Designer
Homepage: http://www.openwall.com/john/

Code: (bash) [Select]
Usage: john [OPTIONS] [PASSWORD-FILES]
--single                   "single crack" mode
--wordlist=FILE --stdin    wordlist mode, read words from FILE or stdin
--rules                    enable word mangling rules for wordlist mode
--incremental[=MODE]       "incremental" mode [using section MODE]

And then just try to load the man page with same program spits out.

Code: (bash) [Select]
OPTIONS
       All the options recognized by john start with a single dash (`-').  A summary of options is included below.

       -external:MODE
              Enables an external mode, using external functions defined in ~/john.ini's [List.External:MODE] section.

       -format:NAME
              Allows  you to override the ciphertext format detection. Currently, valid format names are DES, BSDI, MD5, BF, AFS, LM.


And now to the first line in the options section, says only single dash.

And now see how many you need to provide when just running the command...., two dash or single dash (like hamlet to be or not to be)


Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11702
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #68 on: March 29, 2023, 02:16:57 PM »
Hi GNUser
If an extension does not have a  .md5.txt  file included, do you still update the  .dep  file?
For example:
Someone wants to use xyzzy.tcz from TC10 which depends on libffi.tcz (libffi.so.6)
They are running TC13 and that newer xyzzy.tcz depends on libffi.tcz (libffi.so.7)
So they modified their .dep file to include  libffi6.tcz  instead of  libffi.tcz  for backward compatibility.

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #69 on: March 29, 2023, 02:20:46 PM »
Hi GNUser
If an extension does not have a  .md5.txt  file included, do you still update the  .dep  file?
Hi Rich. No. update-everything does not touch foo.tcz.dep if local foo.tcz.md5.txt is missing:
Code: [Select]
elif [ ! -f $OPTIONALDIR/$extension.md5.txt ]; then
continue # if user deleted local md5.txt, it's likely a custom extension--leave it alone

Offline jazzbiker

  • Hero Member
  • *****
  • Posts: 934
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #70 on: March 29, 2023, 02:36:47 PM »
Hi GNUser,

You cheating? How can You preliminarily insert into Your script the workaround on the bug which Rich will find few hours later?

Offline GNUser

  • Wiki Author
  • Hero Member
  • *****
  • Posts: 1530
Re: Proposal for upgrading .tcz on .tcz.dep changed
« Reply #71 on: March 29, 2023, 02:42:43 PM »
Haha. Yes. I broke into Rich's wizard tower and stole his crystal ball, which has been working quite well. Three days ago I already knew he would ask this question.