On Sat, Aug 25, 2012 at 12:59:49PM +0200, Koen Kooi wrote:
> 
> Op 21 aug. 2012, om 13:52 heeft Martin Jansa <martin.ja...@gmail.com> het 
> volgende geschreven:
> 
> > On Tue, Aug 21, 2012 at 12:21:44PM +0200, Koen Kooi wrote:
> >> 
> >> Op 21 aug. 2012, om 10:47 heeft Martin Jansa <martin.ja...@gmail.com> het 
> >> volgende geschreven:
> >> 
> >>> Signed-off-by: Martin Jansa <martin.ja...@gmail.com>
> >>> ---
> >>> scripts/layerman |   13 ++++++++++++-
> >>> 1 files changed, 12 insertions(+), 1 deletions(-)
> >>> 
> >>> diff --git a/scripts/layerman b/scripts/layerman
> >>> index 60b1588..87400fa 100755
> >>> --- a/scripts/layerman
> >>> +++ b/scripts/layerman
> >>> @@ -28,11 +28,22 @@ function check_layer() {
> >>>   cd ${LAYERDIR}
> >>>   CURRENTCOMMIT="$(git log --oneline --no-abbrev -1 | awk '{print $1}')"
> >>>   CURRENTBRANCH="$(git branch | grep '*' | awk '{print $2}')"
> >>> + CURRENTURI="$(git config remote.origin.url)"
> >>> 
> >>> + if [ "${CURRENTURI}" != "${LAYERURI}" ] ; then
> >>> +         echo "WARNING!!!!"
> >>> +         echo "WARNING: ${LAYERNAME} is using a different uri 
> >>> '${CURRENTURI}' than configured in layers.txt '${LAYERURI}'"
> >>> +         echo "WARNING: Changing uri to: '${LAYERURI}'"
> >>> +         echo "WARNING!!!!"
> >>> +         git remote set-url origin ${LAYERURI}
> >>> +         git remote update
> >>> + fi
> >> 
> >> The above part of the patch is awesome!
> >> 
> >>>   if [ "${CURRENTBRANCH}" != "${BRANCH}" ] ; then
> >>>           echo "WARNING!!!!"
> >>> -         echo "WARNING: ${LAYERNAME} is using a different branch than 
> >>> configured in layers.txt"
> >>> +         echo "WARNING: ${LAYERNAME} is using a different branch 
> >>> '${CURRENTBRANCH}' than configured in layers.txt '${BRANCH}'"
> >>> +         echo "WARNING: Changing branch to: '${BRANCH}'"
> >>>           echo "WARNING!!!!"
> >>> +         git checkout origin/${BRANCH} -b ${BRANCH} >/dev/null || git 
> >>> checkout ${BRANCH}
> >>>   fi
> >> 
> >> But this breaks the intention. The general idea is to allow people to add 
> >> their own commits to a custom branch, but remove changes otherwise. The 
> >> current implementation is inconsitent and non-obvious, so I'd welcome 
> >> suggestions. Whatever we turn out to do, it will get documented in the 
> >> README to lessen the surprise.
> >> 
> >> Do you want me to commit only the top part?
> > 
> > I'm not using setup-scripts as such, but I've used layerman and
> > layers.txt format in some other "setup" env, so if you like only top
> > part, feel free to merge it.
> 
> The top part has been merged and the README has been updated.
> 
> > For own commits in custom branch I expect user to change layers.txt for
> > his custom branch and for that (or switching default branch) I needed
> > that bottom change.
> 
> 
> I'm thinking of doing the following:
> 
> 1) Create a new flag that controls branch resets
> 2) Default the flag to allow resets
> 3) update README
> 4) send announcement.
> 
> Does that fit your use case?

Yes, it extends my use case.

Changing layers.txt to use branch foo instead of master should work too,
and keeps local changes as log as origin/foo does not exists. User of
foo is then responsible to keep that branch compatible with other
layers.

BTW: for one setup I've used layers.txt in conf subdirectory, should I
keep such change local or are you interested in OE_LAYERS_TXT variable
so I can change it only in one place (instead of many 
${OE_SOURCE_DIR}/layers.txt)?

Cheers,

-- 
Martin 'JaMa' Jansa     jabber: martin.ja...@gmail.com

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Angstrom-distro-devel mailing list
Angstrom-distro-devel@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/angstrom-distro-devel

Reply via email to