On Fri, Oct 26, 2012 at 1:17 PM, Jesse Hathaway <[email protected]> wrote: > Andy Parker <andy <at> puppetlabs.com> writes: >> So the apt provider should uninstall and then reinstall when the >> ensured version is less than the installed version? That sounds >> reasonable on the surface, but seems like it will have a lot of >> unintended consequences. For instance, what should be done with >> dependencies? > > Downgrading should result in an error, and not be automatically completed as > it > is not supported. Uninstalling and reinstalling a package will not always work > if the configuration format has changed or the data format has changed. > However, the lack of support for downgrading does not negate the value of > specifying the package version. Specifying a package version ensures that your > currently supported version is consistently installed across all nodes. >
This would be a complete regression of issue #1999, which would be a majorly breaking change to the apt provider and so we can't do. We can maybe do the original suggestion that there is a flag with disables this, but it would have to be off by default. >> Has puppet using --force-yes caused specific problems that could be >> addressed? > > Here is an example of where --force-yes causes problems. This demonstrates two > ways using force-yes can break your system. The first being installing a > package and breaking dependencies. The second being downgrading a package > where > the packages configuration or data format is not backward compatible. > > I think it is suprising to a user of puppet that merely specifying the version > of a package results in this flag being set, given the dire warning in the > manpage, "Using force-yes can potentially destroy your system!". This flag > should be a separate puppet option on the package type. > > 1. Install bacula 5.2.6 on Debian Squeeze > > $ sudo apt-get install -t squeeze-backports bacula-server > > 2. Try to downgrade to 5.0.2, apt-get correctly refuses > > $ sudo apt-get -y install bacula-common=5.0.2-2.2+b1 > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following packages were automatically installed and are no longer > required: > python-minimal bacula-common-sqlite3 sqlite mt-st dbconfig-common > libsqlite0 python bacula-common mtx sqlite3 > Use 'apt-get autoremove' to remove them. > Suggested packages: > bacula-doc > The following packages will be REMOVED: > bacula bacula-client bacula-console bacula-director-common > bacula-director-sqlite3 bacula-fd bacula-sd bacula-sd-sqlite3 bacula-server > bacula-traymonitor > The following packages will be DOWNGRADED: > bacula-common > 0 upgraded, 0 newly installed, 1 downgraded, 10 to remove and 2 not > upgraded. > Need to get 635 kB of archives. > After this operation, 3,817 kB disk space will be freed. > E: There are problems and -y was used without --force-yes > > 3. Ignore the warning and downgrade anyway > > $ sudo apt-get -y --force-yes install bacula-common=5.0.2-2.2+b1 > Reading package lists... Done > Building dependency tree > Reading state information... Done > The following packages were automatically installed and are no longer > required: > python-minimal bacula-common-sqlite3 sqlite mt-st dbconfig-common > libsqlite0 python bacula-common mtx sqlite3 > Use 'apt-get autoremove' to remove them. > Suggested packages: > bacula-doc > The following packages will be REMOVED: > bacula bacula-client bacula-console bacula-director-common > bacula-director-sqlite3 bacula-fd bacula-sd bacula-sd-sqlite3 bacula-server > bacula-traymonitor > The following packages will be DOWNGRADED: > bacula-common > 0 upgraded, 0 newly installed, 1 downgraded, 10 to remove and 2 not > upgraded. > Need to get 635 kB of archives. > After this operation, 3,817 kB disk space will be freed. > Get:1 http://debian.mirrors.tds.net/debian/ squeeze/main bacula-common > amd64 > 5.0.2-2.2+b1 [635 kB] > Fetched 635 kB in 0s (2,010 kB/s) > (Reading database ... 22487 files and directories currently installed.) > Removing bacula ... > Removing bacula-client ... > Removing bacula-console ... > Removing bacula-server ... > Removing bacula-director-sqlite3 ... > Stopping Bacula Director...:. > Removing bacula-director-common ... > Removing bacula-fd ... > Stopping Bacula File daemon...:. > Removing bacula-sd-sqlite3 ... > Removing bacula-sd ... > Stopping Bacula Storage daemon... :. > Removing bacula-traymonitor ... > Processing triggers for man-db ... > dpkg: warning: downgrading bacula-common from 5.2.6+dfsg-1~bpo60+1 to > 5.0.2-2.2+b1. > (Reading database ... 22387 files and directories currently installed.) > Preparing to replace bacula-common 5.2.6+dfsg-1~bpo60+1 (using > .../bacula-common_5.0.2-2.2+b1_amd64.deb) ... > Unpacking replacement bacula-common ... > dpkg: warning: unable to delete old directory '/etc/tmpfiles.d': Directory > not empty > Processing triggers for man-db ... > Setting up bacula-common (5.0.2-2.2+b1) ... > Installing new version of config file /etc/bacula/scripts/btraceback.gdb > ... > > - Package list > > $ dpkg -l|grep bacula > ii bacula-common 5.0.2-2.2+b1 > network backup, recovery and verification - common support files > ii bacula-common-sqlite3 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - SQLite v3 common files > rc bacula-console 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - text console > rc bacula-director-common 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - Director common files > rc bacula-director-sqlite3 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - SQLite 3 storage for Director > rc bacula-fd 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - file daemon > rc bacula-sd 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - storage daemon > rc bacula-traymonitor 5.2.6+dfsg-1~bpo60+1 > network backup, recovery and verification - tray monitor > > 4. Result package is broken. If you then install missing dependencies, the > package will still be broken as the bacula database format has changed > between 5.0.2 & 5.2.6 > > Thanks, Jesse > > > > -- > You received this message because you are subscribed to the Google Groups > "Puppet Developers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/puppet-dev?hl=en. > -- You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
