threads / discuss / 3118

problem installing latest cogito

Subject: problem installing latest cogito

## tl;dr

10 messages between Jan 21, 2006 and Jan 21, 2006.

replies: 9people: 4as markdown or json

dave morgan· Jan 21, 2006, 14:08 UTC · lore
(some lines might have been wrapped by my mailer)

david@tower2:~/cogito$ cg-update Fetching head... Fetching objects... progress: 51 objects, 83346 bytes Fetching tags... Tree change: 795023aaeaac0522d6af2fb63a14699c980782b7:d1a89167fbe0287cc43609bf37534ba1a98614d9

Applying changes...
Fast-forwarding 795023aaeaac0522d6af2fb63a14699c980782b7 ->
d1a89167fbe0287cc43609bf37534ba1a98614d9
        on top of 795023aaeaac0522d6af2fb63a14699c980782b7...
david@tower2:~/cogito$ make install
Generating cg-version...
install -m755 -d /home/david/bin
install cg-object-id cg-add cg-admin-lsobj cg-admin-uncommit
cg-branch-add cg-branch-ls cg-reset cg-clone cg-commit cg-diff
cg-export cg-help cg-init cg-log cg-merge cg-mkpatch cg-patch cg-fetch
cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls cg-update cg
cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version /home/david/bin
for i in 'cg-cancel:cg-reset' 'commit-id:cg-object-id' \
                'tree-id:cg-object-id' 'parent-id:cg-object-id' \
                'cg-commit-id:cg-object-id' \
                'cg-tree-id:cg-object-id' 'cg-parent-id:cg-object-id'
\
                'cg-pull:cg-fetch'; do \
                old=`echo $i | cut -d : -f 1`; \
                new=`echo $i | cut -d : -f 2`; \
                rm -f /home/david/bin/$old; \
                ln -s $new /home/david/bin/$old; \
        done
install -m755 -d /home/david/lib/cogito
install cg-Xlib cg-Xmergefile cg-Xfetchprogress /home/david/lib/cogito
cd /home/david/bin; \
        for file in cg-object-id cg-add cg-admin-lsobj
cg-admin-uncommit cg-branch-add cg-branch-ls cg-reset cg-clone
cg-commit cg-diff cg-export cg-help cg-init cg-log cg-merge cg-mkpatch
cg-patch cg-fetch cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls
cg-update cg cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
cd /home/david/lib/cogito; \
        for file in cg-Xlib cg-Xmergefile cg-Xfetchprogress; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
