Heh, no worry, I know it can be complex at first
I started with explaining how the packages are layed out in launchpad, before realizing that was too complex for this project. Let’s start simple and easy. I asked to get the 3 desired projects to be imported automatically in our beta git package repo…
You have right now: https://code.launchpad.net/~usd-import-team/ubuntu/+source/gnome-themes-standard/+git/gnome-themes-standard for instance. This is the whole upstream/debian/ubuntu imports of every commits and package version for this project.
Similarly, for GNOME Shell: https://code.launchpad.net/~usd-import-team/ubuntu/+source/gnome-shell/+git/gnome-shell/+ref/ubuntu/bionic-devel
The GTK+3.0 import is under way. It will be available at https://code.launchpad.net/~usd-import-team/ubuntu/+source/gtk+3.0/+git/gtk+3.0/ once imported
After giving it some thoughts (this is why I didn’t answer on it right away), I think the tool shouldn’t bother with a git repo or anything and go simple (maybe later, it can warn if there is a new version available during package build, but let’s be practical). I would just import whatever is new given a directory. It will import this directory and the subdirectory contents.
The fact to only import directories enable as well, doing let’s say a new GNOME Shell release (not uploaded yet) adding new CSS properties, to prepare the theme at the same time before it’s pushed to ubuntu, so that both can be tested on developer’s machine.
If I may suggest a layout for the 3 way merge diff:
- The tool would take a directory which is the “new version”
- We have stored the old upstream unpatched version in an upstream/ directory in the repo
- Then, it will make the diff, file by file between the new version, the upstream/ directory content, noticing files added, files removed, files changed (let people choose their own diff tool). We use the 3 way merge diff as stated above. This is where when the developer update the new theme based on the changes he sees.
- Then, the upstream directory is rm and the input directory is copied over and git add over the new upstream/ directory.
That enables to keep the current “upstream” version around for future updates and updating our theme knowing what upstream has changed.
Does it make sense? I suggest if you haven’t already that you play with meld with those 3 files on the command I gave previously so that you can get a feeling on what it’s like, that will even maybe trigger new and better ideas!
Of course, the build system will completeliy ignore the upstream/ directory from the repo, it’s just here for reference.
I think the easiest may be to start with GNOME Shell itself, imagining we import the
data/theme directory: https://git.launchpad.net/~usd-import-team/ubuntu/+source/gnome-shell/tree/data/theme?h=ubuntu/bionic-devel.
I has of course some files you need to ignore like the
meson.build one and the generated
gnome-shell*.css ones corresponding to
gnome-shell*.scss source. But is has assets we want to copy (and modify) like the svg, and of course, the sass files in the subdirectory
Keep me posted if you need any help!