Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » Releasing U++ » deb packages don't update user sources properly
deb packages don't update user sources properly [message #26255] Sun, 18 April 2010 19:40 Go to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi everyone!

I have to file bug against my own work Rolling Eyes

I just realized a stupid error in the logic of using ubuntu packages. If user installs the package (doesn't matter how, even manually) and runs theide for the first time, the dialog is presented, asking if the sources should be copied to home directory. But if we automatically update later, new sources are copied to /usr/share/upp, but they never get into the users home, where are his assemblies set up.

Simple solution would be to check if the version in users ide/version.h is the same as the version in corresponding file in /usr/share/upp. If they are different, user should be presented with dialog asking if he wants to overwrite the sources with newer ones.

So, before I start to work on a fix, does anyone see any problems with this solution?

Best regards,
Honza
Re: deb packages don't update user sources properly [message #26258 is a reply to message #26255] Mon, 19 April 2010 12:06 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
The sources are copied to userland to allow him to make changes.
This works against re-copy of fresh sources over them after update.
(although I believe many users have clean copy without local changes, so the update is appropriate)

So we have local changes vs official update thing, and that's why things like versioning systems do exist, i.e. not easy to solve. Rolling Eyes

Still your solution is probably best what can be done.

I have also right now get a flash of an idea, how about putting into installer another wizard to not copy sources from /usr/share, but instead check them out from svn mirror right into userland. In such case after update your "fix" could run another svn update up to revision of installed package (not to head).

But this would be good only for experienced users, who know how SVN works and are capable to handle eventual conflicts with their local changes during such process.

But I personally would quite like it that way, to not bother with checkouting manually, but letting installer to prepare it for me all.
Re: deb packages don't update user sources properly [message #26259 is a reply to message #26258] Mon, 19 April 2010 12:35 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
With another SDK I copied all the files I made changes to.
After updating the SDK then just pasted in the changed files.

I also had a text file with the changes, if the SDK update had changes to those files I wanted to keep then just make the changes to the specific lines I had changed.

That way is easy and works OK, no tinkering with a svn.
Re: deb packages don't update user sources properly [message #26261 is a reply to message #26259] Mon, 19 April 2010 16:37 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
nlneilson wrote on Mon, 19 April 2010 12:35

With another SDK I copied all the files I made changes to.
After updating the SDK then just pasted in the changed files.

I also had a text file with the changes, if the SDK update had changes to those files I wanted to keep then just make the changes to the specific lines I had changed.

That way is easy and works OK, no tinkering with a svn.



This way it's actually lot more tedious than using SVN. Smile

[Updated on: Mon, 19 April 2010 16:37]

Report message to a moderator

Re: deb packages don't update user sources properly [message #26264 is a reply to message #26258] Mon, 19 April 2010 20:17 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi,
mr_ped wrote on Mon, 19 April 2010 12:06

I have also right now get a flash of an idea, how about putting into installer another wizard to not copy sources from /usr/share, but instead check them out from svn mirror right into userland. In such case after update your "fix" could run another svn update up to revision of installed package (not to head).

That is a great idea! Why it didn't flash myself? Smile Let me try to put it all together and describe the processing logic...

When theide starts, it should check if
  1. there is /usr/share/upp
  2. svn is installed
  3. user copy of sources exists
Then we can procede as follows:
if(!c){
  if(a || b){
    Give user the choices:
    if(a){                    * copy sources from /usr/share [recommended]}
    if(b){                    * checkout sources from svn [advanced users]}
                              * do not copy sources [very advanced users, not recommended :-) ]
  }else{
    ONCELOCK(Warn user that if he wants to use theide with ultimate++,
             he must either install upp package or subversion)
  }
}else{
  if((users sources are from /usr/share) && (user source are outdated)){
    Ask user if he wishes to: * overwrite everything
                              * overwrite only files that haven't changed since last update
                              * keep all the out of date sources
  }
  if((users sources are from svn) && (svnversion reports newer version)){
       Alert user that update is available.
  }
}

Does it make any sense? It is bit more complex than I expected at first... By "oncelock" I mean do it only on first run, otherwise it would be annoying.

Honza
Re: deb packages don't update user sources properly [message #26275 is a reply to message #26255] Tue, 20 April 2010 09:56 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
more afterthought on the svn idea...

It will mean that all your local changes will live in your working copy as live changes, you have nowhere to commit them (and archive them), unless you make another personal repo and juggle between them.
I'm not sure how bad this is, after all you probably don't want to divert from official uppsrc too much anyway if you plan to stay up to date, so in most of the cases the changes will be sparse and minor, thus letting them live in WC is probably ok.
(I expect if somebody has to seriously modify upp, he would branch some stable revision anyway for his project, and he will be very likely ignore further updates on that branch, so he can easily switch to own repo)
Still it doesn't feel right, like ultimate solution. Wink

