Re: [PATCH] Use a better filename when creating a snapshot

Xavier Bachelot <[email protected]> Fri, 12 Oct 2018 16:37:16 +0200
Newsgroups gmane.comp.video.xine.devel
Message-ID <[email protected]>
On 2/19/17 1:10 PM, Xavier Bachelot wrote:
> On 13/02/2017 12:51, Mikko Rasa wrote:
>> On 13.02.2017 12:29, Petri Hintukainen wrote:
>>> su, 2017-02-12 kello 23:17 +0100, Xavier Bachelot kirjoitti:
>>>> Hi,
>>>>
>>>> As it seems neither Petri nor Torsten, the 2 active developers, have
>>>> enough privileges to make a full release with a proper tarball
>>>> uploaded
>>>> to the website, I'm leaning toward using snapshots for Fedora.
>>>> However,
>>>> the generated tarball name is not unique enough for my use, so I came
>>>> up
>>>> with the attached patch, which will generate a tarball named
>>>> xine-lib-"version"-"date_of_changeset"hg"changeset_number".tar.xz
>>>> rather than
>>>> xine-lib-"version"hg.tar.gz
>>>>
>>>> Please review.
>>>
>>> I would also check for local changes / commits and add "dirty" etc. to
>>> the version suffix.
>>>
>>> Maybe something like
>>>
>>> HG_DIRTY=`hg out 2>/dev/null | grep -q changeset || hg sum | grep -q
>>> 'commit:.*modified' && echo "+dirty"`
>>
>> An additional thought about this.  Such dirty tarballs are not really
>> appropriate for general distribution.  Maybe it would be too harsh to
>> outright refuse to generate a tarball (it may have some uses during
>> development), and marking it as dirty is definitely appropriate, but a
>> public release should always be made from a clean source tree.
>>
> I like the 'dirty' idea, and I agree with Mikko's comment.
> The purpose of this patch is exactly that, allow to easily build a
> tarball and thus easily generate a binary package from it.
> 
> What about this patch ? I just took what Petri suggested for 'dirty' and
> added it.
> Feel free to remove the date part and change the dash separator to a
> plus, or anything else that would fit.
> 
> Regards,
> Xavier
> 
Hi,

Reviving this, as I once again need to build from an hg snapshot.
Let me know what you think of this patch.

Regards,
Xavier