You are not logged in.

#1 2014-03-21 17:47:05

bhpirkle
Member
Registered: 2014-02-03
Posts: 12

crover - generate OS version numbers for Arch Linux

Arch is a rolling distro, but did you ever wish it still had release numbers? So you could check what "version" you currently have installed, and upgrade to the latest "version" if necessary, with a reasonable delay between versions?

Of course you didn't. No sensible person would want to attach pseudo-version numbers to a rolling distro. roll smile

https://code.google.com/p/crover/
https://aur.archlinux.org/packages/crover/

crover returns a version number for Arch Linux based on time elapsed since the distro's initial release (March 11, 2002). The number format is X.Y, with X being years and Y being subdivisions of the current year. By default, the version number is generated for the current date with a subdivision size of one week.

As of this writing, the current version is Arch Linux 12.1. In other words, Arch is 12 years and 1 week old.

Offline

#2 2014-03-21 18:02:49

HalosGhost
Forum Moderator
From: Twin Cities, MN
Registered: 2012-06-22
Posts: 2,097
Website

Re: crover - generate OS version numbers for Arch Linux

Hmm, you could actually make this somewhat more relevant to actual update practices if you wanted. Were I to try to accomplish such a task, I would figure out a way to check and see if all the official repos are up-to-date (or just if all the packages the user has installed are up-to-date with `checkupdates`). Then, take the number of seconds elapsed since Arch's release till the last update (which brought that rig up-to-date).

Then, you could grab the user's list of currently installed packages with pacman and take a hash of it. And, by concatenating those two figures together, you could get some semblance of a "version" number. For example, mine would be something similar to the following:

378691200.4c41d609

Not to mention, with this calculation, it would not be difficult to format the time part of the version in a variety of ways. May be worth thinking about smile

All the best,

-HG

Offline

#3 2014-03-21 19:11:53

bhpirkle
Member
Registered: 2014-02-03
Posts: 12

Re: crover - generate OS version numbers for Arch Linux

Coolness, will consider. I like the hash idea.

Offline

Board footer

Powered by FluxBB