But this leads me to question whether for example GIT would not work better, i.e. allowing for both easy update to revision from updated deb package and committing and tracking local changes with proper commit log.

Any GIT expert to look into this, if it's merging allows this?
This would be maybe that final reason, why to finally switch to GIT and learn it. Smile (although I'm now absolutely addicted to TortoiseSVN and missing it seriously on my Kubuntu box)
Re: deb packages don't update user sources properly [message #26276 is a reply to message #26255] Tue, 20 April 2010 10:11 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
About procedure:
I think it's not very accurate, or diverts from my expectations too much, so I will post my version:

- I assume TheIDE is installed from .deb, I don't care about non-deb installation (we can rethink that later, what can be reused for custom installation)

- if .deb was not updated, nothing to do [exit]

- no user copy -> ask if he wants:
1) SVN checkout (to revision from .deb)
2) copy
3) use /usr/share read only sources (imho this should be recommended, because it's keeping the platform consistent for users who follow recommended choices)

- if user copy is SVN checkout, update to .deb revision (not head) (it should probably ask for confirmation, but it's very likely desired behaviour, so no need to complicate it). Report conflicts after update if any, so user knows he has to solve them manually. [exit]

- if user copy is copy of /usr/share -> ask about update (full copy, keep local changes, no copy) [exit] (this part is well written in yours diagram)

--
It would be very likely good to make this independent for uppsrc and examples+reference. I think it's quite ok for new users to dig into examples and play with them, i.e. copy or SVN should be recommended there. On the uppsrc I think the exact opposite, keeping it in /usr/share and not letting them modify it.

Also it would be nice to have these wizards available trough menu in case you want to restore your installation (i.e. your local toying around went into unrepairable state).

[Updated on: Tue, 20 April 2010 10:12]

Report message to a moderator

Re: deb packages don't update user sources properly [message #26277 is a reply to message #26255] Tue, 20 April 2010 10:29 Go to previous messageGo to next message
mr_ped is currently offline  mr_ped
Messages: 825
Registered: November 2005
Location: Czech Republic - Praha
Experienced Contributor
And to make clear where my ideas come from:

I'm thinking about common C++ Joe programmer...
He's been doing probably some wx, QT or GTK+ GUI programming, and he wants to try out some new IDE (not yet realizing the upp will change his life much more, bwahahahaha).

So let's see what he will do:
- start his favourite package manager
- search for C++ IDE
- +install upp
- click "apply"

What we want to happen:
- install all needed build stuff (gcc, whatever, basic libraries for SQL coding, SDL?, OGL?), suggest also all tools which can make big difference (svn, git?)
- install TheIDE, uppsrc, examples, etc.. the good U++ stuff
- put TheIDE into menu

Now Joe will run the IDE:
- wizard should automagically preset all the tedious stuff, i.e. GCC build method (with proper gcc, like avoiding defunct 4.3 or 4.4 or which it was), paths to libs
- ask about copy/svn/RO shared [uppsrc, examples+reference] with clearly marked recommended stuff

In ideal case there should be like 2 or 3 (max) clicks to let Joe into IDE, yet to let him know what was done with default setup and letting him know it can be adjusted later as well)

Then the "alien" choose package window comes ... :/ Hard to tell how to make this crash into upp softer, probably at least text explanation to new users should be there.

TheIDE at this point should be capable to compile and run most of the examples (at least all interesting, and I think SQL and SDL are interesting examples how far upp can be pushed), so Joe can just switch the packages, hit compile&run and watch.

That's the main case (IMHO) we should make sure it works absolutely flawlessly and as smoothly as possible.


Working on the svn/git wizard copies of uppsrc will also make life easier for more advanced users who keep some custom changes to uppsrc in their userland, but that's not about Joe.
Re: deb packages don't update user sources properly [message #26282 is a reply to message #26277] Tue, 20 April 2010 18:10 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi mr_ped!

I must agree with all you said. Especially two things are important:
  1. The initial setup must be as quick and simple as possible. Maybe a windows-style wizard wouldn't hurt - common Joe programmer is used to click "Next >" very quickly to accept the defaults.
  2. It should be possible to change or re-run the setup later, from within theide. That is related to 1), since Joe just accepted defaults without reading and later he might find that working over svn suits him better.


About the "alien" package selection window: theide recognizes already when it runs for the first time. It should be easy to show a big nice pop-up explaining the basics of packages and assemblies. And probably also something like "Hey, if you want to see what this beast can do, have a look at the X,Y or Z package in examples". Just don't add a picture of a big-eyed paper clip, that would scare most of the people Very Happy

Honza
Re: deb packages don't update user sources properly [message #26284 is a reply to message #26282] Tue, 20 April 2010 18:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dolik.rce wrote on Tue, 20 April 2010 12:10

Hi mr_ped!

