On 2021/09/14 17:57, Simon Lees wrote:
But in summary getting a new package to users is generally a multi day process and so you wind up with various dates depending on which part of the process you look at but we consider the date in the email to be the unique identifier for each snapshot.
--- And where in the release is that date recorded? The cpeid date is the only date recorded in a release, so any tool that looks at the release only has that date available. Yet from what you say, the date on the email is somewhat unrelated to the version date listed inside the "repomd.xml" file. Usually, if you run a program, there is often a version option to display the current version -- but that comes from within the object. Anyone looking at one of the releases on a DVD won't necessarily have the release email, but they will have the date that is internal to repomd.xml. Is there anyway the release date could be gleaned from the repomd.xml to be used as the date in the repo release notification? This could be shorter as you don't need the primary.xml filename, but, a parse script like: # find TW data in repomd file; first only cpeid-date, # but 2nd parm as HASH of wanted dats as pointers to answer buffs # 2nd parameter is hash; currently only 1 useful item # 1) "primary_locp" - a pointer to the name of # the primary file for this repomd file sub find_repo_data($;$) { my $p = shift; my $repomd_file = shift; # alternate data pointers my $altdp = @_ ? HASH shift : {}; my $num_altdp = 0+@{[keys %$altdp]}; my ($primary_locp, $distro_date); #TPe "RD:%s)",$repomd_file; open(my $repo_h, "<", $repomd_file) || die P "Err $! opening %s", $repomd_file; while(defined($_=<$repo_h>)) { chomp; if (m{^\s+<distro cpeid="[^"]+?:(\d{8})">}) { $distro_date=$1; #TPe "got cpeid($1)"; last unless $altdp; } elsif ($primary_locp = $altdp->{primary_locp} and m{<location href="(repo[^"]+primary\.xml\.gz)"}) { $$primary_locp = $1; last unless --$num_altdp; } } $distro_date; # returns undef if no date } # find TW cust product engid (date) (only works for TW) sub get_tw_cpeid($) { my $p = shift; $p->find_repo_data($_[0]); } Wouldn't be hard to syncronize the email date w/the internal date