| Summary: | smart: some packages can not be reinstalled | ||
|---|---|---|---|
| Product: | [Runtime] Package Management Issues | Reporter: | Yi Zhao <yi.zhao> |
| Component: | package-management-issues | Assignee: | Bogdan Marinescu <bogdan.a.marinescu> |
| Status: | VERIFIED NOTABUG | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | bluelightning, bogdan.a.marinescu, corneliux.stoicescu, hongxu.jia, liang.li2, mark.hatle, Qi.Chen |
| Version: | 1.4 | ||
| Target Milestone: | 1.4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | |||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | --- | |
|
Description
Yi Zhao
2013-01-22 09:22:52 UTC
This is indeed a bit weird, but it seems to be the correct behaviour as far as smart is concerned. The error comes from here (commands/reinstall.py):
found = False
for pkg in pkgs:
if pkg.installed:
found = True
trans.enqueue(pkg, REINSTALL)
for loader in pkg.loaders:
if not loader.getInstalled():
break
else:
raise Error, _("'%s' is not available for "
"reinstallation") % pkg
smart will consider a package for reinstallation if it has at least one loader that reports it as not being installed. This behaviour is consistent with other parts of the smart code; for exampe, the code below can be found in control.py in a number of places:
loaders = [x for x in pkg.loaders if not x.getInstalled()]
Again, only the loaders that report the package as "not installed" are considered by smart. This behaviour might have something to do with this (check section "Smart transactions"):
http://zorked.net/smart/doc/README.html
(in particular this phrase: "Packages may even be reinstalled, IF different packages with the same name-version pair have different relations, and the one not installed is a considered better option.")
What I can gather from this is that smart works a bit differently than other package managers when it comes to reinstalling a package, but that's not necessarily an error, so I'm closing this bug. If you don't agree with this, please reopen it and add your comments.
Verified as per above comment. |