Discussion:
[Msys2-users] msys2/mingw "time-machine"
Rainer Schuetz
2017-05-10 13:22:07 UTC
Permalink
Hi,

I occasionally wonder if it would be possible to move back to consistent sets of older releases of msys2/mingw and can't really imagine a way of doing it with binaries. Is there any?

Oth, I do think checking out older versions of the MINGW-packages would allow to build coherent sets of libraries. So in a way one would be using git to control versioning. But how about toolchains? If I understand correctly you build newer compilers from older ones. But is there also a way back?

Thanks for an explanation!
.r.
David Macek
2017-05-10 14:32:12 UTC
Permalink
Post by Rainer Schuetz
Hi,
I occasionally wonder if it would be possible to move back to consistent sets of older releases of msys2/mingw and can't really imagine a way of doing it with binaries. Is there any?
Since the actual packages aren't really being deleted when superseded, one could just save the pacman .db files to get the set of up-to-date packages at that time. I can't say if the old packages will stay up indefinitely.
Post by Rainer Schuetz
Oth, I do think checking out older versions of the MINGW-packages would allow to build coherent sets of libraries. So in a way one would be using git to control versioning. But how about toolchains? If I understand correctly you build newer compilers from older ones. But is there also a way back?
AFAIK there's no reason why you couldn't bootstrap an older toolchain using a newer toolchain. But this is not my area of expertise.
--
David Macek
Rainer Schuetz
2017-05-10 15:16:32 UTC
Permalink
Post by David Macek
Since the actual packages aren't really being deleted when superseded, one could just save the pacman .db files to get the set of up-to-date packages at that time. I can't say if the old packages will stay up indefinitely.
Ah, excellent. I should have thought of that. Six files, right mingw32/64 and msys. They are binaries, right, or just some compressed format? Are their sources under version control or would it be possible to somehow generate older versions? I kind of dream of git tags, e.g. at important gcc or qt switches...

Best
.r.
Mario Emmenlauer
2017-05-11 07:49:43 UTC
Permalink
Hi Rainer,
Post by Rainer Schuetz
Post by David Macek
Since the actual packages aren't really being deleted when superseded, one
could just save the pacman .db files to get the set of up-to-date packages at
that time. I can't say if the old packages will stay up indefinitely.
Ah, excellent. I should have thought of that. Six files, right mingw32/64 and
msys. They are binaries, right, or just some compressed format? Are their
sources under version control or would it be possible to somehow generate older
versions? I kind of dream of git tags, e.g. at important gcc or qt switches...
git would certainly work. Another way of doing this would be hard-
links in a directory tree. For example, rsync has everything built
in to achieve a "time machine" like snapshot. If you have rsync
access to the pacman repo server, its actually just a few lines of
bash:

cd /your/local/repo/mirror/
LASTFOLDER=$(ls -1|tail -n1)
NOWFOLDER=$(date +%s)
rsync --archive repo.msys2.org:/repo/path/ \
--link-dest="${LASTFOLDER}/" "${NOWFOLDER}/"
rm -f current
ln -s "${NOWFOLDER}" current


You would get one folder every time you run the script. This folder
would contain the *full* repository at that point in time. And since
rsync uses hardlinks for unchanged files, you require just as much
disk space as the *new* or *modified* files will need. You could make
this a daily cron job, for example.

In your pacman repo config, just pick a specific folder to stick to
that time/date, or use "current" to get the newest.

All the best,

Mario Emmenlauer


--
BioDataAnalysis GmbH, Mario Emmenlauer Tel. Buero: +49-89-74677203
Balanstr. 43 mailto: memmenlauer * biodataanalysis.de
D-81669 München http://www.biodataanalysis.de/
David Macek
2017-05-11 08:19:00 UTC
Permalink
Post by Rainer Schuetz
Post by David Macek
Since the actual packages aren't really being deleted when superseded, one could just save the pacman .db files to get the set of up-to-date packages at that time. I can't say if the old packages will stay up indefinitely.
Ah, excellent. I should have thought of that. Six files, right mingw32/64 and msys. They are binaries, right, or just some compressed format? Are their sources under version control or would it be possible to somehow generate older versions? I kind of dream of git tags, e.g. at important gcc or qt switches...
It's a .tar.xz and it's possible to generate it from a set of package files (see `repo-add`).
--
David Macek
Loading...