Suggestion to add build/revision number to "pkg stats"
Arto Pekkanen
isoa at kapsi.fi
Wed Sep 23 09:40:54 UTC 2015
I have a better solution: just expose the start date of repository build in pkg stats.
Something like this:
Local package database:
Installed packages: 780
Disk space occupied: 6 GiB
Remote package database(s):
Number of repositories: 1
Packages available: 24561
Unique packages: 24561
Total size of packages: 44 GiB
Repository build started at: 20150923T000000Z
All of the methods (svn, git, etc) afaik support checking out the closest revision by date. I know not many people use this, but still.
See here: http://svnbook.red-bean.com/en/1.6/svn.tour.revs.specifiers.html
With this information I could simply pkg update, then see if repository was updated (by grepping pkg update output OR by checking pkg database checksum) AND if so, just do 'svn checkout -r <repository build date from pkg stats> ...' on the branch the repository is based on. After this the ports tree would be in sync with the repository.
Sometime ago I asked if it would be possible to determine the start date of repository build, but afaik this question was never answered.
If this feature was implemented, I could finally finish my software project. I am trying to create an alternative to poudriere, which does ONLY builds those packages which have custom build options, and would merge in packages (that do not need to be built) from base repository. The goal of my project is to save tremendous amounts of time when building a custom repository. Currently I've decided to halt the development, since I cannot programmatically guarantee that I can get ports in sync with the base repository, which would mean that my software would end up botching the repository build every now and then.
On 23.9.2015 1:06, Baptiste Daroussin wrote:
> On Fri, Sep 18, 2015 at 09:43:51PM +0200, Simon Wright wrote:
>> On 16/09/2015 22:58, mfv wrote:
>>
>> snipped
>>
>>> The build number is only available when the build begins, but the
>>> package upgrade is not possible until the build process ends many
>>> hours later. Moreover, it is also possible to update the port tree to
>>
>> snipped
>>
>>> A simple solution would be to have the build number available as part
>>> of a port upgrade and made available in "pkg stats". Its output
>>> could look like this:
>>>
>>> Local package database:
>>
>> snipped
>>
>>> Even better would be an argument to "pkg stats" that would only output
>>> the revision number, say "pkg stats -n"
>>>
>>> After running "pkg upgrade", it would then be an easy to extract the
>>> build number of that particular upgrade and then sync the ports tree to
>>> that number using subversion or, my favourite, svnup.
>>
>> +1, this information would be very useful for me. It might be
>> necessary to be able to specify a specific repository as well as the
>> local/remote switch; I have two remotes configured, my one built by
>> poudriere and also the "latest" freebsd.org repo.
>>
>> Simon.
>
> This is a bit more complexe than that as the ports tree can be checked out from
> portsnap, svn, git etc (aka different id).
>
> The right way would be to package the ports tree itself along with other
> packages so if you need to build something: pkg install ports and you are always
> 100% sure to be on good ports tree.
>
> But we are not there yet :(
>
> Best regards,
> Bapt
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/freebsd-pkg/attachments/20150923/987121e3/attachment.bin>
More information about the freebsd-pkg
mailing list