Changes between Version 3 and Version 4 of TraineesNotes

01/30/13 17:18:43 (9 years ago)



  • TraineesNotes

    v3 v4  
    3939- "paragarphs", source, binary 
    4040note: single source -> multiple binary packages, namespace is separate, but convention is that 1-to-1 packages have same binary and source names 
    41 - maintainer vs original maintainer 
     41- maintainer vs original maintainer; teams in Ubuntu 
    43 stop at 53:28 
     43Source and Maintainer are the only required fields in the source paragraph of the control file.   
     45Binary paragraph:   
     46Package name: (need not be the same) 
     47Architecture: any (but must be compiled for each) vs all (works on all) 
     48Description: multi-line values must be indented on subsequent lines 
     49 - single space indent can be re-flowed 
     50 - 2 space indent must be displayed as is 
     51 - single dot on a line indicates blank line but not field break 
     54- explicit dependencies, must be installed 
     55- shared libraries (shlibdeps) 
     56-- ldd example 
     57-- dpkg-shlibdeps, uses ldd, then looks for packages, subs them in 
     58- version dependencies, dpkg --compare-versions, etc, logical OR, etc 
     59--- don't put in deps by hand if thye're purely shared lib dependencies, dpkg will deal 
     60-- disjunctive dependencies ("OR") 
     61--- APT looks through package list to see if any of the packages are installed.  If they do, success. 
     62---- if not, look at beginning of list, try to install that, if succeeds, success.  If not, try next. 
     63---- don't misuse them for optional deps (e.g. foo | basefiles), because basefiles will always satisfy it, and it'll never try foo. 
     66- attempt to satisfy, but don't fail. 
     69- metadata only 
     71Do not depend on "Essential" packages, unless you need a specific version 
     73List of dependencies should be what _you_ need/interact with.  e.g. If you need 'a' and 'b', and 'a' depends 'b', you still need both, don't just dpend on 'a', because it might change.  Simultaneously, if you use 'a', and you _know_ that 'a' dependss on 'b', but you're not using 'b', don't depend on 'b'.   Yes, this means that if you depend on 'a', and 'a' screws up their packaging, it won't work, but that's their problem. 
     75Build-Depends: Things needed to _build_ the package, but not to _run_ it.   But don't build-dep on a C compiler, because there are build-essential packages.  /usr/share/doc/build-essential.list 
     78 == SESSION 2 == 
     80Quiz: List some arch all/any packages. 
     81      Which rules targets must be run as root/fakeroot? 
     82      Difference between build-depends and depends. 
     84Maintainer scripts: 
     85 - preinst, postinst, prerm, postrm 
     86 - all shell scripts, called in a variety of ways -- some take the _new_ version as args, others take old version 
     87 - talking about fixing up from previous screwups 
     88 - giant case statement, you should use the dhmakeexample 
     90Talk about dpkg transactions, remove vs purge. 
     91link to order of transactions diagram, and link to policy 
     93Idempotence.  The postinst is quite likely to be run multiple times. 
     94talk about "set -e" 
     95doesn't _have_ to be in shell, but should be. 
     96shell idiom " || :"  (if this fails, don't error out)  (|| true is more readble and equal nowadays) 
     97"something || [ $? = 123 ]"  so if something returns 123, it's not an error, but other error codes might be 
     101-hello vs hello-debhelper 
     103dh_foo, each one corresponds to a step 
     104-- abstract concrete tasks, e.g. dh_compress will compress what needs to be compressed 
     106Also, the presence of some files (e.g. .install, .dirs) will trigger these operations or act as input for them.  TODO clarify this. 
     108stop at 36:00