sed: -e expression #1, char 145: unterminated address regex
install -m755 -d /home/david/share/cogito
install -m644 default-exclude /home/david/share/cogito
david@tower2:~/cogito$
net result - a pile of zero length files in /home/david/bin/   :-(
can I just copy the cg-files from to cogito directory over?
Dave
Petr Baudis· Jan 21, 2006, 19:48 UTC · re: dave morgan · lore

Re: problem installing latest cogito

Dear diary, on Sat, Jan 21, 2006 at 03:08:27PM CET, I got a letter where dave morgan <morgad@eclipse.co.uk> said that...

Show 9 quoted lines
>                 sed -e
> 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
> 
> s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
> \
>                        $file > $file.new; \
>                 cat $file.new > $file; rm $file.new; \
>         done
> sed: -e expression #1, char 145: unterminated address regex

(145 is the total expression length.) Now, I'm at loss - this works here and I can see nothing wrong on the regexp - does anyone have any idea?

What is your sed version?
> net result - a pile of zero length files in /home/david/bin/   :-(
> 
> can I just copy the cg-files from to cogito directory over?

No, you would have to also set $COGITO_LIB and $COGITO_SHARE (or put cg-X* scripts to your bin directory as well).

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams
sean· Jan 21, 2006, 19:49 UTC · re: Petr Baudis · lore

Re: problem installing latest cogito

On Sat, 21 Jan 2006 20:48:26 +0100 Petr Baudis <pasky@suse.cz> wrote:

Show 9 quoted lines
> >                 sed -e
> > 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
> > 
> > s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
> > \
> >                        $file > $file.new; \
> >                 cat $file.new > $file; rm $file.new; \
> >         done
> > sed: -e expression #1, char 145: unterminated address regex
The problem seems to go away if you remove the quoted end-of-line:
sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g;
        s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
where the following, doesn't:
sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
        s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
Sean
Junio C Hamano· Jan 21, 2006, 20:12 UTC · re: sean · lore

Re: problem installing latest cogito

sean <seanlkml@sympatico.ca> writes:
Show 14 quoted lines
> On Sat, 21 Jan 2006 20:48:26 +0100
> Petr Baudis <pasky@suse.cz> wrote:
>
>> >                 sed -e
>> > 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
>> > 
>> > s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
>> > \
>> >                        $file > $file.new; \
>> >                 cat $file.new > $file; rm $file.new; \
>> >         done
>> > sed: -e expression #1, char 145: unterminated address regex
>
> The problem seems to go away if you remove the quoted end-of-line:

That is not "the quoted end-of-line". Backslashes do not have any special meaning inside a single quote pair for bourne shell quoting. The script is passing the backslash to sed.

IIRC, make seems to do different things for the backslash at the end of line depending on vintage, so if this scriptlet appears in a Makefile you may have another version dependency. I usually cop out of this problem by having a separate shell script and run it from the Makefile, instead of spelling out the sed commandline in the Makefile.

I got a complaint or two that some version of sed does not like ';' to concatenate more than one commands, and have been trying to train myself to do either multiple -e options or multi-line scripts. E.g when I am tempted to say:

	sed -e 's/foo/bar/;s/baz/boa/' froboz
Instead, I say either
	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz
or
	sed -e '
        	s/foo/bar
                s/baz/boa/
	' froboz

I do not know how much of the above applies to your immediate problem, but I hope some of it helps.

Petr Baudis· Jan 21, 2006, 21:06 UTC · re: Junio C Hamano · lore

Re: problem installing latest cogito

Dear diary, on Sat, Jan 21, 2006 at 09:12:28PM CET, I got a letter where Junio C Hamano <junkio@cox.net> said that...

Show 10 quoted lines
> I got a complaint or two that some version of sed does not like
> ';' to concatenate more than one commands, and have been trying
> to train myself to do either multiple -e options or multi-line
> scripts.  E.g when I am tempted to say:
> 
> 	sed -e 's/foo/bar/;s/baz/boa/' froboz
> 
> Instead, I say either
> 
> 	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz

Good idea, thanks. Hopefully this will fix Dave Morgan's problem. Committed and pushed out.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams
dave morgan· Jan 21, 2006, 21:22 UTC · re: Petr Baudis · lore

Re: problem installing latest cogito

On Sat, 21 Jan 2006 22:06:22 +0100, Petr Baudis <pasky@suse.cz> wrote:
Show 15 quoted lines
>Dear diary, on Sat, Jan 21, 2006 at 09:12:28PM CET, I got a letter
>where Junio C Hamano <junkio@cox.net> said that...
>> I got a complaint or two that some version of sed does not like
>> ';' to concatenate more than one commands, and have been trying
>> to train myself to do either multiple -e options or multi-line
>> scripts.  E.g when I am tempted to say:
>> 
>> 	sed -e 's/foo/bar/;s/baz/boa/' froboz
>> 
>> Instead, I say either
>> 
>> 	sed -e 's/foo/bar/' -e 's/baz/boa/' froboz
>
>Good idea, thanks. Hopefully this will fix Dave Morgan's problem.
>Committed and pushed out.

david@tower2:~/cogito$ cg-update -v Fetching head... Fetching objects... progress: 27 objects, 33087 bytes Fetching tags... Tree change: d1a89167fbe0287cc43609bf37534ba1a98614d9:3311308023fcbd526b37dfdc61e641ca18bc7f99 :100644 100644 f1fc272... 25a1d21... M Makefile :100755 100755 2970d86... 0021080... M cg-admin-uncommit :100755 100755 c7423ee... 8c2e852... M cg-fetch :100755 100755 9296e0f... 3b6defd... M cg-merge :100755 100755 5fd3f5b... 317d7e6... M cg-push :100755 100755 06a16fe... a2df345... M cg-update

Applying changes...
Fast-forwarding a9c75f3b8b1adb01859ff2c9b028f72a247837c6 ->
3311308023fcbd526b37dfdc61e641ca18bc7f99
        on top of a9c75f3b8b1adb01859ff2c9b028f72a247837c6...
david@tower2:~/cogito$ make install
Generating cg-version...
install -m755 -d /home/david/bin
install cg-object-id cg-add cg-admin-lsobj cg-admin-uncommit
cg-branch-add cg-branch-ls cg-reset cg-clone cg-commit cg-diff
cg-export cg-help cg-init cg-log cg-merge cg-mkpatch cg-patch cg-fetch
cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls cg-update cg
cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version /home/david/bin
for i in 'cg-cancel:cg-reset' 'commit-id:cg-object-id' \
                'tree-id:cg-object-id' 'parent-id:cg-object-id' \
                'cg-commit-id:cg-object-id' \
                'cg-tree-id:cg-object-id' 'cg-parent-id:cg-object-id'
\
                'cg-pull:cg-fetch'; do \
                old=`echo $i | cut -d : -f 1`; \
                new=`echo $i | cut -d : -f 2`; \
                rm -f /home/david/bin/$old; \
                ln -s $new /home/david/bin/$old; \
        done
install -m755 -d /home/david/lib/cogito
install cg-Xlib cg-Xmergefile cg-Xfetchprogress /home/david/lib/cogito
cd /home/david/bin; \
        for file in cg-object-id cg-add cg-admin-lsobj
cg-admin-uncommit cg-branch-add cg-branch-ls cg-reset cg-clone
cg-commit cg-diff cg-export cg-help cg-init cg-log cg-merge cg-mkpatch
cg-patch cg-fetch cg-restore cg-rm cg-seek cg-status cg-tag cg-tag-ls
cg-update cg cg-admin-ls cg-push cg-branch-chg cg-admin-cat cg-clean
cg-admin-setuprepo cg-switch cg-version; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g' \
                    -e
's/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
cd /home/david/lib/cogito; \
        for file in cg-Xlib cg-Xmergefile cg-Xfetchprogress; do \
                sed -e
's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g' \
                    -e
's/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
\
                       $file > $file.new; \
                cat $file.new > $file; rm $file.new; \
        done
install -m755 -d /home/david/share/cogito
install -m644 default-exclude /home/david/share/cogito
david@tower2:~/cogito$
works for me :-)
many thanks to all for sorting it out

best regards Dave

dave morgan· Jan 21, 2006, 20:08 UTC · re: Petr Baudis · lore

Re: problem installing latest cogito

On Sat, 21 Jan 2006 20:48:26 +0100, Petr Baudis <pasky@suse.cz> wrote:
Show 16 quoted lines
>Dear diary, on Sat, Jan 21, 2006 at 03:08:27PM CET, I got a letter
>where dave morgan <morgad@eclipse.co.uk> said that...
>>                 sed -e
>> 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
>> 
>> s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
>> \
>>                        $file > $file.new; \
>>                 cat $file.new > $file; rm $file.new; \
>>         done
>> sed: -e expression #1, char 145: unterminated address regex
>
>(145 is the total expression length.) Now, I'm at loss - this works here
>and I can see nothing wrong on the regexp - does anyone have any idea?
>
>What is your sed version?

~/cogito$ sed --version GNU sed version 4.1.2

(from Debian/testing)
Show 7 quoted lines
>
>> net result - a pile of zero length files in /home/david/bin/   :-(
>> 
>> can I just copy the cg-files from to cogito directory over?
>
>No, you would have to also set $COGITO_LIB and $COGITO_SHARE (or put
>cg-X* scripts to your bin directory as well).
I blundered about for 30 minutes with git-reset, and ended up here -

david@tower2:~/cogito$ cg-log | head commit a9c75f3b8b1adb01859ff2c9b028f72a247837c6 tree c0c2b743d5dbacc33bced6ace62347724664c817 parent 653b039dbf989696160db56bb196a1584932fdeb author Petr Baudis <pasky@suse.cz> Sat, 21 Jan 2006 02:28:30 +0100 committer Petr Baudis <xpasky@machine.or.cz> Sat, 21 Jan 2006 02:28:30 +0100

    Add support for cg-update -v
    Makes it call cg-fetch with -v as well, to list all the changes
being
    pulled.

and then make-install worked, and I seem to have a working cogito ... but 'make test' fails -

*** t9400-clean.sh ***
*   ok 1: initialize repo
*   ok 2: cg-clean -n in top-level dir
*   ok 3: cg-clean -Ddxqn in top-level dir
*   ok 4: cg-clean -n in subdir
* FAIL 5: cg-clean in subdir
        (cd 'repo dir' && cg-clean && check_loss)
*   ok 6: cg-clean -d in subdir
* FAIL 7: cg-clean -x in subdir
        (cd 'repo dir' && cg-clean -x && check_loss)
* FAIL 8: cg-clean in top-level dir
        (cg-clean && check_loss)
* FAIL 9: cg-clean -x in top-level dir
        (cg-clean -x && check_loss)
* FAIL 10: cg-clean -d in top-level dir
        (cg-clean -d && check_loss)
*   ok 11: cg-clean -D in top-level dir
* failed 5 among 11 test(s)
make[1]: *** [all] Error 1
make[1]: Leaving directory `/home/david/cogito/t'
make: *** [test] Error 2
is this expected?

best regards Dave

Petr Baudis· Jan 21, 2006, 21:46 UTC · re: dave morgan · lore

Re: problem installing latest cogito

Dear diary, on Sat, Jan 21, 2006 at 09:08:52PM CET, I got a letter where dave morgan <morgad@eclipse.co.uk> said that...

> and then make-install worked, and I seem to have a working cogito ...
> but 'make test' fails -

Thanks for the notice; I do not run make test very frequently (except before every release). This was introduced in

	[PATCH] Unclutter cg status with --directory as GIT does

and I've fixed it by making it optional for list_untracked_files, explicitly requesting it in cg-status and not in other users (that change also broke cg-add and cg-init), and make cg-status use list_untracked_files directly.

-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams
Petr Baudis· Jan 21, 2006, 20:03 UTC · lore

Re: problem installing latest cogito

Dear diary, on Sat, Jan 21, 2006 at 08:49:01PM CET, I got a letter where sean <seanlkml@sympatico.ca> said that...

Show 23 quoted lines
> On Sat, 21 Jan 2006 20:48:26 +0100
> Petr Baudis <pasky@suse.cz> wrote:
> 
> > >                 sed -e
> > > 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
> > > 
> > > s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
> > > \
> > >                        $file > $file.new; \
> > >                 cat $file.new > $file; rm $file.new; \
> > >         done
> > > sed: -e expression #1, char 145: unterminated address regex
> 
> The problem seems to go away if you remove the quoted end-of-line:
> 
> sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g;
>         s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'
> 
> 
> where the following, doesn't:
> 
> sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/david\/lib\/cogito\/}/g; \
>         s/\${COGITO_SHARE}/\${COGITO_SHARE:-\/home\/david\/share\/cogito\/}/g'

Yes, the problem goes away because then make will split that to two lines, causing:

        sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/xpasky\/lib\/cogito\/}/g;
/bin/sh: -c: line 0: unexpected EOF while looking for matching `''
/bin/sh: -c: line 1: syntax error: unexpected end of file
-- 
				Petr "Pasky" Baudis
Stuff: http://pasky.or.cz/
Of the 3 great composers Mozart tells us what it's like to be human,
Beethoven tells us what it's like to be Beethoven and Bach tells us
what it's like to be the universe.  -- Douglas Adams
sean· Jan 21, 2006, 20:01 UTC · re: Petr Baudis · lore

Re: problem installing latest cogito

On Sat, 21 Jan 2006 21:03:45 +0100 Petr Baudis <pasky@suse.cz> wrote:

Show 8 quoted lines
> 
> Yes, the problem goes away because then make will split that to two
> lines, causing:
> 
>         sed -e 's/\${COGITO_LIB}/\${COGITO_LIB:-\/home\/xpasky\/lib\/cogito\/}/g;
> /bin/sh: -c: line 0: unexpected EOF while looking for matching `''
> /bin/sh: -c: line 1: syntax error: unexpected end of file
> 

Ah sorry I didn't test it in within the makefile context. However, just typing the above on the command line works, whereas the one with the quoted end-of-line gives the error message mentioned in the initial report so I suspect it's at least a clue to the real problem.

Sean

← back to recent threads