[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: stable says master


Le 31/07/2025 à 12:40, Bruce Steers a écrit :

    line 8704 of main/configure

      if test "x${gb_detect_git}" != "x"; then
         gb_vcs_branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null`
         gb_vcs_hash=`git rev-parse --short HEAD 2> /dev/null`
       else
         gb_detect_svn=`which svn 2> /dev/null`
           if test "x${gb_detect_svn}" != "x"; then
             gb_vcs_hash=`svn info --show-item last-changed-revision
    2> /dev/null`
           fi
       fi


    the 1st git command "git rev-parse --abbrev-ref HEAD 2> /dev/null"
    is getting the branch name.

    not sure what to do about it though?
    can configure detect if it is a OBS compile happening?
    if it can then it will only be either master or stable so we can
    react to version ending in .99 or not
    This assumes variable $OpenSuseInstaller is 1 if OBS or 0 in any
    other circumstance.


      if test "x${gb_detect_git}" != "x"; then
         gb_vcs_branch=`git rev-parse --abbrev-ref HEAD 2> /dev/null`
         gb_vcs_hash=`git rev-parse --short HEAD 2> /dev/null`
         [ ${gb_vcs_version##*.} != "99" -a $OpenSuseInstaller -eq 1 ]
    && gb_vcs_branch="stable" # here change to stable is revision is
    not .99 and is OBS compilation.
       else
         gb_detect_svn=`which svn 2> /dev/null`
           if test "x${gb_detect_svn}" != "x"; then
             gb_vcs_hash=`svn info --show-item last-changed-revision
    2> /dev/null`
           fi
       fi


    Respects
    BruceS


It's a workaround i admit.
Very odd how git rev-parse is returning the correct commit hash but wrong branch name. :-\
Respects
BruceS


Where does the '$OpenSuseInstaller' variable come from?

By the way, note that the file to modify is actually 'configure.ac', which is the template 'configure' is generated from.

--
Benoît Minisini.


Follow-Ups:
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
References:
stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: stable says mastergbWilly <gbWilly@xxxxxxxxxxxxxx>
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: stable says masterBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>
Re: stable says masterBruce Steers <bsteers4@xxxxxxxxx>