[aur-general] My AUR4 migration workflow

Johannes Dewender arch at JonnyJD.net
Fri Jun 12 08:37:29 UTC 2015

> > > Generate .SRCINFO for all packages:
> > >
> > > $ while read p; do git -C "$p" filter-branch -f --tree-filter
> > > 	"test -f .SRCINFO || mksrcinfo"; done < ../pkgs
> >
> > Don't do it like that. This creates a .SRCINFO from the first
> > PKGBUILD of the package and doesn't update the file for later
> > commits anymore.
> > So your .SRCINFO is outdated in all following commits.
> >
> > The problem was in one of the scripts linked in the wiki
> > but is fixed there, too.
> >
> > So don't test for .SRCINFO, *always* run mksrcinfo.
> Hmm. Instinctively I'd have agreed, but I can't reproduce this.
> I think git filter-branch actually checks out each "vanilla" commit
> from the original branch to apply the given changes, and doesn't base
> them on the already-changed commits.

I actually didn't know that and it does sound very weird.
If the next commit is not based on the previous commit
this can potentially "revert" the change made in the previous commit.
Although it is difficult to construct a case where this is a problem.
(like checking if the commit is the root and only making the change in
that case)

Thanks for the tests and information.
I didn't test this myself, but I was sure just running mksrcinfo works
as expected and I was afraid that checking for the file can be *very*
wrong. And like mentioned, I was pretty sure filter-branch had to work
like I imagined.

Like Eli said: There is also no need for the test.
mksrcinfo is fairly lightweight (only getting info from PKGBUILD) and
doesn't build the whole package or similar.
(which is probably the other fear that makes people test for .SRCINFO
before creating it)


More information about the aur-general mailing list