WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: A possible solution to Version Control in TCL  (Read 1896 times)

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 405
A possible solution to Version Control in TCL
« on: November 07, 2020, 05:05:15 AM »
Just posting thinking that this subsection is correct. Correct me if I am not.

MD5 Salting

Yes. We could use that. What I actually try to say is that a TCL User downloads some files as part of getting the tcz. They are :
1. The tcz itself
2. The .tcz.dep file (may not exist)
3. The .tcz.md5.txt file

As we don't actually prefer modifying the tcz, I recommend to salt the md5 hash.
What we do is that add 4 (four) alphanumeric characters(which are the version numbers) to the end of the hash in the md5.txt (not to the end of the file).
While scripting or verifying, we could just remove them using command "cut -c 1-32" (MD5 hashes are 32 characters long) to get the original hash.
Well, this includes some more scripting and I am very happy to help with that. This solves the problem of version control  and also (maybe) speeds up the tce-update.

TL;DR - By adding version string to end of MD5 Hash in the .md5.txt file, we could actually get the version of a tcz and update the tcz without getting the .info file of the tcz.

And also, (I can't actuually wait for the announcement from TCL Team) when is TCL v12 released ?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: A possible solution to Version Control in TCL
« Reply #1 on: November 07, 2020, 02:08:53 PM »
The md5sums are already fetched in one file, md5.db.gz.
The only barriers that can stop you are the ones you create yourself.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 405
Re: A possible solution to Version Control in TCL
« Reply #2 on: November 07, 2020, 11:08:05 PM »
And by adding the version numbers into the repo's md5.db.gz, we could check the version of all tczs in the tce dir.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11050
Re: A possible solution to Version Control in TCL
« Reply #3 on: November 08, 2020, 02:44:34 AM »
Why? The version number is only for the user. The md5sum is used by the update check.
The only barriers that can stop you are the ones you create yourself.

Offline Sashank999

  • Sr. Member
  • ****
  • Posts: 405
Re: A possible solution to Version Control in TCL
« Reply #4 on: November 08, 2020, 08:29:39 AM »
I am saying tht we don't need to download md5.db.gz.

We actually create a version.db.gz which has only two columns - tcz name and its 4 character version string. We can have less load on the repo by replacing 32 bit hashes with the version.db.gz. It will look so tiny !

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1270
Re: A possible solution to Version Control in TCL
« Reply #5 on: November 08, 2020, 10:18:00 AM »
What’s the point, unless we keep multiple versions, and version dependency, I don’t understand any benefit.

 In a lot of cases, there is not a version change of the underlying package, but just a recompilation, or repackaging of the same extension.  So the version would just be a package version.