I must agree with all you said. Especially two things are important:
  1. The initial setup must be as quick and simple as possible. Maybe a windows-style wizard wouldn't hurt - common Joe programmer is used to click "Next >" very quickly to accept the defaults.
  2. It should be possible to change or re-run the setup later, from within theide. That is related to 1), since Joe just accepted defaults without reading and later he might find that working over svn suits him better.


About the "alien" package selection window: theide recognizes already when it runs for the first time. It should be easy to show a big nice pop-up explaining the basics of packages and assemblies. And probably also something like "Hey, if you want to see what this beast can do, have a look at the X,Y or Z package in examples". Just don't add a picture of a big-eyed paper clip, that would scare most of the people Very Happy

Honza


Anything from me required? Smile

As for the opinion, I would like to afford the luxury of not having one.

Personally, whenever I need to work in Linux, I use src tarball to get the first ide, then svn... Smile

But making the process easy for Joe is fine with me.

Mirek
Re: deb packages don't update user sources properly [message #26286 is a reply to message #26284] Tue, 20 April 2010 20:17 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

luzr wrote on Tue, 20 April 2010 18:50

Anything from me required? Smile

As for the opinion, I would like to afford the luxury of not having one.

Personally, whenever I need to work in Linux, I use src tarball to get the first ide, then svn... Smile

But making the process easy for Joe is fine with me.

Mirek

Not yet, we will start to beg for your help when we get stuck in the coding Wink And no opinion from you is fine - it would be worse if you had a negative one Smile

Honza
Re: deb packages don't update user sources properly [message #26294 is a reply to message #26282] Thu, 22 April 2010 10:53 Go to previous messageGo to next message
nlneilson is currently offline  nlneilson
Messages: 644
Registered: January 2010
Location: U.S. California. Mojave &...
Contributor
dolik.rce wrote on Tue, 20 April 2010 18:10

Especially two things are important:
  1. The initial setup must be as quick and simple as possible. Maybe a windows-style wizard wouldn't hurt - common Joe programmer is used to click "Next >" very quickly to accept the defaults.
  2. It should be possible to change or re-run the setup later, from within theide. That is related to 1), since Joe just accepted defaults without reading and later he might find that working over svn suits him better.




I am like "common Joe programmer", these are important.

The most experience I have had is with the NASA WorldWind C# .net version svn. If there is any way of staying away from an svn there are many that would choose that way except as in #2.

