Foss lect 8 1 11.txt
FOSS Lecture: (notes taken on the fly by Nishchay Mhatre; nishchaymhatre@gmail.com)
Sat Jan 8 09:54:14 IST 2011
Version Control session by Abhijit Sir:
gcc 4.4.3 first 4 is major number second 4 is minor number
'Dated directory' system: Wasteful,manual,time consuming, hard to document, cannot leverage the power of distributed development.
There are two types of Version Control Systems.
Centralized Version Control System. e.g. CVS
Distributed Version Control System. e.g. git, bazzar
Linux kernel is maintained with git. Git is Distributed Version Control System.
In distributed version control system, we can work remote place by just cloning the code from server. We do not depend on the server every time. That is any one in the world can contribute to your code, even if there is no Internet connection (except at time of cloning and submission). This is principal of FOSS development. Git is designed to be fast for merging codes from developer's.
In centralized version control system, we need to have Internet connection every time, when you want contribute. This is main disadvantage of it.
What do we want from git? - Naming of versions - Save the state of the development : remember the changes - Let us use an older version - Ease of porting changes
Mainline of development is the 'Trunk' or master. Branching is more for bug fixing.
Git can merge from different sources.
What security measures and administration in git?
Commit-Pull problem: After pull, the log is not showing the change but the file is getting added without the add file command being used.
In git you cannot recover an older version unless it is branched out. If the reversion is done on the trunk, the new stuff is lost. No version numbers in git.
Upstream/downstream concept: A developer who fixes a bug in a software obtained from the community has to send the bug 'upstream' to the maintainers of the project. The original maintainers of the code can fix the bug and send it 'downstream' to those who have obtained the code from them.
Bug-tracking system: on every project website.
Code Browsing tips by Abhijit Sir:
- READIT (Go through the README file).
- Use tools like cscope and ctags.
- Read and understand the data structure.
- Find the mainline.
- 30-50% is error checking code. Ignore it for initial study.
- Many header files in large C code, often nested.
- C is being used in object oriented programming, with functions pointers heavily used.
- What you cant find with an automated tool, might be in a library. Try to avoid reading those internals. Go for library documentation. Or it may be in a different language.
- Keep writing notes and draw diagrams of data structures.
Code Browsing tools:
- cscope
- ctags
- doxygen
After installing cscope and ctags. Go to directory in which source code is.
$ctags *.c *.h
Then actual code browsing can be done using cscope.
$scope
Then we can enter for e.g. function which we want to find, in which file it is? after entering function name, press enter.
Cscope will list the names of files in which it has found that function. We can go through that file by pressing enter on that file name. Hyphenation Session by Shravan: Hyphenation dictionary has all the rules. To install it, the file has to be properly named and then added to the open office repository.
~~Homework for the week~~
- Compile gnash
- Compile kde svn trunk version on gnome.
- Compile gnome (long term)
- Signup on foss community wiki and update user page
- Create makefile for hyphenation
- Setup your own debian-testing virtualbox image. On PD
- How to report a bug?
- Start on Debian new maintainters guide, see hyphenation wiki.
Thursday 1730 Revolution OS Film Screening; Seminar Hall.