gitpkgv class not returning hash if sources are not already fetched
Hi, I have a couple of projects which I'm migrating from kirkstone to scarthgap; previously some of my recipes (with sources fetched from a git remote) used the SRCPV to dump the current hash of the project to a file which gets then installed in the root fs. This worked both when SRCREV was set to a certain hash or to AUTOREV. Since it's now deprecated, I switched to inheriting from gitpkgv as I hoped it would recreate the same values; however the GITPKGV variable will be set to "None" if the sources are not already fetched in the downloads folder. Is this expected? If I'm understanding it correctly this is due to the "if not os.path.exists(url.localpath):" check in the gitpkgv bbclass, but is that really necessary?
Thanks,
Lorenzo
Hi Lorenzo,
how would you expect to be able to have access to the hash of the project if you haven't downloaded the repo itself previously?
Ciao
--
Marco Cavallini | KOAN sas
Bergamo - Italia
embedded software engineering
https://KoanSoftware.com
Hi Marco,
you're right, however if I can recall it correctly SRCPV used to be set to the right hash even before fetching; in fact, there's a loop in the gitpkgv bbclass which contains "for name, rev in url.revisions.items():" and already has a valid rev, except that then it also checks for the presence of the cloned sources. On the other hand, how should I use the gitpkgv class on a clean build where I still have not fetched any source?
Thanks,
Lorenzo