There are two things NASA changed when when they switched to the Java version (NASA no longer funds the C# version).

1. Nightly builds, the svn is used by the developers but common Joe uses the builds. There have been several threads/posts regarding a public read only svn but I think they realized the problems involved.

2. Too many had access to make changes in the svn, it got to be a big mess, plugins that could not be removed, they were built in.

An interesting note is when they were changing to a version that would work on other OS/platforms C++ was considered but there were more Java programmers available.
If U++ had of been more well known/used it may have ended up C++ rather than Java.

edit: See how much bandwidth is being used for
Win install, src tarball versus svn
regardless of how the svn is set up this ratio may not change significantly.

[Updated on: Thu, 22 April 2010 12:43]

Report message to a moderator

Re: deb packages don't update user sources properly [message #28554 is a reply to message #26255] Mon, 06 September 2010 23:43 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hello everyone!

After a long, long time (yes, it is a long time since April Smile ) I finally offer a fix to the situation described in above posts. Hereby I ask anyone having a little bit of time and courage (and posix OS) to test it and tell me what you think please.

I changed theide to have a nice and simple setup wizard shown upon the first run and also a system to check for updates and generally manage the source codes. I will not tell you more about it. My goal was to design something "fool-proof", that a ten year child could use, so I hope you will be able to figure out what to do - if not, then I did a poor job Very Happy

So just a few notes how to get it running: The attached file contains all changed files, that is a subset of files in uppsrc/ide and uppsrc/usvn. I recommend you to get a copy of your uppsrc and drop those files in. Then just compile package ide as usually and you are ready to go Wink If you name the resulting binary "theide", you might mess up you normal settings (that is just disclaimer, actually the worst that can happen is overwriting or deleting you assemblies), so I recommend to stay with "ide". To see the automatic updates in action, you will probably wait till someone commits something in SVN (when using SVN based assemblies) or rewrite the version string in /usr/share/upp/uppsrc/ide/version.h (When using local copy of /usr/share/upp).

There is some proto-documentation in ide/SrcUpdater. If you are unsure about something you might find an answer in there, or just ask me.

If you test on win32, you should not see any big changes, just few details in usvn. As for now the changes are for POSIX environment only.

I'm looking forward to your comments!

Best regards,
Honza

EDIT: Removed the file due to serious errors in the code.

[Updated on: Sun, 12 September 2010 22:20]

Report message to a moderator

Re: deb packages don't update user sources properly [message #30762 is a reply to message #26255] Thu, 20 January 2011 17:53 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi everyone

It's about time to revive this thread again Smile First short review of the problem to refresh your memory without reading full thread Wink

Since we started publishing deb (and other) packages, there is an unresolved problem. The sources are installed into /usr/share/upp and theide copies them into user home directory on the first invocation. If you update the package later, theide just ignores it. There was some discussion about this above and I tried to implement it, but the code wasn't smooth enough and there was number of bugs. See above for more details.

But that was few months ago and since then, I was polishing the code and taking the bugs out one by one. I have been using the modified ide for quite a long time in various configurations and I think it is ready now. The main ideas are: nicer first-run installer, automated update checks in background (every 15 minutes), simple source management in case of local copy.

I won't go into details here, it would be boring and pointless. I rather post part of the documentation, since it has screenshot and as you probably know "one picture equals to thousand words" Wink So see the attached PDF. I will of course also publish sources, see the next post.

Best regards,
Honza
  • Attachment: updater.pdf
    (Size: 1.41MB, Downloaded 397 times)
Re: deb packages don't update user sources properly [message #30763 is a reply to message #30762] Thu, 20 January 2011 17:56 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Here are the promised sources. The archive contains only changed files. Just copy the ide and usvn directories inside your uppsrc and it should work just fine.

Honza
  • Attachment: updater.zip
    (Size: 938.09KB, Downloaded 350 times)
Re: deb packages don't update user sources properly [message #32179 is a reply to message #26255] Fri, 29 April 2011 11:03 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Will this be part of Theide, or will it stay a separated kind of addon, not included in the official package ? I updated to the 3371 built, and this is not included yet (unless I missed something ?).

You told me here :
dolik.rce wrote on Tue, 01 March 2011 10:26

I am working on a fix for this for quite some time, but so far no one was really interrested because nobody really complained so far Smile

I think that you should not wait that a lot of people complains : I'm sure that there is several (a lot ?) who don't know or don't take time to ask you about this problem but would be happy to have a solution...
Re: deb packages don't update user sources properly [message #32185 is a reply to message #32179] Fri, 29 April 2011 12:28 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

Hi jibe

jibe wrote on Fri, 29 April 2011 11:03

Will this be part of Theide, or will it stay a separated kind of addon, not included in the official package ? I updated to the 3371 built, and this is not included yet (unless I missed something ?).

It is already part of theide Cool The setup dialog appears by default only on clean install. Try looking into Setup > Source management or starting theide with -install parameter from commandline Wink

Best regards,
Honza
Re: deb packages don't update user sources properly [message #32191 is a reply to message #26255] Fri, 29 April 2011 23:32 Go to previous messageGo to next message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
I don't understand... In Setup > Source management, I have :

- Local copy of sources from /usr/share/upp [recommanded]
- Check when TheIDE starts.

- $SRC = /home/<user>/upp
- $OUT = /home/<user>/.upp/_out


but the updates are not done... Did I missed something ?

I did not try starting theide with -install, but it should work without it, right ?
Re: deb packages don't update user sources properly [message #32193 is a reply to message #32191] Sat, 30 April 2011 04:55 Go to previous messageGo to next message
dolik.rce is currently offline  dolik.rce
Messages: 1789
Registered: August 2008
Location: Czech Republic
Ultimate Contributor

I can think of two possible reasons:
1) There is no update available. Have a look in /usr/share/upp/uppsrc/ide/version.h and compare it with ~/uppsrc/ide. If they are the same, there is nothing to be updated.

2) You didn't click the update icon. When update is available, it is not installed automatically, it is just signaled by icon on toolbar. The icons look like this(taken from help): index.php?t=getfile&id=3203&private=0

I have written a documentation for this feature which explains all this... Unfortunately, it is not yet properly linked with the rest of the docs, so it doesn't show on web nor in theide help. To see it please have a look in ide/SrcUpdater package, it is in the app.tpp file.

Honza

PS: Last two days there were some trouble with the launchpad builds, so there were no updates, that could be a reason too Wink
  • Attachment: icons.png
    (Size: 14.21KB, Downloaded 703 times)
Re: deb packages don't update user sources properly [message #32230 is a reply to message #26255] Mon, 02 May 2011 10:40 Go to previous messageGo to previous message
jibe is currently offline  jibe
Messages: 294
Registered: February 2007
Location: France
Experienced Member
Hi,

Thanks for your help !

It was the 2nd case : I thought that the update would be installed automatically... All works well now Smile
Previous Topic: Automatic nightly builds reastored - and reason(s) why it was failing (unodgs, please read :)
Next Topic: [PROPOSAL] Changes to packaging scheme
Goto Forum:
  


Current Time: Fri Apr 19 23:32:40 CEST 2024

Total time taken to generate the page: 0.05265 seconds