pyanaconda and modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am sending a patch set that should heal the importing problems some of us have been seeing since anaconda became a regular module, see:

https://www.redhat.com/archives/anaconda-devel-list/2010-April/msg00354.html

Note that the patches I propose follow the option #1 from the email. You might think that removing our sys.path tweaks is controversial but keeping them results in myriads of subtle bugs, for instance 603951.

Fortunately not every import statement had to be rewritten, this is because from within a module it is still possible to directly import sibling modules. So e.g. in pyanaconda.yuminstall one can do 'import anaconda_log' to get to pyanaconda.anaconda_log.

The only special entry is sys.path is now /tmp/updates which is at the same level as /usr/lib/python2.6/site-packages/. After that everything is imported from under there. Because of this, and because in the install.img booty/ and isys/ are in fact subpackages under pyanacodna/, the same layout needs to be followed in updates.img else python won't find these modules. In other words, the greatest drawback of the change is that layout of updates.img now has to strictly mirror the layout of the original package in install.img.

This also means that isys/ and booty/ have to go under pyanaconda in updates.img, which is not how they are put in the current repo! for isys/ this is because loader depends on its headers. For booty/ there's no reason I can think of. Hans, do you think I can move booty/ under pyanaconda/ ?

Another thing about updates is that the updates.img has to be complete, that is include all the modules anaconda needs in it. This is easy to remedy however by inspecting updates.img at the start and link all the missing modules to their counterparts in /usr/lib/python2.6/site-packages/. In fact, there's such a mechanism in place already it just needs to be slightly extended to work recursively.

What I am going to do before pushing is
1) wait for comments and objections
2) try a scratch compose to see that everything still works
3) fix the problem of updates.img having to include everything
4) updates scripts/upd-updates to be putting everything at the proper place in updates.img


Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux